| Index: chrome/browser/ui/search/search_tab_helper.cc
|
| diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
|
| index b90872377821f778acb68b52b954ad61ec98f969..b7bd44f6e2b98ab630cdef7703b845925db960c2 100644
|
| --- a/chrome/browser/ui/search/search_tab_helper.cc
|
| +++ b/chrome/browser/ui/search/search_tab_helper.cc
|
| @@ -397,6 +397,24 @@ void SearchTabHelper::MostVisitedItemsChanged(
|
| // our metrics get inconsistent. So we'd rather emit stats now.
|
| InstantTab::EmitNtpStatistics(web_contents_);
|
| ipc_router_.SendMostVisitedItems(items);
|
| + LogMostVisitedItemsSource(items);
|
| +}
|
| +
|
| +void SearchTabHelper::LogMostVisitedItemsSource(
|
| + const std::vector<InstantMostVisitedItem>& items) {
|
| + for (auto item : items) {
|
| + NTPLoggingEventType event;
|
| + if (item.is_server_side_suggestion) {
|
| + event = NTP_SERVER_SIDE_SUGGESTION;
|
| + } else {
|
| + event = NTP_CLIENT_SIDE_SUGGESTION;
|
| + }
|
| + // The metrics are emitted for each suggestion as the design requirement
|
| + // even the ntp_user_data_logger.cc now only supports the scenario:
|
| + // all suggestions are provided by server OR
|
| + // all suggestions are provided by client.
|
| + this->OnLogEvent(event, base::TimeDelta());
|
| + }
|
| }
|
|
|
| void SearchTabHelper::OmniboxStartMarginChanged(int omnibox_start_margin) {
|
|
|