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

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

Issue 2285633003: Test SequencedWorkerPool with redirection to the TaskScheduler. (Closed)
Patch Set: Rewrote everything Created 4 years, 3 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_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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 DCHECK_EQ(WORKER_POOL_COUNT, params_vector.size()); 443 DCHECK_EQ(WORKER_POOL_COUNT, params_vector.size());
444 444
445 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( 445 base::TaskScheduler::CreateAndSetDefaultTaskScheduler(
446 params_vector, base::Bind(WorkerPoolIndexForTraits)); 446 params_vector, base::Bind(WorkerPoolIndexForTraits));
447 447
448 // TODO(gab): Remove this when http://crbug.com/622400 concludes. 448 // TODO(gab): Remove this when http://crbug.com/622400 concludes.
449 const auto sequenced_worker_pool_param = 449 const auto sequenced_worker_pool_param =
450 variation_params.find("RedirectSequencedWorkerPools"); 450 variation_params.find("RedirectSequencedWorkerPools");
451 if (sequenced_worker_pool_param != variation_params.end() && 451 if (sequenced_worker_pool_param != variation_params.end() &&
452 sequenced_worker_pool_param->second == "true") { 452 sequenced_worker_pool_param->second == "true") {
453 base::SequencedWorkerPool:: 453 base::SequencedWorkerPool::RedirectToTaskSchedulerForProcess();
454 RedirectSequencedWorkerPoolsToTaskSchedulerForProcess();
455 } 454 }
456 } 455 }
457 456
458 // Returns the new local state object, guaranteed non-NULL. 457 // Returns the new local state object, guaranteed non-NULL.
459 // |local_state_task_runner| must be a shutdown-blocking task runner. 458 // |local_state_task_runner| must be a shutdown-blocking task runner.
460 PrefService* InitializeLocalState( 459 PrefService* InitializeLocalState(
461 base::SequencedTaskRunner* local_state_task_runner, 460 base::SequencedTaskRunner* local_state_task_runner,
462 const base::CommandLine& parsed_command_line) { 461 const base::CommandLine& parsed_command_line) {
463 TRACE_EVENT0("startup", "ChromeBrowserMainParts::InitializeLocalState") 462 TRACE_EVENT0("startup", "ChromeBrowserMainParts::InitializeLocalState")
464 463
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 chromeos::CrosSettings::Shutdown(); 2208 chromeos::CrosSettings::Shutdown();
2210 #endif // defined(OS_CHROMEOS) 2209 #endif // defined(OS_CHROMEOS)
2211 #endif // defined(OS_ANDROID) 2210 #endif // defined(OS_ANDROID)
2212 } 2211 }
2213 2212
2214 // Public members: 2213 // Public members:
2215 2214
2216 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2215 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2217 chrome_extra_parts_.push_back(parts); 2216 chrome_extra_parts_.push_back(parts);
2218 } 2217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698