Chromium Code Reviews| 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..45df2967456d86d23f00c5479e1b3a2b2f274916 100644 |
| --- a/chrome/browser/ui/search/search_tab_helper.cc |
| +++ b/chrome/browser/ui/search/search_tab_helper.cc |
| @@ -397,6 +397,23 @@ 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; |
| + } |
| + // Note that 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()); |
|
beaudoin
2015/12/09 20:12:23
I'm not sure I understand the comment here. Do you
zmin
2015/12/09 20:55:33
Discussed with @beaudoin offline, will update the
|
| + } |
| } |
| void SearchTabHelper::OmniboxStartMarginChanged(int omnibox_start_margin) { |