OLD | NEW |
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 uint64_t start = | 260 uint64_t start = |
261 1000 * (render_frame()->GetWebFrame()->performance().navigationStart()); | 261 1000 * (render_frame()->GetWebFrame()->performance().navigationStart()); |
262 uint64_t now = | 262 uint64_t now = |
263 (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()).InMilliseconds(); | 263 (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()).InMilliseconds(); |
264 DCHECK(now >= start); | 264 DCHECK(now >= start); |
265 base::TimeDelta delta = base::TimeDelta::FromMilliseconds(now - start); | 265 base::TimeDelta delta = base::TimeDelta::FromMilliseconds(now - start); |
266 instant_service_->LogEvent(page_seq_no_, event, delta); | 266 instant_service_->LogEvent(page_seq_no_, event, delta); |
267 } | 267 } |
268 | 268 |
269 void SearchBox::LogMostVisitedImpression(int position, | 269 void SearchBox::LogMostVisitedImpression(int position, |
270 ntp_tiles::NTPTileSource tile_source) { | 270 ntp_tiles::TileSource tile_source) { |
271 instant_service_->LogMostVisitedImpression(page_seq_no_, position, | 271 instant_service_->LogMostVisitedImpression(page_seq_no_, position, |
272 tile_source); | 272 tile_source); |
273 } | 273 } |
274 | 274 |
275 void SearchBox::LogMostVisitedNavigation(int position, | 275 void SearchBox::LogMostVisitedNavigation(int position, |
276 ntp_tiles::NTPTileSource tile_source) { | 276 ntp_tiles::TileSource tile_source) { |
277 instant_service_->LogMostVisitedNavigation(page_seq_no_, position, | 277 instant_service_->LogMostVisitedNavigation(page_seq_no_, position, |
278 tile_source); | 278 tile_source); |
279 } | 279 } |
280 | 280 |
281 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { | 281 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { |
282 instant_service_->ChromeIdentityCheck(page_seq_no_, identity); | 282 instant_service_->ChromeIdentityCheck(page_seq_no_, identity); |
283 } | 283 } |
284 | 284 |
285 void SearchBox::CheckIsUserSyncingHistory() { | 285 void SearchBox::CheckIsUserSyncingHistory() { |
286 instant_service_->HistorySyncCheck(page_seq_no_); | 286 instant_service_->HistorySyncCheck(page_seq_no_); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 embedded_search_request_params_ = EmbeddedSearchRequestParams(); | 465 embedded_search_request_params_ = EmbeddedSearchRequestParams(); |
466 suggestion_ = InstantSuggestion(); | 466 suggestion_ = InstantSuggestion(); |
467 is_focused_ = false; | 467 is_focused_ = false; |
468 is_key_capture_enabled_ = false; | 468 is_key_capture_enabled_ = false; |
469 theme_info_ = ThemeBackgroundInfo(); | 469 theme_info_ = ThemeBackgroundInfo(); |
470 } | 470 } |
471 | 471 |
472 void SearchBox::OnDestruct() { | 472 void SearchBox::OnDestruct() { |
473 delete this; | 473 delete this; |
474 } | 474 } |
OLD | NEW |