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

Side by Side Diff: chrome/service/service_process.cc

Issue 2845913004: Remove TaskScheduler::CreateAndSetDefaultTaskScheduler(). (Closed)
Patch Set: fix-build-error Created 3 years, 7 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
« no previous file with comments | « base/threading/sequenced_worker_pool_unittest.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/service/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Initialize TaskScheduler and redirect SequencedWorkerPool tasks to it. 165 // Initialize TaskScheduler and redirect SequencedWorkerPool tasks to it.
166 using StandbyThreadPolicy = 166 using StandbyThreadPolicy =
167 base::SchedulerWorkerPoolParams::StandbyThreadPolicy; 167 base::SchedulerWorkerPoolParams::StandbyThreadPolicy;
168 constexpr int kMaxBackgroundThreads = 1; 168 constexpr int kMaxBackgroundThreads = 1;
169 constexpr int kMaxBackgroundBlockingThreads = 1; 169 constexpr int kMaxBackgroundBlockingThreads = 1;
170 constexpr int kMaxForegroundThreads = 3; 170 constexpr int kMaxForegroundThreads = 3;
171 constexpr int kMaxForegroundBlockingThreads = 3; 171 constexpr int kMaxForegroundBlockingThreads = 3;
172 constexpr base::TimeDelta kSuggestedReclaimTime = 172 constexpr base::TimeDelta kSuggestedReclaimTime =
173 base::TimeDelta::FromSeconds(30); 173 base::TimeDelta::FromSeconds(30);
174 174
175 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( 175 base::TaskScheduler::Create("CloudPrintServiceProcess");
176 "CloudPrintServiceProcess", 176 base::TaskScheduler::GetInstance()->Start(
177 {{StandbyThreadPolicy::LAZY, kMaxBackgroundThreads, 177 {{StandbyThreadPolicy::LAZY, kMaxBackgroundThreads,
178 kSuggestedReclaimTime}, 178 kSuggestedReclaimTime},
179 {StandbyThreadPolicy::LAZY, kMaxBackgroundBlockingThreads, 179 {StandbyThreadPolicy::LAZY, kMaxBackgroundBlockingThreads,
180 kSuggestedReclaimTime}, 180 kSuggestedReclaimTime},
181 {StandbyThreadPolicy::LAZY, kMaxForegroundThreads, 181 {StandbyThreadPolicy::LAZY, kMaxForegroundThreads,
182 kSuggestedReclaimTime}, 182 kSuggestedReclaimTime},
183 {StandbyThreadPolicy::LAZY, kMaxForegroundBlockingThreads, 183 {StandbyThreadPolicy::LAZY, kMaxForegroundBlockingThreads,
184 kSuggestedReclaimTime, 184 kSuggestedReclaimTime,
185 base::SchedulerBackwardCompatibility::INIT_COM_STA}}); 185 base::SchedulerBackwardCompatibility::INIT_COM_STA}});
186 186
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } else { 449 } else {
450 Shutdown(); 450 Shutdown();
451 } 451 }
452 } 452 }
453 } 453 }
454 454
455 ServiceProcess::~ServiceProcess() { 455 ServiceProcess::~ServiceProcess() {
456 Teardown(); 456 Teardown();
457 g_service_process = NULL; 457 g_service_process = NULL;
458 } 458 }
OLDNEW
« no previous file with comments | « base/threading/sequenced_worker_pool_unittest.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698