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

Side by Side Diff: remoting/protocol/fake_authenticator.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_FAKE_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "remoting/protocol/authenticator.h" 9 #include "remoting/protocol/authenticator.h"
10 #include "remoting/protocol/channel_authenticator.h" 10 #include "remoting/protocol/channel_authenticator.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 REJECT, 47 REJECT,
48 REJECT_CHANNEL 48 REJECT_CHANNEL
49 }; 49 };
50 50
51 FakeAuthenticator(Type type, int round_trips, Action action, bool async); 51 FakeAuthenticator(Type type, int round_trips, Action action, bool async);
52 virtual ~FakeAuthenticator(); 52 virtual ~FakeAuthenticator();
53 53
54 // Authenticator interface. 54 // Authenticator interface.
55 virtual State state() const OVERRIDE; 55 virtual State state() const OVERRIDE;
56 virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE; 56 virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE;
57 virtual buzz::XmlElement* GetNextMessage() OVERRIDE; 57 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE;
58 virtual ChannelAuthenticator* CreateChannelAuthenticator() const OVERRIDE; 58 virtual scoped_ptr<ChannelAuthenticator>
59 CreateChannelAuthenticator() const OVERRIDE;
59 60
60 protected: 61 protected:
61 Type type_; 62 Type type_;
62 int round_trips_; 63 int round_trips_;
63 Action action_; 64 Action action_;
64 bool async_; 65 bool async_;
65 66
66 // Total number of messages that have been processed. 67 // Total number of messages that have been processed.
67 int messages_; 68 int messages_;
68 69
(...skipping 16 matching lines...) Expand all
85 FakeAuthenticator::Action action_; 86 FakeAuthenticator::Action action_;
86 bool async_; 87 bool async_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(FakeHostAuthenticatorFactory); 89 DISALLOW_COPY_AND_ASSIGN(FakeHostAuthenticatorFactory);
89 }; 90 };
90 91
91 } // namespace protocol 92 } // namespace protocol
92 } // namespace remoting 93 } // namespace remoting
93 94
94 #endif // REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ 95 #endif // REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698