| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 // randomization. | 558 // randomization. |
| 559 MetricsService* metrics = browser_process_->metrics_service(); | 559 MetricsService* metrics = browser_process_->metrics_service(); |
| 560 field_trial_list_.reset( | 560 field_trial_list_.reset( |
| 561 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); | 561 new base::FieldTrialList(metrics->CreateEntropyProvider().release())); |
| 562 | 562 |
| 563 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 563 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 564 if (command_line->HasSwitch(switches::kEnableBenchmarking)) | 564 if (command_line->HasSwitch(switches::kEnableBenchmarking)) |
| 565 base::FieldTrial::EnableBenchmarking(); | 565 base::FieldTrial::EnableBenchmarking(); |
| 566 | 566 |
| 567 // Ensure any field trials specified on the command line are initialized. | 567 // Ensure any field trials specified on the command line are initialized. |
| 568 // Also stop the metrics service so that we don't pollute UMA. | |
| 569 if (command_line->HasSwitch(switches::kForceFieldTrials)) { | 568 if (command_line->HasSwitch(switches::kForceFieldTrials)) { |
| 570 std::set<std::string> unforceable_field_trials; | 569 std::set<std::string> unforceable_field_trials; |
| 571 #if defined(OFFICIAL_BUILD) | 570 #if defined(OFFICIAL_BUILD) |
| 572 unforceable_field_trials.insert("SettingsEnforcement"); | 571 unforceable_field_trials.insert("SettingsEnforcement"); |
| 573 #endif // defined(OFFICIAL_BUILD) | 572 #endif // defined(OFFICIAL_BUILD) |
| 574 | 573 |
| 575 // Create field trials without activating them, so that this behaves in a | 574 // Create field trials without activating them, so that this behaves in a |
| 576 // consistent manner with field trials created from the server. | 575 // consistent manner with field trials created from the server. |
| 577 bool result = base::FieldTrialList::CreateTrialsFromString( | 576 bool result = base::FieldTrialList::CreateTrialsFromString( |
| 578 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), | 577 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 chromeos::CrosSettings::Shutdown(); | 1648 chromeos::CrosSettings::Shutdown(); |
| 1650 #endif | 1649 #endif |
| 1651 #endif | 1650 #endif |
| 1652 } | 1651 } |
| 1653 | 1652 |
| 1654 // Public members: | 1653 // Public members: |
| 1655 | 1654 |
| 1656 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1655 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1657 chrome_extra_parts_.push_back(parts); | 1656 chrome_extra_parts_.push_back(parts); |
| 1658 } | 1657 } |
| OLD | NEW |