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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 637 |
638 #if !defined(GOOGLE_CHROME_BUILD) | 638 #if defined(FIELDTRIAL_TESTING_ENABLED) |
639 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && | 639 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && |
640 !command_line->HasSwitch(switches::kForceFieldTrials) && | 640 !command_line->HasSwitch(switches::kForceFieldTrials) && |
641 !command_line->HasSwitch(switches::kVariationsServerURL)) | 641 !command_line->HasSwitch(switches::kVariationsServerURL)) |
642 chrome_variations::AssociateDefaultFieldTrialConfig(); | 642 chrome_variations::AssociateDefaultFieldTrialConfig(); |
643 #endif // !defined(GOOGLE_CHROME_BUILD) | 643 #endif // defined(FIELDTRIAL_TESTING_ENABLED) |
644 | 644 |
645 if (command_line->HasSwitch(switches::kForceVariationIds)) { | 645 if (command_line->HasSwitch(switches::kForceVariationIds)) { |
646 // Create default variation ids which will always be included in the | 646 // Create default variation ids which will always be included in the |
647 // X-Client-Data request header. | 647 // X-Client-Data request header. |
648 variations::VariationsHttpHeaderProvider* provider = | 648 variations::VariationsHttpHeaderProvider* provider = |
649 variations::VariationsHttpHeaderProvider::GetInstance(); | 649 variations::VariationsHttpHeaderProvider::GetInstance(); |
650 bool result = provider->SetDefaultVariationIds( | 650 bool result = provider->SetDefaultVariationIds( |
651 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); | 651 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); |
652 CHECK(result) << "Invalid --" << switches::kForceVariationIds | 652 CHECK(result) << "Invalid --" << switches::kForceVariationIds |
653 << " list specified."; | 653 << " list specified."; |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 chromeos::CrosSettings::Shutdown(); | 1800 chromeos::CrosSettings::Shutdown(); |
1801 #endif // defined(OS_CHROMEOS) | 1801 #endif // defined(OS_CHROMEOS) |
1802 #endif // defined(OS_ANDROID) | 1802 #endif // defined(OS_ANDROID) |
1803 } | 1803 } |
1804 | 1804 |
1805 // Public members: | 1805 // Public members: |
1806 | 1806 |
1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1808 chrome_extra_parts_.push_back(parts); | 1808 chrome_extra_parts_.push_back(parts); |
1809 } | 1809 } |
OLD | NEW |