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

Side by Side Diff: remoting/host/win/rdp_client.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 | « remoting/host/desktop_process.cc ('k') | ui/base/clipboard/clipboard_win.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/win/rdp_client.h" 5 #include "remoting/host/win/rdp_client.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void RdpClient::Core::Connect(const webrtc::DesktopSize& screen_size, 123 void RdpClient::Core::Connect(const webrtc::DesktopSize& screen_size,
124 const std::string& terminal_id) { 124 const std::string& terminal_id) {
125 if (!ui_task_runner_->BelongsToCurrentThread()) { 125 if (!ui_task_runner_->BelongsToCurrentThread()) {
126 ui_task_runner_->PostTask( 126 ui_task_runner_->PostTask(
127 FROM_HERE, base::Bind(&Core::Connect, this, screen_size, terminal_id)); 127 FROM_HERE, base::Bind(&Core::Connect, this, screen_size, terminal_id));
128 return; 128 return;
129 } 129 }
130 130
131 DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI); 131 DCHECK(base::MessageLoopForUI::IsCurrent());
132 DCHECK(!rdp_client_window_); 132 DCHECK(!rdp_client_window_);
133 DCHECK(!self_); 133 DCHECK(!self_);
134 134
135 // Read the port number used by RDP. 135 // Read the port number used by RDP.
136 DWORD server_port; 136 DWORD server_port;
137 base::win::RegKey key(HKEY_LOCAL_MACHINE, kRdpPortKeyName, KEY_READ); 137 base::win::RegKey key(HKEY_LOCAL_MACHINE, kRdpPortKeyName, KEY_READ);
138 if (!key.Valid() || 138 if (!key.Valid() ||
139 (key.ReadValueDW(kRdpPortValueName, &server_port) != ERROR_SUCCESS)) { 139 (key.ReadValueDW(kRdpPortValueName, &server_port) != ERROR_SUCCESS)) {
140 server_port = kDefaultRdpPort; 140 server_port = kDefaultRdpPort;
141 } 141 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 if (event_handler_) { 227 if (event_handler_) {
228 RdpClient::EventHandler* event_handler = event_handler_; 228 RdpClient::EventHandler* event_handler = event_handler_;
229 event_handler_ = NULL; 229 event_handler_ = NULL;
230 event_handler->OnRdpClosed(); 230 event_handler->OnRdpClosed();
231 } 231 }
232 } 232 }
233 233
234 } // namespace remoting 234 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process.cc ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698