Index: chrome/browser/chrome_browser_main.cc |
=================================================================== |
--- chrome/browser/chrome_browser_main.cc (revision 114230) |
+++ chrome/browser/chrome_browser_main.cc (working copy) |
@@ -29,6 +29,7 @@ |
#include "base/values.h" |
#include "build/build_config.h" |
#include "chrome/browser/about_flags.h" |
+#include "chrome/browser/auto_launch_trial.h" |
#include "chrome/browser/background/background_mode_manager.h" |
#include "chrome/browser/browser_process_impl.h" |
#include "chrome/browser/browser_shutdown.h" |
@@ -1096,6 +1097,20 @@ |
} |
} |
+void ChromeBrowserMainParts::AutoLaunchChromeFieldTrial() { |
+ std::string brand; |
+ google_util::GetBrand(&brand); |
+ |
+ // Create a 100% field trial based on the brand code. |
+ if (LowerCaseEqualsASCII(brand, "rngp")) { |
+ base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, |
+ kAutoLaunchTrialAutoLaunchGroup); |
+ } else if (LowerCaseEqualsASCII(brand, "rngq")) { |
+ base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrialName, |
+ kAutoLaunchTrialControlGroup); |
+ } |
+} |
+ |
// ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
// Initializes the metrics service with the configuration for this process, |
@@ -1156,6 +1171,7 @@ |
WarmConnectionFieldTrial(); |
PredictorFieldTrial(); |
DefaultAppsFieldTrial(); |
+ AutoLaunchChromeFieldTrial(); |
sync_promo_trial::Activate(); |
} |