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

Side by Side Diff: remoting/protocol/third_party_host_authenticator.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/protocol/third_party_host_authenticator.h ('k') | remoting/protocol/token_validator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/protocol/third_party_host_authenticator.h" 5 #include "remoting/protocol/third_party_host_authenticator.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "remoting/base/constants.h" 13 #include "remoting/base/constants.h"
14 #include "remoting/protocol/token_validator.h" 14 #include "remoting/protocol/token_validator.h"
15 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 15 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
16 16
17 namespace remoting { 17 namespace remoting {
18 namespace protocol { 18 namespace protocol {
19 19
20 ThirdPartyHostAuthenticator::ThirdPartyHostAuthenticator( 20 ThirdPartyHostAuthenticator::ThirdPartyHostAuthenticator(
21 const CreateBaseAuthenticatorCallback& create_base_authenticator_callback, 21 const CreateBaseAuthenticatorCallback& create_base_authenticator_callback,
22 scoped_ptr<TokenValidator> token_validator) 22 std::unique_ptr<TokenValidator> token_validator)
23 : ThirdPartyAuthenticatorBase(MESSAGE_READY), 23 : ThirdPartyAuthenticatorBase(MESSAGE_READY),
24 create_base_authenticator_callback_(create_base_authenticator_callback), 24 create_base_authenticator_callback_(create_base_authenticator_callback),
25 token_validator_(std::move(token_validator)) {} 25 token_validator_(std::move(token_validator)) {}
26 26
27 ThirdPartyHostAuthenticator::~ThirdPartyHostAuthenticator() {} 27 ThirdPartyHostAuthenticator::~ThirdPartyHostAuthenticator() {}
28 28
29 void ThirdPartyHostAuthenticator::ProcessTokenMessage( 29 void ThirdPartyHostAuthenticator::ProcessTokenMessage(
30 const buzz::XmlElement* message, 30 const buzz::XmlElement* message,
31 const base::Closure& resume_callback) { 31 const base::Closure& resume_callback) {
32 // Host has already sent the URL and expects a token from the client. 32 // Host has already sent the URL and expects a token from the client.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // The other side already started the SPAKE authentication. 83 // The other side already started the SPAKE authentication.
84 token_state_ = ACCEPTED; 84 token_state_ = ACCEPTED;
85 underlying_ = 85 underlying_ =
86 create_base_authenticator_callback_.Run(shared_secret, WAITING_MESSAGE); 86 create_base_authenticator_callback_.Run(shared_secret, WAITING_MESSAGE);
87 underlying_->ProcessMessage(message, resume_callback); 87 underlying_->ProcessMessage(message, resume_callback);
88 } 88 }
89 89
90 } // namespace protocol 90 } // namespace protocol
91 } // namespace remoting 91 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/third_party_host_authenticator.h ('k') | remoting/protocol/token_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698