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

Unified Diff: remoting/protocol/client_stub.h

Issue 6594138: Block event processing on host/client until the client has authenticated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mock objects for unittests Created 9 years, 10 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/protocol/client_stub.h
diff --git a/remoting/protocol/client_stub.h b/remoting/protocol/client_stub.h
index 4b73789b84abeb95623275e5bee259665e2447b8..ff86db8eed8a4d3dd623599a73c988d0959bb313 100644
--- a/remoting/protocol/client_stub.h
+++ b/remoting/protocol/client_stub.h
@@ -22,7 +22,7 @@ class NotifyResolutionRequest;
class ClientStub {
public:
- ClientStub() {}
+ ClientStub() : enable_(false) {}
virtual ~ClientStub() {}
dmac 2011/03/04 01:36:27 as this is no longer pure virtual, may have to mov
garykac 2011/03/04 05:33:24 Done.
virtual void NotifyResolution(const NotifyResolutionRequest* msg,
@@ -30,7 +30,26 @@ class ClientStub {
virtual void BeginSessionResponse(const LocalLoginStatus* msg,
Task* done) = 0;
+ // Enable the host->client control channel.
+ // This should be set to true only after a trusted communication channel has
+ // been established.
+ // When this is false, only a limited set of control messages will be
+ // processed.
+ void SetEnable(bool enable) {
dmac 2011/03/04 01:36:27 actually the var name should probably be enabled,
garykac 2011/03/04 05:33:24 Done.
+ enable_ = enable;
+ }
+
+ // Is the control channel enabled?
+ // I.e., should we be processing control events?
+ bool Enabled() {
dmac 2011/03/04 01:36:27 just enabled()
garykac 2011/03/04 05:33:24 SetEnabled() and enabled()? or would set_enabled(
+ return enable_;
+ }
+
private:
+ // Initially false, this controls whether the control events received from the
+ // host should be processed.
+ bool enable_;
+
DISALLOW_COPY_AND_ASSIGN(ClientStub);
};

Powered by Google App Engine
This is Rietveld 408576698