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

Side by Side Diff: remoting/host/desktop_process.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | remoting/host/win/rdp_client.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 // This file implements the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/desktop_process.h" 8 #include "remoting/host/desktop_process.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 namespace remoting { 24 namespace remoting {
25 25
26 DesktopProcess::DesktopProcess( 26 DesktopProcess::DesktopProcess(
27 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, 27 scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
28 scoped_refptr<AutoThreadTaskRunner> input_task_runner, 28 scoped_refptr<AutoThreadTaskRunner> input_task_runner,
29 const std::string& daemon_channel_name) 29 const std::string& daemon_channel_name)
30 : caller_task_runner_(caller_task_runner), 30 : caller_task_runner_(caller_task_runner),
31 input_task_runner_(input_task_runner), 31 input_task_runner_(input_task_runner),
32 daemon_channel_name_(daemon_channel_name) { 32 daemon_channel_name_(daemon_channel_name) {
33 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 33 DCHECK(caller_task_runner_->BelongsToCurrentThread());
34 DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI); 34 DCHECK(base::MessageLoopForUI::IsCurrent());
35 } 35 }
36 36
37 DesktopProcess::~DesktopProcess() { 37 DesktopProcess::~DesktopProcess() {
38 DCHECK(!daemon_channel_); 38 DCHECK(!daemon_channel_);
39 DCHECK(!desktop_agent_.get()); 39 DCHECK(!desktop_agent_.get());
40 } 40 }
41 41
42 DesktopEnvironmentFactory& DesktopProcess::desktop_environment_factory() { 42 DesktopEnvironmentFactory& DesktopProcess::desktop_environment_factory() {
43 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 43 DCHECK(caller_task_runner_->BelongsToCurrentThread());
44 44
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::snprintf(message, sizeof(message), 158 base::snprintf(message, sizeof(message),
159 "Requested by %s at %s, line %d.", 159 "Requested by %s at %s, line %d.",
160 function_name.c_str(), file_name.c_str(), line_number); 160 function_name.c_str(), file_name.c_str(), line_number);
161 base::debug::Alias(message); 161 base::debug::Alias(message);
162 162
163 // The daemon requested us to crash the process. 163 // The daemon requested us to crash the process.
164 CHECK(false) << message; 164 CHECK(false) << message;
165 } 165 }
166 166
167 } // namespace remoting 167 } // namespace remoting
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | remoting/host/win/rdp_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698