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

Side by Side Diff: remoting/host/it2me/it2me_native_messaging_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
« no previous file with comments | « remoting/client/ios/app_runtime.cc ('k') | remoting/host/remoting_me2me_host.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/it2me/it2me_native_messaging_host_main.h" 5 #include "remoting/host/it2me/it2me_native_messaging_host_main.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Register and initialize common controls. 72 // Register and initialize common controls.
73 INITCOMMONCONTROLSEX info; 73 INITCOMMONCONTROLSEX info;
74 info.dwSize = sizeof(info); 74 info.dwSize = sizeof(info);
75 info.dwICC = ICC_STANDARD_CLASSES; 75 info.dwICC = ICC_STANDARD_CLASSES;
76 InitCommonControlsEx(&info); 76 InitCommonControlsEx(&info);
77 #endif // defined(OS_WIN) 77 #endif // defined(OS_WIN)
78 78
79 // Required to find the ICU data file, used by some file_util routines. 79 // Required to find the ICU data file, used by some file_util routines.
80 base::i18n::InitializeICU(); 80 base::i18n::InitializeICU();
81 81
82 // TODO(sergeyu): Consider adding separate pools for different task classes. 82 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("It2Me");
83 const int kMaxBackgroundThreads = 5;
84 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxBackgroundThreads);
85 83
86 remoting::LoadResources(""); 84 remoting::LoadResources("");
87 85
88 #if defined(OS_LINUX) 86 #if defined(OS_LINUX)
89 // Required in order for us to run multiple X11 threads. 87 // Required in order for us to run multiple X11 threads.
90 XInitThreads(); 88 XInitThreads();
91 89
92 // Required for any calls into GTK functions, such as the Disconnect and 90 // Required for any calls into GTK functions, such as the Disconnect and
93 // Continue windows. Calling with nullptr arguments because we don't have 91 // Continue windows. Calling with nullptr arguments because we don't have
94 // any command line arguments for gtk to consume. 92 // any command line arguments for gtk to consume.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Run the loop until channel is alive. 198 // Run the loop until channel is alive.
201 run_loop.Run(); 199 run_loop.Run();
202 200
203 // Block until tasks blocking shutdown have completed their execution. 201 // Block until tasks blocking shutdown have completed their execution.
204 base::TaskScheduler::GetInstance()->Shutdown(); 202 base::TaskScheduler::GetInstance()->Shutdown();
205 203
206 return kSuccessExitCode; 204 return kSuccessExitCode;
207 } 205 }
208 206
209 } // namespace remoting 207 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/ios/app_runtime.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698