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

Side by Side Diff: chrome/browser/chrome_browser_field_trials.cc

Issue 13954011: Enable VariationsService on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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/chrome_browser_field_trials.h" 5 #include "chrome/browser/chrome_browser_field_trials.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "apps/field_trial_names.h" 9 #include "apps/field_trial_names.h"
10 #include "apps/pref_names.h" 10 #include "apps/pref_names.h"
(...skipping 30 matching lines...) Expand all
41 : parsed_command_line_(parsed_command_line) { 41 : parsed_command_line_(parsed_command_line) {
42 } 42 }
43 43
44 ChromeBrowserFieldTrials::~ChromeBrowserFieldTrials() { 44 ChromeBrowserFieldTrials::~ChromeBrowserFieldTrials() {
45 } 45 }
46 46
47 void ChromeBrowserFieldTrials::SetupFieldTrials(PrefService* local_state) { 47 void ChromeBrowserFieldTrials::SetupFieldTrials(PrefService* local_state) {
48 const base::Time install_time = base::Time::FromTimeT( 48 const base::Time install_time = base::Time::FromTimeT(
49 local_state->GetInt64(prefs::kInstallDate)); 49 local_state->GetInt64(prefs::kInstallDate));
50 DCHECK(!install_time.is_null()); 50 DCHECK(!install_time.is_null());
51
51 chrome_variations::SetupUniformityFieldTrials(install_time); 52 chrome_variations::SetupUniformityFieldTrials(install_time);
52 SetUpSimpleCacheFieldTrial(); 53 SetUpSimpleCacheFieldTrial();
54
53 #if !defined(OS_ANDROID) && !defined(OS_IOS) 55 #if !defined(OS_ANDROID) && !defined(OS_IOS)
54 SetupDesktopFieldTrials(local_state); 56 SetupDesktopFieldTrials(local_state);
55 #endif // defined(OS_ANDROID) 57 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
56 58
57 #if defined(OS_ANDROID) || defined(OS_IOS) 59 #if defined(OS_ANDROID) || defined(OS_IOS)
58 SetupMobileFieldTrials(); 60 SetupMobileFieldTrials();
59 #endif // defined(OS_ANDROID) || defined(OS_IOS) 61 #endif // defined(OS_ANDROID) || defined(OS_IOS)
62
63 InstantiateDynamicTrials();
60 } 64 }
61 65
62 66
63 #if defined(OS_ANDROID) || defined(OS_IOS) 67 #if defined(OS_ANDROID) || defined(OS_IOS)
64 void ChromeBrowserFieldTrials::SetupMobileFieldTrials() { 68 void ChromeBrowserFieldTrials::SetupMobileFieldTrials() {
65 DataCompressionProxyFieldTrial(); 69 DataCompressionProxyFieldTrial();
66 } 70 }
67 71
68 // Governs the rollout of the compression proxy for Chrome on mobile platforms. 72 // Governs the rollout of the compression proxy for Chrome on mobile platforms.
69 // Always enabled in DEV and BETA versions. 73 // Always enabled in DEV and BETA versions.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 AutoLaunchChromeFieldTrial(); 113 AutoLaunchChromeFieldTrial();
110 gpu_util::InitializeCompositingFieldTrial(); 114 gpu_util::InitializeCompositingFieldTrial();
111 OmniboxFieldTrial::ActivateStaticTrials(); 115 OmniboxFieldTrial::ActivateStaticTrials();
112 SetUpInfiniteCacheFieldTrial(); 116 SetUpInfiniteCacheFieldTrial();
113 SetUpCacheSensitivityAnalysisFieldTrial(); 117 SetUpCacheSensitivityAnalysisFieldTrial();
114 DisableShowProfileSwitcherTrialIfNecessary(); 118 DisableShowProfileSwitcherTrialIfNecessary();
115 WindowsOverlappedTCPReadsFieldTrial(); 119 WindowsOverlappedTCPReadsFieldTrial();
116 #if defined(ENABLE_ONE_CLICK_SIGNIN) 120 #if defined(ENABLE_ONE_CLICK_SIGNIN)
117 OneClickSigninHelper::InitializeFieldTrial(); 121 OneClickSigninHelper::InitializeFieldTrial();
118 #endif 122 #endif
119 InstantiateDynamicTrials();
120 SetupAppLauncherFieldTrial(local_state); 123 SetupAppLauncherFieldTrial(local_state);
121 } 124 }
122 125
123 void ChromeBrowserFieldTrials::SetupAppLauncherFieldTrial( 126 void ChromeBrowserFieldTrials::SetupAppLauncherFieldTrial(
124 PrefService* local_state) { 127 PrefService* local_state) {
125 if (base::FieldTrialList::FindFullName(apps::kLauncherPromoTrialName) == 128 if (base::FieldTrialList::FindFullName(apps::kLauncherPromoTrialName) ==
126 apps::kResetShowLauncherPromoPrefGroupName) { 129 apps::kResetShowLauncherPromoPrefGroupName) {
127 local_state->SetBoolean(apps::prefs::kShowAppLauncherPromo, true); 130 local_state->SetBoolean(apps::prefs::kShowAppLauncherPromo, true);
128 } 131 }
129 } 132 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Call |FindValue()| on the trials below, which may come from the server, to 278 // Call |FindValue()| on the trials below, which may come from the server, to
276 // ensure they get marked as "used" for the purposes of data reporting. 279 // ensure they get marked as "used" for the purposes of data reporting.
277 base::FieldTrialList::FindValue("UMA-Dynamic-Binary-Uniformity-Trial"); 280 base::FieldTrialList::FindValue("UMA-Dynamic-Binary-Uniformity-Trial");
278 base::FieldTrialList::FindValue("UMA-Dynamic-Uniformity-Trial"); 281 base::FieldTrialList::FindValue("UMA-Dynamic-Uniformity-Trial");
279 base::FieldTrialList::FindValue("InstantDummy"); 282 base::FieldTrialList::FindValue("InstantDummy");
280 base::FieldTrialList::FindValue("InstantChannel"); 283 base::FieldTrialList::FindValue("InstantChannel");
281 base::FieldTrialList::FindValue("Test0PercentDefault"); 284 base::FieldTrialList::FindValue("Test0PercentDefault");
282 // Activate the autocomplete dynamic field trials. 285 // Activate the autocomplete dynamic field trials.
283 OmniboxFieldTrial::ActivateDynamicTrials(); 286 OmniboxFieldTrial::ActivateDynamicTrials();
284 } 287 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698