Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2749303002: [reference - do not submit] Always create four pools in TaskSchedulerImpl. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3517 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 #else 3528 #else
3529 // Chrome's media remoting implementation depends on the Media Router 3529 // Chrome's media remoting implementation depends on the Media Router
3530 // infrastructure to identify remote sinks and provide the user interface for 3530 // infrastructure to identify remote sinks and provide the user interface for
3531 // sink selection. In the case where the Media Router is not present, simply 3531 // sink selection. In the case where the Media Router is not present, simply
3532 // drop the interface request. This will prevent code paths for media remoting 3532 // drop the interface request. This will prevent code paths for media remoting
3533 // in the renderer process from activating. 3533 // in the renderer process from activating.
3534 #endif 3534 #endif
3535 } 3535 }
3536 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3536 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
3537 3537
3538 void ChromeContentBrowserClient::GetTaskSchedulerInitializationParams( 3538 std::unique_ptr<base::TaskSchedulerInitParams>
3539 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 3539 ChromeContentBrowserClient::GetTaskSchedulerInitParams() {
3540 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 3540 return task_scheduler_util::GetBrowserTaskSchedulerInitParamsFromVariations();
3541 index_to_traits_callback) {
3542 DCHECK(params_vector);
3543 DCHECK(index_to_traits_callback);
3544 // If this call fails, content will fall back to the default params.
3545 *params_vector =
3546 task_scheduler_util::GetBrowserWorkerPoolParamsFromVariations();
3547 *index_to_traits_callback =
3548 base::Bind(&task_scheduler_util::BrowserWorkerPoolIndexForTraits);
3549 } 3541 }
3550 3542
3551 void ChromeContentBrowserClient:: 3543 void ChromeContentBrowserClient::
3552 PerformExperimentalTaskSchedulerRedirections() { 3544 PerformExperimentalTaskSchedulerRedirections() {
3553 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); 3545 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection();
3554 } 3546 }
3555 3547
3556 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3548 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3557 return variations::GetVariationParamValue( 3549 return variations::GetVariationParamValue(
3558 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3550 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3559 } 3551 }
3560 3552
3561 bool ChromeContentBrowserClient:: 3553 bool ChromeContentBrowserClient::
3562 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3554 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3563 return variations::GetVariationParamValue( 3555 return variations::GetVariationParamValue(
3564 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3556 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3565 } 3557 }
3566 3558
3567 // static 3559 // static
3568 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3560 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3569 const storage::QuotaSettings* settings) { 3561 const storage::QuotaSettings* settings) {
3570 g_default_quota_settings = settings; 3562 g_default_quota_settings = settings;
3571 } 3563 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/renderer/chrome_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698