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

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

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 // 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_client_authenticator.h" 5 #include "remoting/protocol/third_party_client_authenticator.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "remoting/base/constants.h" 11 #include "remoting/base/constants.h"
12 #include "remoting/base/rsa_key_pair.h" 12 #include "remoting/base/rsa_key_pair.h"
13 #include "remoting/protocol/channel_authenticator.h" 13 #include "remoting/protocol/channel_authenticator.h"
14 #include "remoting/protocol/v2_authenticator.h" 14 #include "remoting/protocol/v2_authenticator.h"
15 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 15 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 namespace protocol { 19 namespace protocol {
20 20
21 ThirdPartyClientAuthenticator::ThirdPartyClientAuthenticator( 21 ThirdPartyClientAuthenticator::ThirdPartyClientAuthenticator(
22 scoped_ptr<TokenFetcher> token_fetcher) 22 scoped_ptr<TokenFetcher> token_fetcher)
23 : ThirdPartyAuthenticatorBase(WAITING_MESSAGE), 23 : ThirdPartyAuthenticatorBase(WAITING_MESSAGE),
24 token_fetcher_(token_fetcher.Pass()) { 24 token_fetcher_(std::move(token_fetcher)) {
25 } 25 }
26 26
27 ThirdPartyClientAuthenticator::~ThirdPartyClientAuthenticator() { 27 ThirdPartyClientAuthenticator::~ThirdPartyClientAuthenticator() {
28 } 28 }
29 29
30 void ThirdPartyClientAuthenticator::ProcessTokenMessage( 30 void ThirdPartyClientAuthenticator::ProcessTokenMessage(
31 const buzz::XmlElement* message, 31 const buzz::XmlElement* message,
32 const base::Closure& resume_callback) { 32 const base::Closure& resume_callback) {
33 std::string token_url = message->TextNamed(kTokenUrlTag); 33 std::string token_url = message->TextNamed(kTokenUrlTag);
34 std::string token_scope = message->TextNamed(kTokenScopeTag); 34 std::string token_scope = message->TextNamed(kTokenScopeTag);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } else { 73 } else {
74 token_state_ = MESSAGE_READY; 74 token_state_ = MESSAGE_READY;
75 underlying_ = V2Authenticator::CreateForClient( 75 underlying_ = V2Authenticator::CreateForClient(
76 shared_secret, MESSAGE_READY); 76 shared_secret, MESSAGE_READY);
77 } 77 }
78 resume_callback.Run(); 78 resume_callback.Run();
79 } 79 }
80 80
81 } // namespace protocol 81 } // namespace protocol
82 } // namespace remoting 82 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698