| 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/host/register_support_host_request.h" | 5 #include "remoting/host/register_support_host_request.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "remoting/base/constants.h" | 15 #include "remoting/base/constants.h" |
| 16 #include "remoting/host/host_config.h" | 16 #include "remoting/host/host_config.h" |
| 17 #include "remoting/signaling/iq_sender.h" | 17 #include "remoting/signaling/iq_sender.h" |
| 18 #include "remoting/signaling/jid_util.h" | 18 #include "remoting/signaling/jid_util.h" |
| 19 #include "remoting/signaling/signal_strategy.h" | 19 #include "remoting/signaling/signal_strategy.h" |
| 20 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 20 #include "third_party/xmllite/xmlelement.h" |
| 21 #include "third_party/webrtc/libjingle/xmpp/constants.h" | 21 #include "third_party/xmpp/constants.h" |
| 22 | 22 |
| 23 using buzz::QName; | 23 using buzz::QName; |
| 24 using buzz::XmlElement; | 24 using buzz::XmlElement; |
| 25 | 25 |
| 26 namespace remoting { | 26 namespace remoting { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 // Strings used in the request message we send to the bot. | 29 // Strings used in the request message we send to the bot. |
| 30 const char kRegisterQueryTag[] = "register-support-host"; | 30 const char kRegisterQueryTag[] = "register-support-host"; |
| 31 const char kPublicKeyTag[] = "public-key"; | 31 const char kPublicKeyTag[] = "public-key"; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Cleanup state before calling the callback. | 198 // Cleanup state before calling the callback. |
| 199 request_.reset(); | 199 request_.reset(); |
| 200 iq_sender_.reset(); | 200 iq_sender_.reset(); |
| 201 signal_strategy_->RemoveListener(this); | 201 signal_strategy_->RemoveListener(this); |
| 202 signal_strategy_ = nullptr; | 202 signal_strategy_ = nullptr; |
| 203 | 203 |
| 204 base::ResetAndReturn(&callback_).Run(support_id, lifetime, error_message); | 204 base::ResetAndReturn(&callback_).Run(support_id, lifetime, error_message); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace remoting | 207 } // namespace remoting |
| OLD | NEW |