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

Side by Side Diff: remoting/signaling/xmpp_login_handler_unittest.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: Created 4 years, 12 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/signaling/xmpp_login_handler.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/signaling/xmpp_login_handler.h" 5 #include "remoting/signaling/xmpp_login_handler.h"
6 6
7 #include <utility>
8
7 #include "base/base64.h" 9 #include "base/base64.h"
8 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 11 #include "base/run_loop.h"
10 #include "remoting/signaling/xmpp_stream_parser.h" 12 #include "remoting/signaling/xmpp_stream_parser.h"
11 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 14 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
13 15
14 #ifdef SendMessage 16 #ifdef SendMessage
15 #undef SendMessage 17 #undef SendMessage
16 #endif 18 #endif
(...skipping 27 matching lines...) Expand all
44 46
45 void StartTls() override { 47 void StartTls() override {
46 start_tls_called_ = true; 48 start_tls_called_ = true;
47 if (delete_login_handler_from_delegate_) 49 if (delete_login_handler_from_delegate_)
48 login_handler_.reset(); 50 login_handler_.reset();
49 } 51 }
50 52
51 void OnHandshakeDone(const std::string& jid, 53 void OnHandshakeDone(const std::string& jid,
52 scoped_ptr<XmppStreamParser> parser) override { 54 scoped_ptr<XmppStreamParser> parser) override {
53 jid_ = jid; 55 jid_ = jid;
54 parser_ = parser.Pass(); 56 parser_ = std::move(parser);
55 if (delete_login_handler_from_delegate_) 57 if (delete_login_handler_from_delegate_)
56 login_handler_.reset(); 58 login_handler_.reset();
57 } 59 }
58 60
59 void OnLoginHandlerError(SignalStrategy::Error error) override { 61 void OnLoginHandlerError(SignalStrategy::Error error) override {
60 EXPECT_NE(error, SignalStrategy::OK); 62 EXPECT_NE(error, SignalStrategy::OK);
61 error_ = error; 63 error_ = error;
62 if (delete_login_handler_from_delegate_) 64 if (delete_login_handler_from_delegate_)
63 login_handler_.reset(); 65 login_handler_.reset();
64 } 66 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 login_handler_.reset( 257 login_handler_.reset(
256 new XmppLoginHandler("google.com", kTestUsername, kTestToken, 258 new XmppLoginHandler("google.com", kTestUsername, kTestToken,
257 XmppLoginHandler::TlsMode::WITHOUT_HANDSHAKE, this)); 259 XmppLoginHandler::TlsMode::WITHOUT_HANDSHAKE, this));
258 delete_login_handler_from_delegate_ = true; 260 delete_login_handler_from_delegate_ = true;
259 login_handler_->Start(); 261 login_handler_->Start();
260 EXPECT_TRUE(start_tls_called_); 262 EXPECT_TRUE(start_tls_called_);
261 EXPECT_FALSE(login_handler_); 263 EXPECT_FALSE(login_handler_);
262 } 264 }
263 265
264 } // namespace remoting 266 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/signaling/xmpp_login_handler.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698