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

Unified Diff: remoting/host/host_mock_objects.h

Issue 10538091: [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/host_mock_objects.h
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h
index 569b32489e2e9b24f3eaed5fd5f26d3bec89a8ce..f32066c586cd19db6df23bd9f5810821fc1e1523 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -14,6 +14,7 @@
#include "remoting/host/disconnect_window.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/local_input_monitor.h"
+#include "remoting/host/session_manager_factory.h"
#include "remoting/host/user_authenticator.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -135,6 +136,27 @@ class MockEventExecutor : public EventExecutor {
DISALLOW_COPY_AND_ASSIGN(MockEventExecutor);
};
+class MockSessionManagerFactory : public SessionManagerFactory {
+ public:
+ MockSessionManagerFactory();
+ virtual ~MockSessionManagerFactory();
+
+ MOCK_METHOD2(MakeSessionManagerPtr, protocol::SessionManager*(
+ const NetworkSettings& network_settings,
+ const scoped_refptr<net::URLRequestContextGetter>&
+ url_request_context_getter));
+ scoped_ptr<protocol::SessionManager> MakeSessionManager(
+ const NetworkSettings& network_settings,
+ const scoped_refptr<net::URLRequestContextGetter>&
+ url_request_context_getter) {
+ return scoped_ptr<protocol::SessionManager>(MakeSessionManagerPtr(
+ network_settings, url_request_context_getter));
Wez 2012/06/11 22:17:06 Although it seems a bit pointless, I think this be
simonmorris 2012/06/11 23:08:59 This way is consistent with protocol_mock_objects.
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSessionManagerFactory);
+};
+
class MockUserAuthenticator : public UserAuthenticator {
public:
MockUserAuthenticator();

Powered by Google App Engine
This is Rietveld 408576698