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

Unified Diff: chrome/browser/prerender/prerender_manager.cc

Issue 7812011: Tighten conditions for when a URL is a search result, and move (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.cc
===================================================================
--- chrome/browser/prerender/prerender_manager.cc (revision 98877)
+++ chrome/browser/prerender/prerender_manager.cc (working copy)
@@ -9,7 +9,6 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/stl_util.h"
-#include "base/string_util.h"
#include "base/time.h"
#include "base/values.h"
#include "base/utf_string_conversions.h"
@@ -298,11 +297,8 @@
const GURL& referrer) {
DCHECK(CalledOnValidThread());
- if (origin == ORIGIN_LINK_REL_PRERENDER &&
- StartsWithASCII(referrer.host(), std::string("www.google."), true) &&
- !StartsWithASCII(referrer.path(), std::string("/imgres"), true)) {
+ if (origin == ORIGIN_LINK_REL_PRERENDER && IsGoogleSearchResultURL(referrer))
origin = ORIGIN_GWS_PRERENDER;
- }
histograms_->RecordPrerender(origin, url_arg);
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698