OLD | NEW |
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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 627 |
628 // Create field trials without activating them, so that this behaves in a | 628 // Create field trials without activating them, so that this behaves in a |
629 // consistent manner with field trials created from the server. | 629 // consistent manner with field trials created from the server. |
630 bool result = base::FieldTrialList::CreateTrialsFromString( | 630 bool result = base::FieldTrialList::CreateTrialsFromString( |
631 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), | 631 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), |
632 base::FieldTrialList::DONT_ACTIVATE_TRIALS, | 632 base::FieldTrialList::DONT_ACTIVATE_TRIALS, |
633 unforceable_field_trials); | 633 unforceable_field_trials); |
634 CHECK(result) << "Invalid --" << switches::kForceFieldTrials | 634 CHECK(result) << "Invalid --" << switches::kForceFieldTrials |
635 << " list specified."; | 635 << " list specified."; |
636 } | 636 } |
| 637 |
| 638 #if !defined(GOOGLE_CHROME_BUILD) |
| 639 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && |
| 640 !command_line->HasSwitch(switches::kForceFieldTrials) && |
| 641 !command_line->HasSwitch(switches::kVariationsServerURL)) |
| 642 chrome_variations::AssociateDefaultFieldTrialConfig(); |
| 643 #endif // !defined(GOOGLE_CHROME_BUILD) |
| 644 |
637 if (command_line->HasSwitch(switches::kForceVariationIds)) { | 645 if (command_line->HasSwitch(switches::kForceVariationIds)) { |
638 // Create default variation ids which will always be included in the | 646 // Create default variation ids which will always be included in the |
639 // X-Client-Data request header. | 647 // X-Client-Data request header. |
640 variations::VariationsHttpHeaderProvider* provider = | 648 variations::VariationsHttpHeaderProvider* provider = |
641 variations::VariationsHttpHeaderProvider::GetInstance(); | 649 variations::VariationsHttpHeaderProvider::GetInstance(); |
642 bool result = provider->SetDefaultVariationIds( | 650 bool result = provider->SetDefaultVariationIds( |
643 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); | 651 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); |
644 CHECK(result) << "Invalid --" << switches::kForceVariationIds | 652 CHECK(result) << "Invalid --" << switches::kForceVariationIds |
645 << " list specified."; | 653 << " list specified."; |
646 metrics->AddSyntheticTrialObserver(provider); | 654 metrics->AddSyntheticTrialObserver(provider); |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 chromeos::CrosSettings::Shutdown(); | 1799 chromeos::CrosSettings::Shutdown(); |
1792 #endif // defined(OS_CHROMEOS) | 1800 #endif // defined(OS_CHROMEOS) |
1793 #endif // defined(OS_ANDROID) | 1801 #endif // defined(OS_ANDROID) |
1794 } | 1802 } |
1795 | 1803 |
1796 // Public members: | 1804 // Public members: |
1797 | 1805 |
1798 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1806 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1799 chrome_extra_parts_.push_back(parts); | 1807 chrome_extra_parts_.push_back(parts); |
1800 } | 1808 } |
OLD | NEW |