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

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

Issue 324273004: Allow non default prefetch suggestions to be prefetched (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 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/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 6052a64f632d6d2485b3c2681355097f113b86ed..5743e5c97f62413d925cfae1cc3c182220859596 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -66,6 +66,7 @@ const uint64 kEmbeddedPageVersionDefault = 2;
const char kHideVerbatimFlagName[] = "hide_verbatim";
const char kPrefetchSearchResultsFlagName[] = "prefetch_results";
const char kPrefetchSearchResultsOnSRP[] = "prefetch_results_srp";
+const char kAllowPrefetchNonDefaultMatch[] = "allow_prefetch_non_default_match";
const char kPrerenderInstantUrlOnOmniboxFocus[] =
"prerender_instant_url_on_omnibox_focus";
@@ -581,6 +582,15 @@ bool ShouldPrefetchSearchResults() {
kPrefetchSearchResultsFlagName, false, flags);
}
+bool ShouldAllowPrefetchNonDefaultMatch() {
+ if (!ShouldPrefetchSearchResults())
+ return false;
+
+ FieldTrialFlags flags;
+ return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault(
+ kAllowPrefetchNonDefaultMatch, false, flags);
+}
+
bool ShouldPrerenderInstantUrlOnOmniboxFocus() {
if (!ShouldPrefetchSearchResults())
return false;

Powered by Google App Engine
This is Rietveld 408576698