OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // XMPP connection attempt fails. | 71 // XMPP connection attempt fails. |
72 CHECK(!callback_.is_null()); | 72 CHECK(!callback_.is_null()); |
73 DCHECK(!request_.get()); | 73 DCHECK(!request_.get()); |
74 callback_.Run(false, std::string()); | 74 callback_.Run(false, std::string()); |
75 return; | 75 return; |
76 } | 76 } |
77 DCHECK_EQ(message_loop_, MessageLoop::current()); | 77 DCHECK_EQ(message_loop_, MessageLoop::current()); |
78 request_.reset(); | 78 request_.reset(); |
79 } | 79 } |
80 | 80 |
| 81 void RegisterSupportHostRequest::OnAuthenticatedClientsChanged(int clients) { |
| 82 } |
| 83 |
81 void RegisterSupportHostRequest::OnShutdown() { | 84 void RegisterSupportHostRequest::OnShutdown() { |
82 } | 85 } |
83 | 86 |
84 XmlElement* RegisterSupportHostRequest::CreateRegistrationRequest( | 87 XmlElement* RegisterSupportHostRequest::CreateRegistrationRequest( |
85 const std::string& jid) { | 88 const std::string& jid) { |
86 XmlElement* query = new XmlElement( | 89 XmlElement* query = new XmlElement( |
87 QName(kChromotingXmlNamespace, kRegisterQueryTag)); | 90 QName(kChromotingXmlNamespace, kRegisterQueryTag)); |
88 XmlElement* public_key = new XmlElement( | 91 XmlElement* public_key = new XmlElement( |
89 QName(kChromotingXmlNamespace, kPublicKeyTag)); | 92 QName(kChromotingXmlNamespace, kPublicKeyTag)); |
90 public_key->AddText(key_pair_.GetPublicKey()); | 93 public_key->AddText(key_pair_.GetPublicKey()); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 147 |
145 | 148 |
146 void RegisterSupportHostRequest::ProcessResponse(const XmlElement* response) { | 149 void RegisterSupportHostRequest::ProcessResponse(const XmlElement* response) { |
147 DCHECK_EQ(message_loop_, MessageLoop::current()); | 150 DCHECK_EQ(message_loop_, MessageLoop::current()); |
148 std::string support_id; | 151 std::string support_id; |
149 bool result = ParseResponse(response, &support_id); | 152 bool result = ParseResponse(response, &support_id); |
150 callback_.Run(result, support_id); | 153 callback_.Run(result, support_id); |
151 } | 154 } |
152 | 155 |
153 } // namespace remoting | 156 } // namespace remoting |
OLD | NEW |