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

Unified Diff: chrome/browser/search/most_visited_iframe_source.cc

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: Remove unused consts. Created 6 years, 9 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/search/most_visited_iframe_source.cc
diff --git a/chrome/browser/search/most_visited_iframe_source.cc b/chrome/browser/search/most_visited_iframe_source.cc
index d8c114ac5b2763298e672b6a64dd7f6863c73703..56311e41cb2b177bd42220edc7eb7caf8e411b21 100644
--- a/chrome/browser/search/most_visited_iframe_source.cc
+++ b/chrome/browser/search/most_visited_iframe_source.cc
@@ -23,8 +23,6 @@ const char kThumbnailCSSPath[] = "/thumbnail.css";
const char kThumbnailJSPath[] = "/thumbnail.js";
const char kUtilJSPath[] = "/util.js";
const char kCommonCSSPath[] = "/common.css";
-const char kLogHTMLPath[] = "/log.html";
-const char kMostVisitedHistogramWithProvider[] = "NewTabPage.MostVisited.%s";
} // namespace
@@ -66,26 +64,6 @@ void MostVisitedIframeSource::StartDataRequest(
SendResource(IDR_MOST_VISITED_UTIL_JS, callback);
} else if (path == kCommonCSSPath) {
SendResource(IDR_MOST_VISITED_IFRAME_CSS, callback);
- } else if (path == kLogHTMLPath) {
- // Log the clicked MostVisited element by position.
- std::string str_position;
- int position;
- if (net::GetValueForKeyInQuery(url, "pos", &str_position) &&
- base::StringToInt(str_position, &position)) {
- // Log the Most Visited click.
- UMA_HISTOGRAM_ENUMERATION(kMostVisitedHistogramName, position,
- kNumMostVisited);
- // If a specific provider is specified, log the metric specific to the
- // provider.
- std::string provider;
- if (net::GetValueForKeyInQuery(url, "pr", &provider))
- LogMostVisitedProviderClick(position, provider);
-
- // Records the action. This will be available as a time-stamped stream
- // server-side and can be used to compute time-to-long-dwell.
- content::RecordAction(base::UserMetricsAction("MostVisited_Clicked"));
- }
- callback.Run(NULL);
} else {
callback.Run(NULL);
}
@@ -95,25 +73,5 @@ bool MostVisitedIframeSource::ServesPath(const std::string& path) const {
return path == kTitleHTMLPath || path == kTitleCSSPath ||
path == kTitleJSPath || path == kThumbnailHTMLPath ||
path == kThumbnailCSSPath || path == kThumbnailJSPath ||
- path == kUtilJSPath || path == kCommonCSSPath || path == kLogHTMLPath;
-}
-
-void MostVisitedIframeSource::LogMostVisitedProviderClick(
- int position,
- const std::string& provider) {
- std::string histogram_name =
- MostVisitedIframeSource::GetHistogramNameForProvider(provider);
- base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
- histogram_name, 1,
- MostVisitedIframeSource::kNumMostVisited,
- MostVisitedIframeSource::kNumMostVisited + 1,
- base::Histogram::kUmaTargetedHistogramFlag);
- counter->Add(position);
-}
-
-// static
-std::string MostVisitedIframeSource::GetHistogramNameForProvider(
- const std::string& provider) {
- return base::StringPrintf(kMostVisitedHistogramWithProvider,
- provider.c_str());
+ path == kUtilJSPath || path == kCommonCSSPath;
}

Powered by Google App Engine
This is Rietveld 408576698