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

Side by Side Diff: remoting/client/chromoting_client_runtime.cc

Issue 2836293006: Remove TaskScheduler::CreateAndSetSimpleTaskScheduler(). (Closed)
Patch Set: 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 | « content/child/child_process.cc ('k') | remoting/host/it2me/it2me_native_messaging_host_main.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 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 "remoting/client/chromoting_client_runtime.h" 5 #include "remoting/client/chromoting_client_runtime.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 10 matching lines...) Expand all
21 } // namespace 21 } // namespace
22 22
23 namespace remoting { 23 namespace remoting {
24 24
25 // static 25 // static
26 ChromotingClientRuntime* ChromotingClientRuntime::GetInstance() { 26 ChromotingClientRuntime* ChromotingClientRuntime::GetInstance() {
27 return base::Singleton<ChromotingClientRuntime>::get(); 27 return base::Singleton<ChromotingClientRuntime>::get();
28 } 28 }
29 29
30 ChromotingClientRuntime::ChromotingClientRuntime() { 30 ChromotingClientRuntime::ChromotingClientRuntime() {
31 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("Remoting"); 31 base::TaskScheduler::CreateAndStartWithDefaultParams("Remoting");
32 32
33 if (!base::MessageLoop::current()) { 33 if (!base::MessageLoop::current()) {
34 VLOG(1) << "Starting main message loop"; 34 VLOG(1) << "Starting main message loop";
35 ui_loop_.reset(new base::MessageLoopForUI()); 35 ui_loop_.reset(new base::MessageLoopForUI());
36 #if defined(OS_ANDROID) 36 #if defined(OS_ANDROID)
37 // On Android, the UI thread is managed by Java, so we need to attach and 37 // On Android, the UI thread is managed by Java, so we need to attach and
38 // start a special type of message loop to allow Chromium code to run tasks. 38 // start a special type of message loop to allow Chromium code to run tasks.
39 ui_loop_->Start(); 39 ui_loop_->Start();
40 #elif defined(OS_IOS) 40 #elif defined(OS_IOS)
41 base::MessageLoopForUI::current()->Attach(); 41 base::MessageLoopForUI::current()->Attach();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 } 111 }
112 112
113 ChromotingEventLogWriter* ChromotingClientRuntime::log_writer() { 113 ChromotingEventLogWriter* ChromotingClientRuntime::log_writer() {
114 DCHECK(network_task_runner()->BelongsToCurrentThread()); 114 DCHECK(network_task_runner()->BelongsToCurrentThread());
115 return log_writer_.get(); 115 return log_writer_.get();
116 } 116 }
117 117
118 118
119 } // namespace remoting 119 } // namespace remoting
OLDNEW
« no previous file with comments | « content/child/child_process.cc ('k') | remoting/host/it2me/it2me_native_messaging_host_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698