OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 } | 60 } |
61 | 61 |
62 void DisableShowProfileSwitcherTrialIfNecessary() { | 62 void DisableShowProfileSwitcherTrialIfNecessary() { |
63 // This trial is created by the VariationsService, but it needs to be disabled | 63 // This trial is created by the VariationsService, but it needs to be disabled |
64 // if multi-profiles isn't enabled. | 64 // if multi-profiles isn't enabled. |
65 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); | 65 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); |
66 if (trial && !profiles::IsMultipleProfilesEnabled()) | 66 if (trial && !profiles::IsMultipleProfilesEnabled()) |
67 trial->Disable(); | 67 trial->Disable(); |
68 } | 68 } |
69 | 69 |
70 void SetupLowLatencyFlashAudioFieldTrial() { | 70 void SetupFlashHardwareVideoDecodeFieldTrial() { |
71 #if defined(OS_WIN) | |
cpu_(ooo_6.6-7.5)
2014/01/19 20:56:39
do we need #if defined (OS_WIN) ?
Would the non-t
ilja
2014/01/21 21:15:29
No, the mac/linux players don't ignore the Flag. I
| |
71 scoped_refptr<base::FieldTrial> trial( | 72 scoped_refptr<base::FieldTrial> trial( |
72 base::FieldTrialList::FactoryGetFieldTrial( | 73 base::FieldTrialList::FactoryGetFieldTrial( |
73 content::kLowLatencyFlashAudioFieldTrialName, 100, "Standard", | 74 content::kFlashHwVideoDecodeFieldTrialName, 1000, "Standard", |
DaleCurtis
2014/01/21 18:54:41
Why 1000? 1 and 50 would work below, no?
ilja
2014/01/21 21:15:29
If we stick with the current numbers then I will c
| |
74 2013, 9, 1, base::FieldTrial::SESSION_RANDOMIZED, NULL)); | 75 2014, 9, 1, base::FieldTrial::SESSION_RANDOMIZED, NULL)); |
75 | 76 |
76 // Trial is enabled for dev / beta / canary users only. | 77 // Trial is enabled for Windows dev / beta / canary users at 50% probability |
77 if (chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_STABLE) | 78 // and stable with 1%. |
78 trial->AppendGroup(content::kLowLatencyFlashAudioFieldTrialEnabledName, 25); | 79 if (chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_STABLE) |
80 trial->AppendGroup(content::kFlashHwVideoDecodeFieldTrialEnabledName, 10); | |
81 else | |
82 trial->AppendGroup(content::kFlashHwVideoDecodeFieldTrialEnabledName, 500); | |
83 #endif // defined(OS_WIN) | |
79 } | 84 } |
80 | 85 |
81 void SetupPreReadFieldTrial() { | 86 void SetupPreReadFieldTrial() { |
82 // The chrome executable will have set (or not) an environment variable with | 87 // The chrome executable will have set (or not) an environment variable with |
83 // the group name into which this client belongs. | 88 // the group name into which this client belongs. |
84 std::string group; | 89 std::string group; |
85 scoped_ptr<base::Environment> env(base::Environment::Create()); | 90 scoped_ptr<base::Environment> env(base::Environment::Create()); |
86 if (!env->GetVar(chrome::kPreReadEnvironmentVariable, &group) || | 91 if (!env->GetVar(chrome::kPreReadEnvironmentVariable, &group) || |
87 group.empty()) { | 92 group.empty()) { |
88 return; | 93 return; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 | 131 |
127 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, | 132 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, |
128 const base::Time& install_time, | 133 const base::Time& install_time, |
129 PrefService* local_state) { | 134 PrefService* local_state) { |
130 prerender::ConfigurePrerender(parsed_command_line); | 135 prerender::ConfigurePrerender(parsed_command_line); |
131 AutoLaunchChromeFieldTrial(); | 136 AutoLaunchChromeFieldTrial(); |
132 OmniboxFieldTrial::ActivateStaticTrials(); | 137 OmniboxFieldTrial::ActivateStaticTrials(); |
133 SetupInfiniteCacheFieldTrial(); | 138 SetupInfiniteCacheFieldTrial(); |
134 DisableShowProfileSwitcherTrialIfNecessary(); | 139 DisableShowProfileSwitcherTrialIfNecessary(); |
135 SetupShowAppLauncherPromoFieldTrial(local_state); | 140 SetupShowAppLauncherPromoFieldTrial(local_state); |
136 SetupLowLatencyFlashAudioFieldTrial(); | 141 SetupFlashHardwareVideoDecodeFieldTrial(); |
137 SetupPreReadFieldTrial(); | 142 SetupPreReadFieldTrial(); |
138 } | 143 } |
139 | 144 |
140 } // namespace chrome | 145 } // namespace chrome |
OLD | NEW |