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

Side by Side Diff: chrome/app/mash/mash_runner.cc

Issue 2729523006: Remove the |max_threads| argument from CreateAndSetSimpleTaskScheduler(). (Closed)
Patch Set: self-review 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/app/mash/mash_runner.h" 5 #include "chrome/app/mash/mash_runner.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
11 #include "base/base_switches.h" 11 #include "base/base_switches.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/debug/debugger.h" 14 #include "base/debug/debugger.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/i18n/icu_util.h" 17 #include "base/i18n/icu_util.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
20 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
21 #include "base/path_service.h" 21 #include "base/path_service.h"
22 #include "base/process/launch.h" 22 #include "base/process/launch.h"
23 #include "base/process/process.h" 23 #include "base/process/process.h"
24 #include "base/run_loop.h" 24 #include "base/run_loop.h"
25 #include "base/sys_info.h"
26 #include "base/task_scheduler/task_scheduler.h" 25 #include "base/task_scheduler/task_scheduler.h"
27 #include "base/threading/sequenced_worker_pool.h" 26 #include "base/threading/sequenced_worker_pool.h"
28 #include "base/threading/thread.h" 27 #include "base/threading/thread.h"
29 #include "base/trace_event/trace_event.h" 28 #include "base/trace_event/trace_event.h"
30 #include "chrome/app/mash/chrome_mash_catalog.h" 29 #include "chrome/app/mash/chrome_mash_catalog.h"
31 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
32 #include "components/tracing/common/trace_to_console.h" 31 #include "components/tracing/common/trace_to_console.h"
33 #include "components/tracing/common/tracing_switches.h" 32 #include "components/tracing/common/tracing_switches.h"
34 #include "content/public/common/content_switches.h" 33 #include "content/public/common/content_switches.h"
35 #include "content/public/common/service_names.mojom.h" 34 #include "content/public/common/service_names.mojom.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 run_loop->Quit(); 142 run_loop->Quit();
144 } 143 }
145 144
146 } // namespace 145 } // namespace
147 146
148 MashRunner::MashRunner() {} 147 MashRunner::MashRunner() {}
149 148
150 MashRunner::~MashRunner() {} 149 MashRunner::~MashRunner() {}
151 150
152 int MashRunner::Run() { 151 int MashRunner::Run() {
153 base::TaskScheduler::CreateAndSetSimpleTaskScheduler( 152 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("MashRunner");
154 base::SysInfo::NumberOfProcessors());
155 153
156 if (IsChild()) 154 if (IsChild())
157 return RunChild(); 155 return RunChild();
158 156
159 return RunMain(); 157 return RunMain();
160 } 158 }
161 159
162 int MashRunner::RunMain() { 160 int MashRunner::RunMain() {
163 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 161 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
164 162
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 command_line->GetSwitchValueASCII(switches::kWaitForDebugger)) { 285 command_line->GetSwitchValueASCII(switches::kWaitForDebugger)) {
288 return; 286 return;
289 } 287 }
290 288
291 // Include the pid as logging may not have been initialized yet (the pid 289 // Include the pid as logging may not have been initialized yet (the pid
292 // printed out by logging is wrong). 290 // printed out by logging is wrong).
293 LOG(WARNING) << "waiting for debugger to attach for service " << service_name 291 LOG(WARNING) << "waiting for debugger to attach for service " << service_name
294 << " pid=" << base::Process::Current().Pid(); 292 << " pid=" << base::Process::Current().Pid();
295 base::debug::WaitForDebugger(120, true); 293 base::debug::WaitForDebugger(120, true);
296 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698