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

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

Issue 15080009: Enable the side-effect free whitelist and use it for local browsing based (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_local_predictor.h » ('j') | 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 scoped_refptr<FieldTrial> side_effect_free_whitelist_trial( 262 scoped_refptr<FieldTrial> side_effect_free_whitelist_trial(
263 FieldTrialList::FactoryGetFieldTrial( 263 FieldTrialList::FactoryGetFieldTrial(
264 kSideEffectFreeWhitelistTrialName, 100, 264 kSideEffectFreeWhitelistTrialName, 100,
265 kSideEffectFreeWhitelistDisabledGroup, 2013, 12, 31, NULL)); 265 kSideEffectFreeWhitelistDisabledGroup, 2013, 12, 31, NULL));
266 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 266 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
267 if (channel == chrome::VersionInfo::CHANNEL_STABLE || 267 if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
268 channel == chrome::VersionInfo::CHANNEL_BETA) { 268 channel == chrome::VersionInfo::CHANNEL_BETA) {
269 return; 269 return;
270 } 270 }
271 side_effect_free_whitelist_trial->AppendGroup( 271 side_effect_free_whitelist_trial->AppendGroup(
272 kSideEffectFreeWhitelistEnabledGroup, 0); 272 kSideEffectFreeWhitelistEnabledGroup, 100);
273 } 273 }
274 274
275 bool IsOmniboxEnabled(Profile* profile) { 275 bool IsOmniboxEnabled(Profile* profile) {
276 if (!profile) 276 if (!profile)
277 return false; 277 return false;
278 278
279 if (!PrerenderManager::IsPrerenderingPossible()) 279 if (!PrerenderManager::IsPrerenderingPossible())
280 return false; 280 return false;
281 281
282 // Override any field trial groups if the user has set a command line flag. 282 // Override any field trial groups if the user has set a command line flag.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return base::FieldTrialList::FindFullName(kLoggedInPredictorTrialName) == 316 return base::FieldTrialList::FindFullName(kLoggedInPredictorTrialName) ==
317 kLoggedInPredictorEnabledGroup; 317 kLoggedInPredictorEnabledGroup;
318 } 318 }
319 319
320 bool IsSideEffectFreeWhitelistEnabled() { 320 bool IsSideEffectFreeWhitelistEnabled() {
321 return base::FieldTrialList::FindFullName(kSideEffectFreeWhitelistTrialName) 321 return base::FieldTrialList::FindFullName(kSideEffectFreeWhitelistTrialName)
322 == kSideEffectFreeWhitelistEnabledGroup; 322 == kSideEffectFreeWhitelistEnabledGroup;
323 } 323 }
324 324
325 } // namespace prerender 325 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_local_predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698