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

Side by Side Diff: remoting/protocol/jingle_datagram_connector.h

Issue 9240033: Use scoped_ptr<>.Pass() to pass ownership in the remoting protocol code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_JINGLE_DATAGRAM_CONNECTOR_H_ 5 #ifndef REMOTING_PROTOCOL_JINGLE_DATAGRAM_CONNECTOR_H_
6 #define REMOTING_PROTOCOL_JINGLE_DATAGRAM_CONNECTOR_H_ 6 #define REMOTING_PROTOCOL_JINGLE_DATAGRAM_CONNECTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
11 #include "remoting/protocol/jingle_channel_connector.h" 11 #include "remoting/protocol/jingle_channel_connector.h"
12 #include "remoting/protocol/session.h" 12 #include "remoting/protocol/session.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 namespace protocol { 15 namespace protocol {
16 16
17 class JingleSession; 17 class JingleSession;
18 18
19 class JingleDatagramConnector : public JingleChannelConnector { 19 class JingleDatagramConnector : public JingleChannelConnector {
20 public: 20 public:
21 JingleDatagramConnector(JingleSession* session, 21 JingleDatagramConnector(JingleSession* session,
22 const std::string& name, 22 const std::string& name,
23 const Session::DatagramChannelCallback& callback); 23 const Session::DatagramChannelCallback& callback);
24 virtual ~JingleDatagramConnector(); 24 virtual ~JingleDatagramConnector();
25 25
26 // JingleChannelConnector implementation. 26 // JingleChannelConnector implementation.
27 // TODO(sergeyu): In the current implementation ChannelAuthenticator 27 // TODO(sergeyu): In the current implementation ChannelAuthenticator
28 // cannot be used for datagram channels, so needs to be either 28 // cannot be used for datagram channels, so needs to be either
29 // extended or replaced with something else here. 29 // extended or replaced with something else here.
30 virtual void Connect(ChannelAuthenticator* authenticator, 30 virtual void Connect(scoped_ptr<ChannelAuthenticator> authenticator,
31 cricket::TransportChannel* raw_channel) OVERRIDE; 31 cricket::TransportChannel* raw_channel) OVERRIDE;
32 32
33 private: 33 private:
34 JingleSession* session_; 34 JingleSession* session_;
35 std::string name_; 35 std::string name_;
36 Session::DatagramChannelCallback callback_; 36 Session::DatagramChannelCallback callback_;
37 37
38 scoped_ptr<ChannelAuthenticator> authenticator_; 38 scoped_ptr<ChannelAuthenticator> authenticator_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(JingleDatagramConnector); 40 DISALLOW_COPY_AND_ASSIGN(JingleDatagramConnector);
41 }; 41 };
42 42
43 } // namespace protocol 43 } // namespace protocol
44 } // namespace remoting 44 } // namespace remoting
45 45
46 #endif // REMOTING_PROTOCOL_JINGLE_DATAGRAM_CONNECTOR_H_ 46 #endif // REMOTING_PROTOCOL_JINGLE_DATAGRAM_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698