Commit 7a959ad9 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Add history entry to ntp::recordAction.

Bug: 821360
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I5665d51929d483f5f94130cffec9dd3fad601608
Reviewed-on: https://chromium-review.googlesource.com/971704Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544727}
parent 0caa5dd4
...@@ -29,6 +29,7 @@ enum ActionType { ...@@ -29,6 +29,7 @@ enum ActionType {
ACTION_OPENED_SUGGESTION, ACTION_OPENED_SUGGESTION,
ACTION_OPENED_LEARN_MORE, ACTION_OPENED_LEARN_MORE,
ACTION_OPENED_PROMO, ACTION_OPENED_PROMO,
ACTION_OPENED_HISTORY_ENTRY,
NUM_ACTION_TYPES, NUM_ACTION_TYPES,
}; };
......
...@@ -50,6 +50,7 @@ source_set("history") { ...@@ -50,6 +50,7 @@ source_set("history") {
"//ios/chrome/browser/browser_state", "//ios/chrome/browser/browser_state",
"//ios/chrome/browser/favicon", "//ios/chrome/browser/favicon",
"//ios/chrome/browser/history", "//ios/chrome/browser/history",
"//ios/chrome/browser/metrics:metrics_internal",
"//ios/chrome/browser/signin", "//ios/chrome/browser/signin",
"//ios/chrome/browser/sync", "//ios/chrome/browser/sync",
"//ios/chrome/browser/ui", "//ios/chrome/browser/ui",
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/chrome_url_constants.h" #include "ios/chrome/browser/chrome_url_constants.h"
#include "ios/chrome/browser/history/history_service_factory.h" #include "ios/chrome/browser/history/history_service_factory.h"
#import "ios/chrome/browser/metrics/new_tab_page_uma.h"
#import "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/authentication_service.h"
#include "ios/chrome/browser/signin/authentication_service_factory.h" #include "ios/chrome/browser/signin/authentication_service_factory.h"
#include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
...@@ -880,6 +881,8 @@ const CGFloat kSeparatorInset = 10; ...@@ -880,6 +881,8 @@ const CGFloat kSeparatorInset = 10;
- (void)openURL:(const GURL&)URL { - (void)openURL:(const GURL&)URL {
GURL copiedURL(URL); GURL copiedURL(URL);
new_tab_page_uma::RecordAction(_browserState,
new_tab_page_uma::ACTION_OPENED_HISTORY_ENTRY);
[self.delegate historyCollectionViewController:self [self.delegate historyCollectionViewController:self
shouldCloseWithCompletion:^{ shouldCloseWithCompletion:^{
[self.URLLoader [self.URLLoader
......
...@@ -31780,6 +31780,7 @@ Called by update_net_trust_anchors.py.--> ...@@ -31780,6 +31780,7 @@ Called by update_net_trust_anchors.py.-->
<int value="9" label="Opened a suggestion"/> <int value="9" label="Opened a suggestion"/>
<int value="10" label="Opened the Learn More link"/> <int value="10" label="Opened the Learn More link"/>
<int value="11" label="Opened the Promo"/> <int value="11" label="Opened the Promo"/>
<int value="12" label="Opened a history entry"/>
</enum> </enum>
<enum name="NewTabPageBookmarkActionAndroid"> <enum name="NewTabPageBookmarkActionAndroid">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment