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

Side by Side Diff: content/child/child_process.cc

Issue 2729523006: Remove the |max_threads| argument from CreateAndSetSimpleTaskScheduler(). (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
« no previous file with comments | « components/cronet/ios/cronet_environment.mm ('k') | remoting/client/ios/app_runtime.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 "content/child/child_process.h" 5 #include "content/child/child_process.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 base::StatisticsRecorder::Initialize(); 50 base::StatisticsRecorder::Initialize();
51 51
52 // Initialize TaskScheduler if not already done. A TaskScheduler may already 52 // Initialize TaskScheduler if not already done. A TaskScheduler may already
53 // exist when ChildProcess is instantiated in the browser process or in a 53 // exist when ChildProcess is instantiated in the browser process or in a
54 // test process. 54 // test process.
55 if (!base::TaskScheduler::GetInstance()) { 55 if (!base::TaskScheduler::GetInstance()) {
56 if (worker_pool_params.empty()) { 56 if (worker_pool_params.empty()) {
57 DCHECK(!worker_pool_index_for_traits_callback); 57 DCHECK(!worker_pool_index_for_traits_callback);
58 constexpr int kMaxThreads = 2; 58 constexpr int kMaxThreads = 2;
59 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxThreads); 59 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("Child");
robliao 2017/03/14 20:06:08 Nit: ContentChildProcess might be more specific.
fdoray 2017/03/15 14:24:18 Done.
60 } else { 60 } else {
61 DCHECK(worker_pool_index_for_traits_callback); 61 DCHECK(worker_pool_index_for_traits_callback);
62 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( 62 base::TaskScheduler::CreateAndSetDefaultTaskScheduler(
63 worker_pool_params, std::move(worker_pool_index_for_traits_callback)); 63 worker_pool_params, std::move(worker_pool_index_for_traits_callback));
64 } 64 }
65 65
66 DCHECK(base::TaskScheduler::GetInstance()); 66 DCHECK(base::TaskScheduler::GetInstance());
67 initialized_task_scheduler_ = true; 67 initialized_task_scheduler_ = true;
68 } 68 }
69 69
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 memset(&sa, 0, sizeof(sa)); 181 memset(&sa, 0, sizeof(sa));
182 sa.sa_handler = SigUSR1Handler; 182 sa.sa_handler = SigUSR1Handler;
183 sigaction(SIGUSR1, &sa, NULL); 183 sigaction(SIGUSR1, &sa, NULL);
184 184
185 pause(); 185 pause();
186 #endif // defined(OS_ANDROID) 186 #endif // defined(OS_ANDROID)
187 #endif // defined(OS_POSIX) 187 #endif // defined(OS_POSIX)
188 } 188 }
189 189
190 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « components/cronet/ios/cronet_environment.mm ('k') | remoting/client/ios/app_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698