| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 if (command_line->HasSwitch(switches::kForceFieldTrials)) { | 587 if (command_line->HasSwitch(switches::kForceFieldTrials)) { |
| 588 std::string persistent = command_line->GetSwitchValueASCII( | 588 std::string persistent = command_line->GetSwitchValueASCII( |
| 589 switches::kForceFieldTrials); | 589 switches::kForceFieldTrials); |
| 590 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); | 590 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); |
| 591 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials << | 591 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials << |
| 592 " list specified."; | 592 " list specified."; |
| 593 } | 593 } |
| 594 #endif // NDEBUG | 594 #endif // NDEBUG |
| 595 | 595 |
| 596 VariationsService* variations_service = VariationsService::GetInstance(); | 596 VariationsService* variations_service = VariationsService::GetInstance(); |
| 597 variations_service->LoadVariationsSeed(browser_process_->local_state()); | 597 variations_service->CreateTrialsFromSeed(browser_process_->local_state()); |
| 598 | 598 |
| 599 SetupFieldTrials(metrics->recording_active(), | 599 SetupFieldTrials(metrics->recording_active(), |
| 600 local_state_->IsManagedPreference( | 600 local_state_->IsManagedPreference( |
| 601 prefs::kMaxConnectionsPerProxy)); | 601 prefs::kMaxConnectionsPerProxy)); |
| 602 | 602 |
| 603 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 603 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
| 604 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 604 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
| 605 // Even though base::Bind does AddRef and Release, the object will not be | 605 // Even though base::Bind does AddRef and Release, the object will not be |
| 606 // deleted after the Task is executed. | 606 // deleted after the Task is executed. |
| 607 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 607 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2019 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2019 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 2020 uma_name += "_XP"; | 2020 uma_name += "_XP"; |
| 2021 | 2021 |
| 2022 uma_name += "_PreRead_"; | 2022 uma_name += "_PreRead_"; |
| 2023 uma_name += pre_read_percentage; | 2023 uma_name += pre_read_percentage; |
| 2024 AddPreReadHistogramTime(uma_name.c_str(), time); | 2024 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2025 } | 2025 } |
| 2026 #endif | 2026 #endif |
| 2027 #endif | 2027 #endif |
| 2028 } | 2028 } |
| OLD | NEW |