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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1266113002: Add a new gyp flag: fieldtrial_testing_like_official_build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index d80d4e405e7125cde7d6608bc80c32e8a0b99053..8b89807dd0807a63a52dc167776526928f62b574 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -149,6 +149,13 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/strings/grit/app_locale_settings.h"
+#if OFFICIAL_BUILD
+#undef FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD
+#define FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD 1
+#elif !defined(FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD)
+#define FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD 0
+#endif
+
#if defined(OS_ANDROID)
#include "chrome/browser/android/dev_tools_discovery_provider_android.h"
#include "chrome/browser/metrics/thread_watcher_android.h"
@@ -635,12 +642,12 @@ void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
<< " list specified.";
}
-#if !defined(GOOGLE_CHROME_BUILD)
+#if !FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD
if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) &&
!command_line->HasSwitch(switches::kForceFieldTrials) &&
!command_line->HasSwitch(switches::kVariationsServerURL))
chrome_variations::AssociateDefaultFieldTrialConfig();
-#endif // !defined(GOOGLE_CHROME_BUILD)
+#endif // !FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD
if (command_line->HasSwitch(switches::kForceVariationIds)) {
// Create default variation ids which will always be included in the
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698