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

Side by Side Diff: remoting/host/setup/start_host_main.cc

Issue 2729523006: Remove the |max_threads| argument from CreateAndSetSimpleTaskScheduler(). (Closed)
Patch Set: fix build error 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 "remoting/host/setup/start_host_main.h" 5 #include "remoting/host/setup/start_host_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 base::CommandLine::ForCurrentProcess(); 124 base::CommandLine::ForCurrentProcess();
125 125
126 // This object instance is required by Chrome code (for example, 126 // This object instance is required by Chrome code (for example,
127 // FilePath, LazyInstance, MessageLoop). 127 // FilePath, LazyInstance, MessageLoop).
128 base::AtExitManager exit_manager; 128 base::AtExitManager exit_manager;
129 129
130 logging::LoggingSettings settings; 130 logging::LoggingSettings settings;
131 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 131 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
132 logging::InitLogging(settings); 132 logging::InitLogging(settings);
133 133
134 const int kMaxBackgroundThreads = 5; 134 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("RemotingHostSetup");
135 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxBackgroundThreads);
136 135
137 std::string host_name = command_line->GetSwitchValueASCII("name"); 136 std::string host_name = command_line->GetSwitchValueASCII("name");
138 std::string host_pin = command_line->GetSwitchValueASCII("pin"); 137 std::string host_pin = command_line->GetSwitchValueASCII("pin");
139 std::string auth_code = command_line->GetSwitchValueASCII("code"); 138 std::string auth_code = command_line->GetSwitchValueASCII("code");
140 std::string redirect_url = command_line->GetSwitchValueASCII("redirect-url"); 139 std::string redirect_url = command_line->GetSwitchValueASCII("redirect-url");
141 140
142 #if defined(OS_POSIX) 141 #if defined(OS_POSIX)
143 // Check if current user is root. If it is root, then throw an error message. 142 // Check if current user is root. If it is root, then throw an error message.
144 // This is because start_host should be run in user mode. 143 // This is because start_host should be run in user mode.
145 if (geteuid() == 0) { 144 if (geteuid() == 0) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // IO thread. 237 // IO thread.
239 host_starter.reset(); 238 host_starter.reset();
240 url_request_context_getter = nullptr; 239 url_request_context_getter = nullptr;
241 240
242 io_thread.Stop(); 241 io_thread.Stop();
243 242
244 return g_started ? 0 : 1; 243 return g_started ? 0 : 1;
245 } 244 }
246 245
247 } // namespace remoting 246 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host_main.cc ('k') | remoting/test/chromoting_test_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698