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 has_seed = false; |
|
Lei Zhang
2016/08/30 21:31:28
How about:
bool has_seed = variations_service &&
jwd
2016/08/30 21:46:24
Done.
| |
| 911 variations_service->CreateTrialsFromSeed(feature_list.get()); | 911 if (variations_service) { |
| 912 has_seed = variations_service->CreateTrialsFromSeed(feature_list.get()); | |
| 913 } | |
| 914 | |
| 915 browser_field_trials_.SetupFeatureControllingFieldTrials(has_seed, | |
| 916 feature_list.get()); | |
| 912 | 917 |
| 913 base::FeatureList::SetInstance(std::move(feature_list)); | 918 base::FeatureList::SetInstance(std::move(feature_list)); |
| 914 | 919 |
| 915 // This must be called after |local_state_| is initialized. | 920 // This must be called after |local_state_| is initialized. |
| 916 browser_field_trials_.SetupFieldTrials(); | 921 browser_field_trials_.SetupFieldTrials(); |
| 917 | 922 |
| 918 // Enable Navigation Tracing only if a trace upload url is specified. | 923 // Enable Navigation Tracing only if a trace upload url is specified. |
| 919 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && | 924 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && |
| 920 command_line->HasSwitch(switches::kTraceUploadURL)) { | 925 command_line->HasSwitch(switches::kTraceUploadURL)) { |
| 921 tracing::SetupNavigationTracing(); | 926 tracing::SetupNavigationTracing(); |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2230 chromeos::CrosSettings::Shutdown(); | 2235 chromeos::CrosSettings::Shutdown(); |
| 2231 #endif // defined(OS_CHROMEOS) | 2236 #endif // defined(OS_CHROMEOS) |
| 2232 #endif // defined(OS_ANDROID) | 2237 #endif // defined(OS_ANDROID) |
| 2233 } | 2238 } |
| 2234 | 2239 |
| 2235 // Public members: | 2240 // Public members: |
| 2236 | 2241 |
| 2237 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2242 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2238 chrome_extra_parts_.push_back(parts); | 2243 chrome_extra_parts_.push_back(parts); |
| 2239 } | 2244 } |
| OLD | NEW |