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

Side by Side Diff: third_party/libjingle_xmpp/xmpp/xmppclient.cc

Issue 2738973004: Replace rtc::CryptString with std::string (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ResetSocket(); 43 ResetSocket();
44 } 44 }
45 45
46 // the owner 46 // the owner
47 XmppClient* const client_; 47 XmppClient* const client_;
48 48
49 // the two main objects 49 // the two main objects
50 std::unique_ptr<AsyncSocket> socket_; 50 std::unique_ptr<AsyncSocket> socket_;
51 std::unique_ptr<XmppEngine> engine_; 51 std::unique_ptr<XmppEngine> engine_;
52 std::unique_ptr<PreXmppAuth> pre_auth_; 52 std::unique_ptr<PreXmppAuth> pre_auth_;
53 rtc::CryptString pass_; 53 std::string pass_;
54 std::string auth_mechanism_; 54 std::string auth_mechanism_;
55 std::string auth_token_; 55 std::string auth_token_;
56 rtc::SocketAddress server_; 56 rtc::SocketAddress server_;
57 std::string proxy_host_; 57 std::string proxy_host_;
58 int proxy_port_; 58 int proxy_port_;
59 XmppEngine::Error pre_engine_error_; 59 XmppEngine::Error pre_engine_error_;
60 int pre_engine_subcode_; 60 int pre_engine_subcode_;
61 CaptchaChallenge captcha_challenge_; 61 CaptchaChallenge captcha_challenge_;
62 bool signal_closed_; 62 bool signal_closed_;
63 bool allow_plain_; 63 bool allow_plain_;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (!d_->socket_) { 201 if (!d_->socket_) {
202 LOG(LS_ERROR) << "socket_ already reset"; 202 LOG(LS_ERROR) << "socket_ already reset";
203 return STATE_DONE; 203 return STATE_DONE;
204 } 204 }
205 205
206 if (d_->pre_auth_) { 206 if (d_->pre_auth_) {
207 d_->pre_auth_->SignalAuthDone.connect(this, &XmppClient::OnAuthDone); 207 d_->pre_auth_->SignalAuthDone.connect(this, &XmppClient::OnAuthDone);
208 d_->pre_auth_->StartPreXmppAuth( 208 d_->pre_auth_->StartPreXmppAuth(
209 d_->engine_->GetUser(), d_->server_, d_->pass_, 209 d_->engine_->GetUser(), d_->server_, d_->pass_,
210 d_->auth_mechanism_, d_->auth_token_); 210 d_->auth_mechanism_, d_->auth_token_);
211 d_->pass_.Clear(); // done with this; 211 d_->pass_.clear(); // done with this;
212 return STATE_PRE_XMPP_LOGIN; 212 return STATE_PRE_XMPP_LOGIN;
213 } 213 }
214 else { 214 else {
215 d_->engine_->SetSaslHandler(new PlainSaslHandler( 215 d_->engine_->SetSaslHandler(new PlainSaslHandler(
216 d_->engine_->GetUser(), d_->pass_, d_->allow_plain_)); 216 d_->engine_->GetUser(), d_->pass_, d_->allow_plain_));
217 d_->pass_.Clear(); // done with this; 217 d_->pass_.clear(); // done with this;
218 return STATE_START_XMPP_LOGIN; 218 return STATE_START_XMPP_LOGIN;
219 } 219 }
220 } 220 }
221 221
222 void XmppClient::OnAuthDone() { 222 void XmppClient::OnAuthDone() {
223 Wake(); 223 Wake();
224 } 224 }
225 225
226 int XmppClient::ProcessTokenLogin() { 226 int XmppClient::ProcessTokenLogin() {
227 // Should not happen, but was observed in crash reports 227 // Should not happen, but was observed in crash reports
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 void XmppClient::EnsureClosed() { 412 void XmppClient::EnsureClosed() {
413 if (!d_->signal_closed_) { 413 if (!d_->signal_closed_) {
414 d_->signal_closed_ = true; 414 d_->signal_closed_ = true;
415 delivering_signal_ = true; 415 delivering_signal_ = true;
416 SignalStateChange(XmppEngine::STATE_CLOSED); 416 SignalStateChange(XmppEngine::STATE_CLOSED);
417 delivering_signal_ = false; 417 delivering_signal_ = false;
418 } 418 }
419 } 419 }
420 420
421 } // namespace buzz 421 } // namespace buzz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698