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

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

Issue 421663003: Move variations component code to variations namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix Created 6 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 | Annotate | Revision Log
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 return GetLocalPredictorSpecValue( 351 return GetLocalPredictorSpecValue(
352 kPrerenderQueryPrerenderServiceCurrentURLKeyName) != kDisabledGroup; 352 kPrerenderQueryPrerenderServiceCurrentURLKeyName) != kDisabledGroup;
353 } 353 }
354 354
355 bool ShouldQueryPrerenderServiceForCandidateURLs() { 355 bool ShouldQueryPrerenderServiceForCandidateURLs() {
356 return GetLocalPredictorSpecValue( 356 return GetLocalPredictorSpecValue(
357 kPrerenderQueryPrerenderServiceCandidateURLsKeyName) != kDisabledGroup; 357 kPrerenderQueryPrerenderServiceCandidateURLsKeyName) != kDisabledGroup;
358 } 358 }
359 359
360 string GetPrerenderServiceURLPrefix() { 360 string GetPrerenderServiceURLPrefix() {
361 string prefix = chrome_variations::GetVariationParamValue( 361 string prefix = variations::GetVariationParamValue(
362 kLocalPredictorSpecTrialName, 362 kLocalPredictorSpecTrialName,
363 kPrerenderServiceURLPrefixParameterName); 363 kPrerenderServiceURLPrefixParameterName);
364 return prefix.empty() ? kDefaultPrerenderServiceURLPrefix : prefix; 364 return prefix.empty() ? kDefaultPrerenderServiceURLPrefix : prefix;
365 } 365 }
366 366
367 int GetPrerenderServiceBehaviorID() { 367 int GetPrerenderServiceBehaviorID() {
368 int id; 368 int id;
369 StringToInt(GetLocalPredictorSpecValue(kPrerenderServiceBehaviorIDKeyName), 369 StringToInt(GetLocalPredictorSpecValue(kPrerenderServiceBehaviorIDKeyName),
370 &id); 370 &id);
371 // The behavior ID must be non-negative. 371 // The behavior ID must be non-negative.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return GetLocalPredictorSpecValue(kDisableSessionStorageNamespaceMerging) != 451 return GetLocalPredictorSpecValue(kDisableSessionStorageNamespaceMerging) !=
452 kDisabledGroup; 452 kDisabledGroup;
453 } 453 }
454 454
455 bool IsPrerenderCookieStoreEnabled() { 455 bool IsPrerenderCookieStoreEnabled() {
456 return GetLocalPredictorSpecValue(kPrerenderCookieStore) != kDisabledGroup && 456 return GetLocalPredictorSpecValue(kPrerenderCookieStore) != kDisabledGroup &&
457 FieldTrialList::FindFullName(kPrerenderCookieStore) != kDisabledGroup; 457 FieldTrialList::FindFullName(kPrerenderCookieStore) != kDisabledGroup;
458 } 458 }
459 459
460 } // namespace prerender 460 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial_unittest.cc ('k') | chrome/browser/profile_resetter/automatic_profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698