Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] Add Omnibox navigation type to IOS.NTP/Start.Click
As a part of measuring user actions from the Start/NTP surface, navigations from the omnibox while the NTP/Start surface is being shown are logged in IOS.NTP/Start.Click in this change. (cherry picked from commit aed30c3) Bug: 1432252 Change-Id: I4b5d4fdc4751da672eca8a942f267b5c3422e4c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4563496 Commit-Queue: Chris Lu <thegreenfrog@chromium.org> Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1149176} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4571133 Auto-Submit: Chris Lu <thegreenfrog@chromium.org> Cr-Commit-Position: refs/branch-heads/5790@{#226} Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
- Loading branch information
Chris Lu
authored and
Chromium LUCI CQ
committed
Jun 1, 2023
1 parent
89f1704
commit 9abb99f
Showing
14 changed files
with
82 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_BROWSER_UI_NTP_METRICS_HOME_METRICS_H_ | ||
#define IOS_CHROME_BROWSER_UI_NTP_METRICS_HOME_METRICS_H_ | ||
|
||
// These values are persisted to IOS.Start/NTP.Click histograms. | ||
// Entries should not be renumbered and numeric values should never be reused. | ||
enum class IOSHomeActionType { | ||
kMostVisitedTile = 0, | ||
kShortcuts = 1, | ||
kReturnToRecentTab = 2, | ||
kFeedCard = 3, | ||
kFakebox = 4, | ||
kSetUpList = 5, | ||
kOmnibox = 6, | ||
kMaxValue = kOmnibox, | ||
}; | ||
|
||
// Logs a Home action and attributes it to the NTP or Start surface. | ||
void RecordHomeAction(IOSHomeActionType type, bool isStartSurface); | ||
|
||
#endif // IOS_CHROME_BROWSER_UI_NTP_METRICS_HOME_METRICS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import "ios/chrome/browser/ui/ntp/metrics/home_metrics.h" | ||
|
||
#import "base/metrics/histogram_functions.h" | ||
#import "base/metrics/histogram_macros.h" | ||
#import "ios/chrome/browser/ui/ntp/metrics/new_tab_page_metrics_constants.h" | ||
|
||
#if !defined(__has_feature) || !__has_feature(objc_arc) | ||
#error "This file requires ARC support." | ||
#endif | ||
|
||
void RecordHomeAction(IOSHomeActionType type, bool isStartSurface) { | ||
if (isStartSurface) { | ||
UMA_HISTOGRAM_ENUMERATION(kActionOnStartHistogram, type); | ||
} else { | ||
UMA_HISTOGRAM_ENUMERATION(kActionOnNTPHistogram, type); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters