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

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

Issue 2798393007: Use SignalingAddress in SignalStrategy insterface. (Closed)
Patch Set: . Created 3 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 (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_PROTOCOL_MOCK_OBJECTS_H_ 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 class MockSessionManager : public SessionManager { 200 class MockSessionManager : public SessionManager {
201 public: 201 public:
202 MockSessionManager(); 202 MockSessionManager();
203 ~MockSessionManager() override; 203 ~MockSessionManager() override;
204 204
205 MOCK_METHOD1(AcceptIncoming, void(const IncomingSessionCallback&)); 205 MOCK_METHOD1(AcceptIncoming, void(const IncomingSessionCallback&));
206 void set_protocol_config( 206 void set_protocol_config(
207 std::unique_ptr<CandidateSessionConfig> config) override {} 207 std::unique_ptr<CandidateSessionConfig> config) override {}
208 MOCK_METHOD2(ConnectPtr, 208 MOCK_METHOD2(ConnectPtr,
209 Session*(const std::string& host_jid, 209 Session*(const SignalingAddress& peer_address,
210 Authenticator* authenticator)); 210 Authenticator* authenticator));
211 MOCK_METHOD0(Close, void()); 211 MOCK_METHOD0(Close, void());
212 MOCK_METHOD1(set_authenticator_factory_ptr, 212 MOCK_METHOD1(set_authenticator_factory_ptr,
213 void(AuthenticatorFactory* factory)); 213 void(AuthenticatorFactory* factory));
214 std::unique_ptr<Session> Connect( 214 std::unique_ptr<Session> Connect(
215 const std::string& host_jid, 215 const SignalingAddress& peer_address,
216 std::unique_ptr<Authenticator> authenticator) override { 216 std::unique_ptr<Authenticator> authenticator) override {
217 return base::WrapUnique(ConnectPtr(host_jid, authenticator.get())); 217 return base::WrapUnique(ConnectPtr(peer_address, authenticator.get()));
218 } 218 }
219 void set_authenticator_factory( 219 void set_authenticator_factory(
220 std::unique_ptr<AuthenticatorFactory> authenticator_factory) override { 220 std::unique_ptr<AuthenticatorFactory> authenticator_factory) override {
221 set_authenticator_factory_ptr(authenticator_factory.release()); 221 set_authenticator_factory_ptr(authenticator_factory.release());
222 } 222 }
223 223
224 private: 224 private:
225 DISALLOW_COPY_AND_ASSIGN(MockSessionManager); 225 DISALLOW_COPY_AND_ASSIGN(MockSessionManager);
226 }; 226 };
227 227
(...skipping 26 matching lines...) Expand all
254 // Runs tasks synchronously instead of posting them to |task_runner|. 254 // Runs tasks synchronously instead of posting them to |task_runner|.
255 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 255 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
256 const tracked_objects::Location& from_here, 256 const tracked_objects::Location& from_here,
257 const base::Closure& task) override; 257 const base::Closure& task) override;
258 }; 258 };
259 259
260 } // namespace protocol 260 } // namespace protocol
261 } // namespace remoting 261 } // namespace remoting
262 262
263 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 263 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698