| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 // Create field trials without activating them, so that this behaves in a | 625 // Create field trials without activating them, so that this behaves in a |
| 626 // consistent manner with field trials created from the server. | 626 // consistent manner with field trials created from the server. |
| 627 bool result = base::FieldTrialList::CreateTrialsFromString( | 627 bool result = base::FieldTrialList::CreateTrialsFromString( |
| 628 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), | 628 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), |
| 629 base::FieldTrialList::DONT_ACTIVATE_TRIALS, | 629 base::FieldTrialList::DONT_ACTIVATE_TRIALS, |
| 630 unforceable_field_trials); | 630 unforceable_field_trials); |
| 631 CHECK(result) << "Invalid --" << switches::kForceFieldTrials | 631 CHECK(result) << "Invalid --" << switches::kForceFieldTrials |
| 632 << " list specified."; | 632 << " list specified."; |
| 633 } | 633 } |
| 634 |
| 635 if (command_line->HasSwitch(switches::kEnableFieldTrialTestingConfig)) { |
| 636 bool result = chrome_variations::AssociateParamsFromFieldTrialConfig(); |
| 637 CHECK(result) << " Enabling field trial testing configuration failed."; |
| 638 } |
| 639 |
| 634 if (command_line->HasSwitch(switches::kForceVariationIds)) { | 640 if (command_line->HasSwitch(switches::kForceVariationIds)) { |
| 635 // Create default variation ids which will always be included in the | 641 // Create default variation ids which will always be included in the |
| 636 // X-Client-Data request header. | 642 // X-Client-Data request header. |
| 637 variations::VariationsHttpHeaderProvider* provider = | 643 variations::VariationsHttpHeaderProvider* provider = |
| 638 variations::VariationsHttpHeaderProvider::GetInstance(); | 644 variations::VariationsHttpHeaderProvider::GetInstance(); |
| 639 bool result = provider->SetDefaultVariationIds( | 645 bool result = provider->SetDefaultVariationIds( |
| 640 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); | 646 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); |
| 641 CHECK(result) << "Invalid --" << switches::kForceVariationIds | 647 CHECK(result) << "Invalid --" << switches::kForceVariationIds |
| 642 << " list specified."; | 648 << " list specified."; |
| 643 metrics->AddSyntheticTrialObserver(provider); | 649 metrics->AddSyntheticTrialObserver(provider); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 chromeos::CrosSettings::Shutdown(); | 1769 chromeos::CrosSettings::Shutdown(); |
| 1764 #endif // defined(OS_CHROMEOS) | 1770 #endif // defined(OS_CHROMEOS) |
| 1765 #endif // defined(OS_ANDROID) | 1771 #endif // defined(OS_ANDROID) |
| 1766 } | 1772 } |
| 1767 | 1773 |
| 1768 // Public members: | 1774 // Public members: |
| 1769 | 1775 |
| 1770 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1776 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1771 chrome_extra_parts_.push_back(parts); | 1777 chrome_extra_parts_.push_back(parts); |
| 1772 } | 1778 } |
| OLD | NEW |