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

Side by Side Diff: chrome/browser/prerender/prerender_field_trial.cc

Issue 10834037: Enabling speculative resource prefetching for 90% users in canary/dev. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Syncing to HEAD Created 8 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 | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/prerender/prerender_field_trial.h" 5 #include "chrome/browser/prerender/prerender_field_trial.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 const int group = FieldTrialList::FindValue(kOmniboxTrialName); 250 const int group = FieldTrialList::FindValue(kOmniboxTrialName);
251 return group == FieldTrial::kNotFinalized || 251 return group == FieldTrial::kNotFinalized ||
252 group == g_omnibox_trial_default_group_number; 252 group == g_omnibox_trial_default_group_number;
253 } 253 }
254 254
255 void ConfigureSpeculativePrefetching() { 255 void ConfigureSpeculativePrefetching() {
256 // Field trial to see if we're enabled. 256 // Field trial to see if we're enabled.
257 const FieldTrial::Probability kDivisor = 100; 257 const FieldTrial::Probability kDivisor = 100;
258 258
259 FieldTrial::Probability kDisabledProbability = 99; 259 FieldTrial::Probability kDisabledProbability = 10;
260 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 260 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
261 if (channel == chrome::VersionInfo::CHANNEL_STABLE || 261 if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
262 channel == chrome::VersionInfo::CHANNEL_BETA) { 262 channel == chrome::VersionInfo::CHANNEL_BETA) {
263 kDisabledProbability = 100; 263 kDisabledProbability = 100;
264 } 264 }
265 scoped_refptr<FieldTrial> speculative_prefetching_learning_trial( 265 scoped_refptr<FieldTrial> speculative_prefetching_learning_trial(
266 FieldTrialList::FactoryGetFieldTrial( 266 FieldTrialList::FactoryGetFieldTrial(
267 kSpeculativePrefetchingLearningTrialName, 267 kSpeculativePrefetchingLearningTrialName,
268 kDivisor, 268 kDivisor,
269 "SpeculativePrefetchingLearningEnabled", 269 "SpeculativePrefetchingLearningEnabled",
(...skipping 18 matching lines...) Expand all
288 if (switch_value == switches::kSpeculativeResourcePrefetchingLearning) 288 if (switch_value == switches::kSpeculativeResourcePrefetchingLearning)
289 return true; 289 return true;
290 } 290 }
291 291
292 const int group = FieldTrialList::FindValue( 292 const int group = FieldTrialList::FindValue(
293 kSpeculativePrefetchingLearningTrialName); 293 kSpeculativePrefetchingLearningTrialName);
294 return group == g_speculative_prefetching_learning_default_group_number; 294 return group == g_speculative_prefetching_learning_default_group_number;
295 } 295 }
296 296
297 } // namespace prerender 297 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698