OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/chrome/browser/web/chrome_web_client.h" | 5 #include "ios/chrome/browser/web/chrome_web_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "components/dom_distiller/core/url_constants.h" | 12 #include "components/dom_distiller/core/url_constants.h" |
13 #include "components/prefs/pref_service.h" | 13 #include "components/prefs/pref_service.h" |
14 #include "components/strings/grit/components_strings.h" | 14 #include "components/strings/grit/components_strings.h" |
15 #include "components/task_scheduler_util/initialization/browser_util.h" | 15 #include "components/task_scheduler_util/browser/initialization.h" |
16 #include "components/task_scheduler_util/variations/browser_variations_util.h" | |
17 #include "components/version_info/version_info.h" | 16 #include "components/version_info/version_info.h" |
18 #include "ios/chrome/browser/application_context.h" | 17 #include "ios/chrome/browser/application_context.h" |
19 #include "ios/chrome/browser/browser_about_rewriter.h" | 18 #include "ios/chrome/browser/browser_about_rewriter.h" |
20 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 19 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
21 #include "ios/chrome/browser/chrome_switches.h" | 20 #include "ios/chrome/browser/chrome_switches.h" |
22 #include "ios/chrome/browser/chrome_url_constants.h" | 21 #include "ios/chrome/browser/chrome_url_constants.h" |
23 #include "ios/chrome/browser/experimental_flags.h" | 22 #include "ios/chrome/browser/experimental_flags.h" |
24 #include "ios/chrome/browser/ios_chrome_main_parts.h" | 23 #include "ios/chrome/browser/ios_chrome_main_parts.h" |
25 #include "ios/chrome/browser/pref_names.h" | 24 #include "ios/chrome/browser/pref_names.h" |
26 #include "ios/chrome/browser/ssl/ios_ssl_error_handler.h" | 25 #include "ios/chrome/browser/ssl/ios_ssl_error_handler.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 overridable, callback); | 169 overridable, callback); |
171 } | 170 } |
172 | 171 |
173 void ChromeWebClient::GetTaskSchedulerInitializationParams( | 172 void ChromeWebClient::GetTaskSchedulerInitializationParams( |
174 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 173 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
175 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 174 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
176 index_to_traits_callback) { | 175 index_to_traits_callback) { |
177 DCHECK(params_vector); | 176 DCHECK(params_vector); |
178 DCHECK(index_to_traits_callback); | 177 DCHECK(index_to_traits_callback); |
179 // If this call fails, web will fall back to the default params. | 178 // If this call fails, web will fall back to the default params. |
180 *params_vector = task_scheduler_util::variations:: | 179 *params_vector = |
181 GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 180 task_scheduler_util::GetBrowserWorkerPoolParamsFromVariations(); |
182 *index_to_traits_callback = base::Bind( | 181 *index_to_traits_callback = |
183 &task_scheduler_util::initialization::BrowserWorkerPoolIndexForTraits); | 182 base::Bind(&task_scheduler_util::BrowserWorkerPoolIndexForTraits); |
184 } | 183 } |
185 | 184 |
186 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { | 185 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { |
187 task_scheduler_util::variations:: | 186 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); |
188 MaybePerformBrowserTaskSchedulerRedirection(); | |
189 } | 187 } |
OLD | NEW |