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

Unified Diff: chrome/browser/component_updater/pepper_flash_field_trial.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed some ooopss... Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/instant/instant_field_trial.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/pepper_flash_field_trial.cc
diff --git a/chrome/browser/component_updater/pepper_flash_field_trial.cc b/chrome/browser/component_updater/pepper_flash_field_trial.cc
index b624a6ecbd49aec0638d3c65ac8656e0ad63d594..7cea088318b13056480a00899f5b7b9fe82e009f 100644
--- a/chrome/browser/component_updater/pepper_flash_field_trial.cc
+++ b/chrome/browser/component_updater/pepper_flash_field_trial.cc
@@ -14,12 +14,14 @@ namespace {
const char* const kFieldTrialName = "PepperFlash";
const char* const kDisableGroupName = "DisableByDefault";
const char* const kEnableGroupName = "EnableByDefault";
+int g_disabled_group_number = -1;
void ActivateFieldTrial() {
// The field trial will expire on Jan 1st, 2014.
scoped_refptr<base::FieldTrial> trial(
- new base::FieldTrial(kFieldTrialName, 1000, kDisableGroupName,
- 2014, 1, 1));
+ base::FieldTrialList::FactoryGetFieldTrial(
+ kFieldTrialName, 1000, kDisableGroupName, 2014, 1, 1,
+ &g_disabled_group_number));
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kPpapiFlashFieldTrial)) {
@@ -55,5 +57,5 @@ bool PepperFlashFieldTrial::InEnableByDefaultGroup() {
int group = base::FieldTrialList::FindValue(kFieldTrialName);
return group != base::FieldTrial::kNotFinalized &&
- group != base::FieldTrial::kDefaultGroupNumber;
+ group != g_disabled_group_number;
}
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/instant/instant_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698