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

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

Issue 1200383005: Activate prepopulated fieldtrials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@codegen_field_trials
Patch Set: fixup 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 626
627 // Create field trials without activating them, so that this behaves in a 627 // Create field trials without activating them, so that this behaves in a
628 // consistent manner with field trials created from the server. 628 // consistent manner with field trials created from the server.
629 bool result = base::FieldTrialList::CreateTrialsFromString( 629 bool result = base::FieldTrialList::CreateTrialsFromString(
630 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), 630 command_line->GetSwitchValueASCII(switches::kForceFieldTrials),
631 base::FieldTrialList::DONT_ACTIVATE_TRIALS, 631 base::FieldTrialList::DONT_ACTIVATE_TRIALS,
632 unforceable_field_trials); 632 unforceable_field_trials);
633 CHECK(result) << "Invalid --" << switches::kForceFieldTrials 633 CHECK(result) << "Invalid --" << switches::kForceFieldTrials
634 << " list specified."; 634 << " list specified.";
635 } 635 }
636
637 if (command_line->HasSwitch(switches::kEnableFieldTrialTestingConfig)) {
Alexei Svitkine (slow) 2015/07/10 15:24:32 Didn't we want this to be on by default for Chromi
danduong 2015/07/10 16:24:20 This is a good topic of discussion. My first thoug
Alexei Svitkine (slow) 2015/07/10 19:05:12 Default for unofficial builds but disable-able fro
638 bool result = chrome_variations::AssociateParamsFromFieldTrialConfig();
639 CHECK(result) << " Enabling field trial testing configuration failed.";
640 }
641
636 if (command_line->HasSwitch(switches::kForceVariationIds)) { 642 if (command_line->HasSwitch(switches::kForceVariationIds)) {
637 // Create default variation ids which will always be included in the 643 // Create default variation ids which will always be included in the
638 // X-Client-Data request header. 644 // X-Client-Data request header.
639 variations::VariationsHttpHeaderProvider* provider = 645 variations::VariationsHttpHeaderProvider* provider =
640 variations::VariationsHttpHeaderProvider::GetInstance(); 646 variations::VariationsHttpHeaderProvider::GetInstance();
641 bool result = provider->SetDefaultVariationIds( 647 bool result = provider->SetDefaultVariationIds(
642 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); 648 command_line->GetSwitchValueASCII(switches::kForceVariationIds));
643 CHECK(result) << "Invalid --" << switches::kForceVariationIds 649 CHECK(result) << "Invalid --" << switches::kForceVariationIds
644 << " list specified."; 650 << " list specified.";
645 metrics->AddSyntheticTrialObserver(provider); 651 metrics->AddSyntheticTrialObserver(provider);
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 chromeos::CrosSettings::Shutdown(); 1786 chromeos::CrosSettings::Shutdown();
1781 #endif // defined(OS_CHROMEOS) 1787 #endif // defined(OS_CHROMEOS)
1782 #endif // defined(OS_ANDROID) 1788 #endif // defined(OS_ANDROID)
1783 } 1789 }
1784 1790
1785 // Public members: 1791 // Public members:
1786 1792
1787 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1793 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1788 chrome_extra_parts_.push_back(parts); 1794 chrome_extra_parts_.push_back(parts);
1789 } 1795 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/variations/variations_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698