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

Side by Side Diff: remoting/protocol/fake_session.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
« no previous file with comments | « remoting/protocol/fake_desktop_capturer.cc ('k') | remoting/protocol/fake_session.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PROTOCOL_FAKE_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_
6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "remoting/protocol/fake_stream_socket.h" 15 #include "remoting/protocol/fake_stream_socket.h"
16 #include "remoting/protocol/session.h" 16 #include "remoting/protocol/session.h"
17 #include "remoting/protocol/transport.h" 17 #include "remoting/protocol/transport.h"
18 18
19 namespace remoting { 19 namespace remoting {
20 namespace protocol { 20 namespace protocol {
21 21
22 extern const char kTestJid[]; 22 extern const char kTestJid[];
23 23
(...skipping 13 matching lines...) Expand all
37 // Session interface. 37 // Session interface.
38 void SetEventHandler(EventHandler* event_handler) override; 38 void SetEventHandler(EventHandler* event_handler) override;
39 ErrorCode error() override; 39 ErrorCode error() override;
40 const std::string& jid() override; 40 const std::string& jid() override;
41 const SessionConfig& config() override; 41 const SessionConfig& config() override;
42 void SetTransport(Transport* transport) override; 42 void SetTransport(Transport* transport) override;
43 void Close(ErrorCode error) override; 43 void Close(ErrorCode error) override;
44 44
45 private: 45 private:
46 // Callback provided to the |transport_|. 46 // Callback provided to the |transport_|.
47 void SendTransportInfo(scoped_ptr<buzz::XmlElement> transport_info); 47 void SendTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info);
48 48
49 EventHandler* event_handler_ = nullptr; 49 EventHandler* event_handler_ = nullptr;
50 scoped_ptr<SessionConfig> config_; 50 std::unique_ptr<SessionConfig> config_;
51 51
52 std::string jid_; 52 std::string jid_;
53 53
54 scoped_ptr<FakeAuthenticator> authenticator_; 54 std::unique_ptr<FakeAuthenticator> authenticator_;
55 Transport* transport_; 55 Transport* transport_;
56 56
57 ErrorCode error_ = OK; 57 ErrorCode error_ = OK;
58 bool closed_ = false; 58 bool closed_ = false;
59 59
60 base::WeakPtr<FakeSession> peer_; 60 base::WeakPtr<FakeSession> peer_;
61 61
62 base::WeakPtrFactory<FakeSession> weak_factory_; 62 base::WeakPtrFactory<FakeSession> weak_factory_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(FakeSession); 64 DISALLOW_COPY_AND_ASSIGN(FakeSession);
65 }; 65 };
66 66
67 } // namespace protocol 67 } // namespace protocol
68 } // namespace remoting 68 } // namespace remoting
69 69
70 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ 70 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_desktop_capturer.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698