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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_user_data_logger.h

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding and using logNavigation(); updating tests; removing ping and the log.html page. Created 6 years, 10 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/webui/ntp/ntp_user_data_logger.h
diff --git a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h
index fc0923a522a84be1fb784d2d57c65a7d990b4979..b30c41ae02cb11c58b70218dbac6ac132864a997 100644
--- a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h
+++ b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h
@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
#define CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
+#include <string>
+
+#include "base/strings/string16.h"
#include "chrome/common/ntp_logging_events.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -23,6 +26,10 @@ class NTPUserDataLogger
static NTPUserDataLogger* GetOrCreateFromWebContents(
content::WebContents* content);
+ // Returns the name of the histogram that should be logged for a click to a
+ // specified Most Visited |provider|.
+ static std::string GetHistogramNameForProvider(const std::string& provider);
+
// Logs a number of statistics regarding the NTP. Called when an NTP tab is
// about to be deactivated (be it by switching tabs, losing focus or closing
// the tab/shutting down Chrome), or when the user navigates to a URL.
@@ -35,6 +42,9 @@ class NTPUserDataLogger
// Logs an impression on one of the Most Visited tiles by a given provider.
void LogImpression(int position, const base::string16& provider);
+ // Logs a navigation on one of the Most Visited tiles by a given provider.
+ void LogNavigation(int position, const base::string16& provider);
+
// content::WebContentsObserver override
virtual void NavigationEntryCommitted(
const content::LoadCommittedDetails& load_details) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698