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

Unified Diff: remoting/jingle_glue/jingle_client.cc

Issue 3110004: Revert 55507 - Start chromoting host in the service process though a method ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/jingle_client.cc
===================================================================
--- remoting/jingle_glue/jingle_client.cc (revision 55524)
+++ remoting/jingle_glue/jingle_client.cc (working copy)
@@ -76,11 +76,6 @@
}
void JingleClient::Close() {
- // Once we are closed we really shouldn't talk to the callback again. In the
- // case when JingleClient outlives the owner access the callback is not safe.
- // TODO(hclam): We need to lock to reset callback.
- callback_ = NULL;
-
message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, &JingleClient::DoClose));
}
@@ -90,14 +85,12 @@
// If we have not yet initialized and the client is already closed then
// don't close again.
- if (state_ == CLOSED)
+ if (!callback_ || state_ == CLOSED)
return;
- if (client_) {
- client_->Disconnect();
- // Client is deleted by TaskRunner.
- client_ = NULL;
- }
+ client_->Disconnect();
+ // Client is deleted by TaskRunner.
+ client_ = NULL;
tunnel_session_client_.reset();
port_allocator_.reset();
session_manager_.reset();
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698