| 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_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 #include "components/prefs/pref_service.h" | 141 #include "components/prefs/pref_service.h" |
| 142 #include "components/prefs/scoped_user_pref_update.h" | 142 #include "components/prefs/scoped_user_pref_update.h" |
| 143 #include "components/rappor/public/rappor_utils.h" | 143 #include "components/rappor/public/rappor_utils.h" |
| 144 #include "components/rappor/rappor_recorder_impl.h" | 144 #include "components/rappor/rappor_recorder_impl.h" |
| 145 #include "components/rappor/rappor_service_impl.h" | 145 #include "components/rappor/rappor_service_impl.h" |
| 146 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 146 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
| 147 #include "components/security_interstitials/core/ssl_error_ui.h" | 147 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 148 #include "components/signin/core/common/profile_management_switches.h" | 148 #include "components/signin/core/common/profile_management_switches.h" |
| 149 #include "components/spellcheck/spellcheck_build_features.h" | 149 #include "components/spellcheck/spellcheck_build_features.h" |
| 150 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 150 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
| 151 #include "components/task_scheduler_util/browser/initialization.h" |
| 151 #include "components/task_scheduler_util/common/variations_util.h" | 152 #include "components/task_scheduler_util/common/variations_util.h" |
| 152 #include "components/task_scheduler_util/initialization/browser_util.h" | |
| 153 #include "components/task_scheduler_util/variations/browser_variations_util.h" | |
| 154 #include "components/translate/core/common/translate_switches.h" | 153 #include "components/translate/core/common/translate_switches.h" |
| 155 #include "components/url_formatter/url_fixer.h" | 154 #include "components/url_formatter/url_fixer.h" |
| 156 #include "components/variations/variations_associated_data.h" | 155 #include "components/variations/variations_associated_data.h" |
| 157 #include "components/version_info/version_info.h" | 156 #include "components/version_info/version_info.h" |
| 158 #include "content/public/browser/browser_child_process_host.h" | 157 #include "content/public/browser/browser_child_process_host.h" |
| 159 #include "content/public/browser/browser_main_parts.h" | 158 #include "content/public/browser/browser_main_parts.h" |
| 160 #include "content/public/browser/browser_ppapi_host.h" | 159 #include "content/public/browser/browser_ppapi_host.h" |
| 161 #include "content/public/browser/browser_thread.h" | 160 #include "content/public/browser/browser_thread.h" |
| 162 #include "content/public/browser/browser_url_handler.h" | 161 #include "content/public/browser/browser_url_handler.h" |
| 163 #include "content/public/browser/child_process_data.h" | 162 #include "content/public/browser/child_process_data.h" |
| (...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3339 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3338 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| 3340 | 3339 |
| 3341 void ChromeContentBrowserClient::GetTaskSchedulerInitializationParams( | 3340 void ChromeContentBrowserClient::GetTaskSchedulerInitializationParams( |
| 3342 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 3341 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
| 3343 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 3342 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 3344 index_to_traits_callback) { | 3343 index_to_traits_callback) { |
| 3345 DCHECK(params_vector); | 3344 DCHECK(params_vector); |
| 3346 DCHECK(index_to_traits_callback); | 3345 DCHECK(index_to_traits_callback); |
| 3347 // If this call fails, content will fall back to the default params. | 3346 // If this call fails, content will fall back to the default params. |
| 3348 *params_vector = | 3347 *params_vector = |
| 3349 task_scheduler_util::variations:: | 3348 task_scheduler_util::GetBrowserWorkerPoolParamsFromVariations(); |
| 3350 GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 3349 *index_to_traits_callback = |
| 3351 *index_to_traits_callback = base::Bind(&task_scheduler_util::initialization:: | 3350 base::Bind(&task_scheduler_util::BrowserWorkerPoolIndexForTraits); |
| 3352 BrowserWorkerPoolIndexForTraits); | |
| 3353 } | 3351 } |
| 3354 | 3352 |
| 3355 void ChromeContentBrowserClient:: | 3353 void ChromeContentBrowserClient:: |
| 3356 PerformExperimentalTaskSchedulerRedirections() { | 3354 PerformExperimentalTaskSchedulerRedirections() { |
| 3357 task_scheduler_util::variations:: | 3355 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); |
| 3358 MaybePerformBrowserTaskSchedulerRedirection(); | |
| 3359 } | 3356 } |
| 3360 | 3357 |
| 3361 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3358 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
| 3362 return variations::GetVariationParamValue( | 3359 return variations::GetVariationParamValue( |
| 3363 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3360 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
| 3364 } | 3361 } |
| 3365 | 3362 |
| 3366 bool ChromeContentBrowserClient:: | 3363 bool ChromeContentBrowserClient:: |
| 3367 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3364 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3368 return variations::GetVariationParamValue( | 3365 return variations::GetVariationParamValue( |
| 3369 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3366 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3370 } | 3367 } |
| OLD | NEW |