Chromium Code Reviews| 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 900 #if defined(FIELDTRIAL_TESTING_ENABLED) | 900 #if defined(FIELDTRIAL_TESTING_ENABLED) |
| 901 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && | 901 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && |
| 902 !command_line->HasSwitch(switches::kForceFieldTrials) && | 902 !command_line->HasSwitch(switches::kForceFieldTrials) && |
| 903 !command_line->HasSwitch(variations::switches::kVariationsServerURL)) { | 903 !command_line->HasSwitch(variations::switches::kVariationsServerURL)) { |
| 904 chrome_variations::AssociateDefaultFieldTrialConfig(feature_list.get()); | 904 chrome_variations::AssociateDefaultFieldTrialConfig(feature_list.get()); |
| 905 } | 905 } |
| 906 #endif // defined(FIELDTRIAL_TESTING_ENABLED) | 906 #endif // defined(FIELDTRIAL_TESTING_ENABLED) |
| 907 | 907 |
| 908 variations::VariationsService* variations_service = | 908 variations::VariationsService* variations_service = |
| 909 browser_process_->variations_service(); | 909 browser_process_->variations_service(); |
| 910 if (variations_service) | 910 bool was_a_seed_applied = false; |
|
Alexei Svitkine (slow)
2016/08/30 18:17:05
Nit: has_seed
jwd
2016/08/30 18:59:41
Done.
| |
| 911 variations_service->CreateTrialsFromSeed(feature_list.get()); | 911 if (variations_service) { |
| 912 was_a_seed_applied = | |
| 913 variations_service->CreateTrialsFromSeed(feature_list.get()); | |
| 914 } | |
| 915 | |
| 916 browser_field_trials_.SetupFeatureControllingFieldTrials(was_a_seed_applied, | |
| 917 feature_list.get()); | |
| 912 | 918 |
| 913 base::FeatureList::SetInstance(std::move(feature_list)); | 919 base::FeatureList::SetInstance(std::move(feature_list)); |
| 914 | 920 |
| 915 // This must be called after |local_state_| is initialized. | 921 // This must be called after |local_state_| is initialized. |
| 916 browser_field_trials_.SetupFieldTrials(); | 922 browser_field_trials_.SetupFieldTrials(); |
| 917 | 923 |
| 918 // Enable Navigation Tracing only if a trace upload url is specified. | 924 // Enable Navigation Tracing only if a trace upload url is specified. |
| 919 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && | 925 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && |
| 920 command_line->HasSwitch(switches::kTraceUploadURL)) { | 926 command_line->HasSwitch(switches::kTraceUploadURL)) { |
| 921 tracing::SetupNavigationTracing(); | 927 tracing::SetupNavigationTracing(); |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2230 chromeos::CrosSettings::Shutdown(); | 2236 chromeos::CrosSettings::Shutdown(); |
| 2231 #endif // defined(OS_CHROMEOS) | 2237 #endif // defined(OS_CHROMEOS) |
| 2232 #endif // defined(OS_ANDROID) | 2238 #endif // defined(OS_ANDROID) |
| 2233 } | 2239 } |
| 2234 | 2240 |
| 2235 // Public members: | 2241 // Public members: |
| 2236 | 2242 |
| 2237 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2243 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2238 chrome_extra_parts_.push_back(parts); | 2244 chrome_extra_parts_.push_back(parts); |
| 2239 } | 2245 } |
| OLD | NEW |