| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 792 |
| 793 // This will be called after the command-line has been mutated by about:flags | 793 // This will be called after the command-line has been mutated by about:flags |
| 794 void ChromeBrowserMainParts::SetupFieldTrials() { | 794 void ChromeBrowserMainParts::SetupFieldTrials() { |
| 795 TRACE_EVENT0("startup", "ChromeBrowserMainParts::SetupFieldTrials"); | 795 TRACE_EVENT0("startup", "ChromeBrowserMainParts::SetupFieldTrials"); |
| 796 | 796 |
| 797 // Initialize FieldTrialList to support FieldTrials that use one-time | 797 // Initialize FieldTrialList to support FieldTrials that use one-time |
| 798 // randomization. | 798 // randomization. |
| 799 DCHECK(!field_trial_list_); | 799 DCHECK(!field_trial_list_); |
| 800 field_trial_list_.reset( | 800 field_trial_list_.reset( |
| 801 new base::FieldTrialList(browser_process_->GetMetricsServicesManager() | 801 new base::FieldTrialList(browser_process_->GetMetricsServicesManager() |
| 802 ->CreateEntropyProvider() | 802 ->CreateEntropyProvider())); |
| 803 .release())); | |
| 804 | 803 |
| 805 const base::CommandLine* command_line = | 804 const base::CommandLine* command_line = |
| 806 base::CommandLine::ForCurrentProcess(); | 805 base::CommandLine::ForCurrentProcess(); |
| 807 if (command_line->HasSwitch(switches::kEnableBenchmarking) || | 806 if (command_line->HasSwitch(switches::kEnableBenchmarking) || |
| 808 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)) { | 807 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)) { |
| 809 base::FieldTrial::EnableBenchmarking(); | 808 base::FieldTrial::EnableBenchmarking(); |
| 810 } | 809 } |
| 811 | 810 |
| 812 if (command_line->HasSwitch(switches::kForceFieldTrialParams)) { | 811 if (command_line->HasSwitch(switches::kForceFieldTrialParams)) { |
| 813 bool result = chrome_variations::AssociateParamsFromString( | 812 bool result = chrome_variations::AssociateParamsFromString( |
| (...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 chromeos::CrosSettings::Shutdown(); | 2215 chromeos::CrosSettings::Shutdown(); |
| 2217 #endif // defined(OS_CHROMEOS) | 2216 #endif // defined(OS_CHROMEOS) |
| 2218 #endif // defined(OS_ANDROID) | 2217 #endif // defined(OS_ANDROID) |
| 2219 } | 2218 } |
| 2220 | 2219 |
| 2221 // Public members: | 2220 // Public members: |
| 2222 | 2221 |
| 2223 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2222 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2224 chrome_extra_parts_.push_back(parts); | 2223 chrome_extra_parts_.push_back(parts); |
| 2225 } | 2224 } |
| OLD | NEW |