Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/renderer/searchbox/searchbox.cc

Issue 2117373002: Cleanup: Change LogMostVisitedImpression|Navigation APIs to take an enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ntp_uma_cleanup
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/searchbox/searchbox.h" 5 #include "chrome/renderer/searchbox/searchbox.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 uint64_t now = (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()) 262 uint64_t now = (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch())
263 .InMilliseconds(); 263 .InMilliseconds();
264 DCHECK(now >= start); 264 DCHECK(now >= start);
265 delta = base::TimeDelta::FromMilliseconds(now - start); 265 delta = base::TimeDelta::FromMilliseconds(now - start);
266 } 266 }
267 render_view()->Send(new ChromeViewHostMsg_LogEvent( 267 render_view()->Send(new ChromeViewHostMsg_LogEvent(
268 render_view()->GetRoutingID(), page_seq_no_, event, delta)); 268 render_view()->GetRoutingID(), page_seq_no_, event, delta));
269 } 269 }
270 270
271 void SearchBox::LogMostVisitedImpression(int position, 271 void SearchBox::LogMostVisitedImpression(int position,
272 const base::string16& provider) { 272 NTPLoggingTileSource tile_source) {
273 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedImpression( 273 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedImpression(
274 render_view()->GetRoutingID(), page_seq_no_, position, provider)); 274 render_view()->GetRoutingID(), page_seq_no_, position, tile_source));
275 } 275 }
276 276
277 void SearchBox::LogMostVisitedNavigation(int position, 277 void SearchBox::LogMostVisitedNavigation(int position,
278 const base::string16& provider) { 278 NTPLoggingTileSource tile_source) {
279 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedNavigation( 279 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedNavigation(
280 render_view()->GetRoutingID(), page_seq_no_, position, provider)); 280 render_view()->GetRoutingID(), page_seq_no_, position, tile_source));
281 } 281 }
282 282
283 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { 283 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) {
284 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck( 284 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck(
285 render_view()->GetRoutingID(), page_seq_no_, identity)); 285 render_view()->GetRoutingID(), page_seq_no_, identity));
286 } 286 }
287 287
288 void SearchBox::CheckIsUserSyncingHistory() { 288 void SearchBox::CheckIsUserSyncingHistory() {
289 render_view()->Send(new ChromeViewHostMsg_HistorySyncCheck( 289 render_view()->Send(new ChromeViewHostMsg_HistorySyncCheck(
290 render_view()->GetRoutingID(), page_seq_no_)); 290 render_view()->GetRoutingID(), page_seq_no_));
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 embedded_search_request_params_ = EmbeddedSearchRequestParams(); 534 embedded_search_request_params_ = EmbeddedSearchRequestParams();
535 suggestion_ = InstantSuggestion(); 535 suggestion_ = InstantSuggestion();
536 is_focused_ = false; 536 is_focused_ = false;
537 is_key_capture_enabled_ = false; 537 is_key_capture_enabled_ = false;
538 theme_info_ = ThemeBackgroundInfo(); 538 theme_info_ = ThemeBackgroundInfo();
539 } 539 }
540 540
541 void SearchBox::OnDestruct() { 541 void SearchBox::OnDestruct() {
542 delete this; 542 delete this;
543 } 543 }
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698