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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 17526008: Log NTP hovers in 1993 clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Edited histogram summary Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index e58b0e7c79e70299242fe9a1c761c3232de586a0..de198e22c6dfbf0a9806b9cce90ea0299ea9bea9 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -1039,6 +1039,15 @@ void InstantController::TabDeactivated(content::WebContents* contents) {
if (GetOverlayContents())
HideOverlay();
+
+ // If user is deactivating an NTP tab, log the number of mouseovers for this
+ // NTP session.
+ if (ntp_ && (chrome::MatchesOriginAndPath(
Jered 2013/06/28 16:24:17 Instead, say if (chrome::IsInstantNTP(contents))
annark1 2013/06/28 18:38:22 Done.
+ GURL(GetInstantURL()), contents->GetURL()) ||
+ chrome::MatchesOriginAndPath(
+ GURL(GetLocalInstantURL()), contents->GetURL()))) {
+ ntp_->LogTotalMouseovers(contents);
Jered 2013/06/28 16:24:17 ntp_ is a preloaded new tab page, not the one that
annark1 2013/06/28 18:38:22 Done.
+ }
}
void InstantController::SetInstantEnabled(bool instant_enabled,
@@ -1879,6 +1888,13 @@ void InstantController::PopulateInstantAutocompleteResultFromMatch(
<< result->transition << " " << result->autocomplete_match_index;
}
+void InstantController::LogIframeHover() {
Jered 2013/06/28 16:24:17 Omit this method on InstantController. Handle this
annark1 2013/06/28 18:38:22 Done.
+ if (!browser_ || !browser_->GetActiveWebContents() || !ntp_)
+ return;
+
+ ntp_->LogIframeHover(browser_->GetActiveWebContents());
+}
+
bool InstantController::IsJavascriptEnabled() const {
GURL instant_url(GetInstantURL());
GURL origin(instant_url.GetOrigin());

Powered by Google App Engine
This is Rietveld 408576698