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

Side by Side Diff: remoting/signaling/xmpp_signal_strategy.h

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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ 5 #ifndef REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_
6 #define REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ 6 #define REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_
7 7
8 #include "remoting/signaling/signal_strategy.h" 8 #include "remoting/signaling/signal_strategy.h"
9 9
10 #include <memory>
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 15
15 namespace net { 16 namespace net {
16 class ClientSocketFactory; 17 class ClientSocketFactory;
17 class URLRequestContextGetter; 18 class URLRequestContextGetter;
18 } // namespace net 19 } // namespace net
19 20
20 namespace remoting { 21 namespace remoting {
21 22
22 // XmppSignalStrategy implements SignalStrategy using direct XMPP connection. 23 // XmppSignalStrategy implements SignalStrategy using direct XMPP connection.
23 class XmppSignalStrategy : public SignalStrategy { 24 class XmppSignalStrategy : public SignalStrategy {
(...skipping 19 matching lines...) Expand all
43 ~XmppSignalStrategy() override; 44 ~XmppSignalStrategy() override;
44 45
45 // SignalStrategy interface. 46 // SignalStrategy interface.
46 void Connect() override; 47 void Connect() override;
47 void Disconnect() override; 48 void Disconnect() override;
48 State GetState() const override; 49 State GetState() const override;
49 Error GetError() const override; 50 Error GetError() const override;
50 std::string GetLocalJid() const override; 51 std::string GetLocalJid() const override;
51 void AddListener(Listener* listener) override; 52 void AddListener(Listener* listener) override;
52 void RemoveListener(Listener* listener) override; 53 void RemoveListener(Listener* listener) override;
53 bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; 54 bool SendStanza(std::unique_ptr<buzz::XmlElement> stanza) override;
54 std::string GetNextId() override; 55 std::string GetNextId() override;
55 56
56 // This method is used to update the auth info (for example when the OAuth 57 // This method is used to update the auth info (for example when the OAuth
57 // access token is renewed). It is OK to call this even when we are in the 58 // access token is renewed). It is OK to call this even when we are in the
58 // CONNECTED state. It will be used on the next Connect() call. 59 // CONNECTED state. It will be used on the next Connect() call.
59 void SetAuthInfo(const std::string& username, 60 void SetAuthInfo(const std::string& username,
60 const std::string& auth_token); 61 const std::string& auth_token);
61 62
62 private: 63 private:
63 class Core; 64 class Core;
64 65
65 scoped_ptr<Core> core_; 66 std::unique_ptr<Core> core_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy); 68 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy);
68 }; 69 };
69 70
70 } // namespace remoting 71 } // namespace remoting
71 72
72 #endif // REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ 73 #endif // REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/signaling/xmpp_login_handler_unittest.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698