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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 8729009: Implement an AutoLaunch experiment for Chrome for certain brand codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 111708)
+++ 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"
@@ -1079,6 +1080,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(kAutoLaunchTrial_Name,
+ kAutoLaunchTrial_AutoLaunchGroup);
+ } else if (LowerCaseEqualsASCII(brand, "rngq")) {
+ base::FieldTrialList::CreateFieldTrial(kAutoLaunchTrial_Name,
+ kAutoLaunchTrial_ControlGroup);
+ }
+}
+
// ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related --------------
// Initializes the metrics service with the configuration for this process,
@@ -1139,6 +1154,7 @@
WarmConnectionFieldTrial();
PredictorFieldTrial();
DefaultAppsFieldTrial();
+ AutoLaunchChromeFieldTrial();
}
// -----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698