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

Side by Side Diff: chrome/browser/search/most_visited_iframe_source.cc

Issue 426093002: Adds support for thumbnail click pings for Most Visited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only ping for server suggestions Created 6 years, 4 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/browser/resources/local_ntp/most_visited_util.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/search/most_visited_iframe_source.h" 5 #include "chrome/browser/search/most_visited_iframe_source.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } else if (path == kTitleJSPath) { 54 } else if (path == kTitleJSPath) {
55 SendResource(IDR_MOST_VISITED_TITLE_JS, callback); 55 SendResource(IDR_MOST_VISITED_TITLE_JS, callback);
56 } else if (path == kThumbnailHTMLPath) { 56 } else if (path == kThumbnailHTMLPath) {
57 SendResource(IDR_MOST_VISITED_THUMBNAIL_HTML, callback); 57 SendResource(IDR_MOST_VISITED_THUMBNAIL_HTML, callback);
58 } else if (path == kThumbnailCSSPath) { 58 } else if (path == kThumbnailCSSPath) {
59 SendResource(IDR_MOST_VISITED_THUMBNAIL_CSS, callback); 59 SendResource(IDR_MOST_VISITED_THUMBNAIL_CSS, callback);
60 } else if (path == kThumbnailJSPath) { 60 } else if (path == kThumbnailJSPath) {
61 SendJSWithOrigin(IDR_MOST_VISITED_THUMBNAIL_JS, render_process_id, 61 SendJSWithOrigin(IDR_MOST_VISITED_THUMBNAIL_JS, render_process_id,
62 render_frame_id, callback); 62 render_frame_id, callback);
63 } else if (path == kUtilJSPath) { 63 } else if (path == kUtilJSPath) {
64 SendResource(IDR_MOST_VISITED_UTIL_JS, callback); 64 SendJSWithOrigin(IDR_MOST_VISITED_UTIL_JS, render_process_id,
65 render_frame_id, callback);
65 } else if (path == kCommonCSSPath) { 66 } else if (path == kCommonCSSPath) {
66 SendResource(IDR_MOST_VISITED_IFRAME_CSS, callback); 67 SendResource(IDR_MOST_VISITED_IFRAME_CSS, callback);
67 } else { 68 } else {
68 callback.Run(NULL); 69 callback.Run(NULL);
69 } 70 }
70 } 71 }
71 72
72 bool MostVisitedIframeSource::ServesPath(const std::string& path) const { 73 bool MostVisitedIframeSource::ServesPath(const std::string& path) const {
73 return path == kTitleHTMLPath || path == kTitleCSSPath || 74 return path == kTitleHTMLPath || path == kTitleCSSPath ||
74 path == kTitleJSPath || path == kThumbnailHTMLPath || 75 path == kTitleJSPath || path == kThumbnailHTMLPath ||
75 path == kThumbnailCSSPath || path == kThumbnailJSPath || 76 path == kThumbnailCSSPath || path == kThumbnailJSPath ||
76 path == kUtilJSPath || path == kCommonCSSPath; 77 path == kUtilJSPath || path == kCommonCSSPath;
77 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/local_ntp/most_visited_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698