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

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

Issue 15021007: Do conservative prerendering based on the LocalPredictor in Dev/Canary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/prerender/prerender_field_trial.cc
===================================================================
--- chrome/browser/prerender/prerender_field_trial.cc (revision 198752)
+++ chrome/browser/prerender/prerender_field_trial.cc (working copy)
@@ -28,6 +28,7 @@
const char kLocalPredictorTrialName[] = "PrerenderLocalPredictor";
const char kLocalPredictorEnabledGroup[] = "Enabled";
+const char kLocalPredictorDisabledGroup[] = "Disabled";
const char kLoggedInPredictorTrialName[] = "PrerenderLoggedInPredictor";
const char kLoggedInPredictorEnabledGroup[] = "Enabled";
@@ -149,6 +150,7 @@
} // end namespace
void ConfigureOmniboxPrerender();
+void ConfigureLocalPredictor();
void ConfigureLoggedInPredictor();
void ConfigureSideEffectFreeWhitelist();
@@ -207,6 +209,7 @@
}
ConfigureOmniboxPrerender();
+ ConfigureLocalPredictor();
ConfigureLoggedInPredictor();
ConfigureSideEffectFreeWhitelist();
}
@@ -229,6 +232,19 @@
kDisabledProbability);
}
+void ConfigureLocalPredictor() {
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
Shishir 2013/05/07 22:57:30 Since this can have bad side effects there should
tburkard 2013/05/07 23:21:59 I will do this separately (before committing), but
+ if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
+ channel == chrome::VersionInfo::CHANNEL_BETA) {
+ return;
+ }
+ scoped_refptr<FieldTrial> local_predictor_trial(
+ FieldTrialList::FactoryGetFieldTrial(
+ kLocalPredictorTrialName, 100,
+ kLocalPredictorDisabledGroup, 2013, 12, 31, NULL));
+ local_predictor_trial->AppendGroup(kLocalPredictorEnabledGroup, 100);
+}
+
void ConfigureLoggedInPredictor() {
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_histograms.cc » ('j') | chrome/browser/prerender/prerender_local_predictor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698