OLD | NEW |
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 #include "remoting/client/plugin/pepper_xmpp_proxy.h" | 5 #include "remoting/client/plugin/pepper_xmpp_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 send_iq_callback_.Run(request_xml); | 44 send_iq_callback_.Run(request_xml); |
45 } | 45 } |
46 | 46 |
47 void PepperXmppProxy::OnIq(const std::string& response_xml) { | 47 void PepperXmppProxy::OnIq(const std::string& response_xml) { |
48 if (!callback_task_runner_->BelongsToCurrentThread()) { | 48 if (!callback_task_runner_->BelongsToCurrentThread()) { |
49 callback_task_runner_->PostTask( | 49 callback_task_runner_->PostTask( |
50 FROM_HERE, base::Bind(&PepperXmppProxy::OnIq, this, response_xml)); | 50 FROM_HERE, base::Bind(&PepperXmppProxy::OnIq, this, response_xml)); |
51 return; | 51 return; |
52 } | 52 } |
53 | 53 |
54 if (callback_) | 54 if (callback_.get()) |
55 callback_->OnIq(response_xml); | 55 callback_->OnIq(response_xml); |
56 } | 56 } |
57 | 57 |
58 } // namespace remoting | 58 } // namespace remoting |
OLD | NEW |