| 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 |
| 911 variations_service->CreateTrialsFromSeed(feature_list.get()); | 911 bool has_seed = variations_service && |
| 912 variations_service->CreateTrialsFromSeed(feature_list.get()); |
| 913 |
| 914 browser_field_trials_.SetupFeatureControllingFieldTrials(has_seed, |
| 915 feature_list.get()); |
| 912 | 916 |
| 913 base::FeatureList::SetInstance(std::move(feature_list)); | 917 base::FeatureList::SetInstance(std::move(feature_list)); |
| 914 | 918 |
| 915 // This must be called after |local_state_| is initialized. | 919 // This must be called after |local_state_| is initialized. |
| 916 browser_field_trials_.SetupFieldTrials(); | 920 browser_field_trials_.SetupFieldTrials(); |
| 917 | 921 |
| 918 // Enable Navigation Tracing only if a trace upload url is specified. | 922 // Enable Navigation Tracing only if a trace upload url is specified. |
| 919 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && | 923 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && |
| 920 command_line->HasSwitch(switches::kTraceUploadURL)) { | 924 command_line->HasSwitch(switches::kTraceUploadURL)) { |
| 921 tracing::SetupNavigationTracing(); | 925 tracing::SetupNavigationTracing(); |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2224 chromeos::CrosSettings::Shutdown(); | 2228 chromeos::CrosSettings::Shutdown(); |
| 2225 #endif // defined(OS_CHROMEOS) | 2229 #endif // defined(OS_CHROMEOS) |
| 2226 #endif // defined(OS_ANDROID) | 2230 #endif // defined(OS_ANDROID) |
| 2227 } | 2231 } |
| 2228 | 2232 |
| 2229 // Public members: | 2233 // Public members: |
| 2230 | 2234 |
| 2231 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2235 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2232 chrome_extra_parts_.push_back(parts); | 2236 chrome_extra_parts_.push_back(parts); |
| 2233 } | 2237 } |
| OLD | NEW |