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

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

Issue 141753006: Enable Windows Flash hw video decode trial. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | content/browser/ppapi_plugin_process_host.cc » ('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 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
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() {
71 scoped_refptr<base::FieldTrial> trial(
72 base::FieldTrialList::FactoryGetFieldTrial(
73 content::kLowLatencyFlashAudioFieldTrialName, 100, "Standard",
74 2013, 9, 1, base::FieldTrial::SESSION_RANDOMIZED, NULL));
75
76 // Trial is enabled for dev / beta / canary users only.
77 if (chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_STABLE)
78 trial->AppendGroup(content::kLowLatencyFlashAudioFieldTrialEnabledName, 25);
79 }
80
81 void SetupPreReadFieldTrial() { 70 void SetupPreReadFieldTrial() {
82 // The chrome executable will have set (or not) an environment variable with 71 // The chrome executable will have set (or not) an environment variable with
83 // the group name into which this client belongs. 72 // the group name into which this client belongs.
84 std::string group; 73 std::string group;
85 scoped_ptr<base::Environment> env(base::Environment::Create()); 74 scoped_ptr<base::Environment> env(base::Environment::Create());
86 if (!env->GetVar(chrome::kPreReadEnvironmentVariable, &group) || 75 if (!env->GetVar(chrome::kPreReadEnvironmentVariable, &group) ||
87 group.empty()) { 76 group.empty()) {
88 return; 77 return;
89 } 78 }
90 79
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 115
127 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line, 116 void SetupDesktopFieldTrials(const CommandLine& parsed_command_line,
128 const base::Time& install_time, 117 const base::Time& install_time,
129 PrefService* local_state) { 118 PrefService* local_state) {
130 prerender::ConfigurePrerender(parsed_command_line); 119 prerender::ConfigurePrerender(parsed_command_line);
131 AutoLaunchChromeFieldTrial(); 120 AutoLaunchChromeFieldTrial();
132 OmniboxFieldTrial::ActivateStaticTrials(); 121 OmniboxFieldTrial::ActivateStaticTrials();
133 SetupInfiniteCacheFieldTrial(); 122 SetupInfiniteCacheFieldTrial();
134 DisableShowProfileSwitcherTrialIfNecessary(); 123 DisableShowProfileSwitcherTrialIfNecessary();
135 SetupShowAppLauncherPromoFieldTrial(local_state); 124 SetupShowAppLauncherPromoFieldTrial(local_state);
136 SetupLowLatencyFlashAudioFieldTrial();
137 SetupPreReadFieldTrial(); 125 SetupPreReadFieldTrial();
138 } 126 }
139 127
140 } // namespace chrome 128 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698