| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 field_trial_list_.reset( | 630 field_trial_list_.reset( |
| 631 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); | 631 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); |
| 632 | 632 |
| 633 const base::CommandLine* command_line = | 633 const base::CommandLine* command_line = |
| 634 base::CommandLine::ForCurrentProcess(); | 634 base::CommandLine::ForCurrentProcess(); |
| 635 if (command_line->HasSwitch(switches::kEnableBenchmarking) || | 635 if (command_line->HasSwitch(switches::kEnableBenchmarking) || |
| 636 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)) { | 636 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)) { |
| 637 base::FieldTrial::EnableBenchmarking(); | 637 base::FieldTrial::EnableBenchmarking(); |
| 638 } | 638 } |
| 639 | 639 |
| 640 if (command_line->HasSwitch(switches::kForceFieldTrialParams)) { |
| 641 variations::AssociateParamsFromString( |
| 642 command_line->GetSwitchValueASCII(switches::kForceFieldTrialParams)); |
| 643 } |
| 644 |
| 640 // Ensure any field trials specified on the command line are initialized. | 645 // Ensure any field trials specified on the command line are initialized. |
| 641 if (command_line->HasSwitch(switches::kForceFieldTrials)) { | 646 if (command_line->HasSwitch(switches::kForceFieldTrials)) { |
| 642 std::set<std::string> unforceable_field_trials; | 647 std::set<std::string> unforceable_field_trials; |
| 643 #if defined(OFFICIAL_BUILD) | 648 #if defined(OFFICIAL_BUILD) |
| 644 unforceable_field_trials.insert("SettingsEnforcement"); | 649 unforceable_field_trials.insert("SettingsEnforcement"); |
| 645 #endif // defined(OFFICIAL_BUILD) | 650 #endif // defined(OFFICIAL_BUILD) |
| 646 | 651 |
| 647 // Create field trials without activating them, so that this behaves in a | 652 // Create field trials without activating them, so that this behaves in a |
| 648 // consistent manner with field trials created from the server. | 653 // consistent manner with field trials created from the server. |
| 649 bool result = base::FieldTrialList::CreateTrialsFromString( | 654 bool result = base::FieldTrialList::CreateTrialsFromString( |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 chromeos::CrosSettings::Shutdown(); | 1775 chromeos::CrosSettings::Shutdown(); |
| 1771 #endif // defined(OS_CHROMEOS) | 1776 #endif // defined(OS_CHROMEOS) |
| 1772 #endif // defined(OS_ANDROID) | 1777 #endif // defined(OS_ANDROID) |
| 1773 } | 1778 } |
| 1774 | 1779 |
| 1775 // Public members: | 1780 // Public members: |
| 1776 | 1781 |
| 1777 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1782 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1778 chrome_extra_parts_.push_back(parts); | 1783 chrome_extra_parts_.push_back(parts); |
| 1779 } | 1784 } |
| OLD | NEW |