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

Unified Diff: remoting/host/it2me/it2me_host.h

Issue 2271933002: Updating It2Me to use the new ValidatingAuthenticator class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@authenticator
Patch Set: Cleanup prior to CR Created 4 years, 4 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
« no previous file with comments | « remoting/host/BUILD.gn ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_host.h
diff --git a/remoting/host/it2me/it2me_host.h b/remoting/host/it2me/it2me_host.h
index ba48cac5b0e232b2bbeaafe65995134c075aa1e2..d5b6f033911e87783c120b6a1cdb04ebfd75e8fc 100644
--- a/remoting/host/it2me/it2me_host.h
+++ b/remoting/host/it2me/it2me_host.h
@@ -14,6 +14,7 @@
#include "remoting/host/host_status_observer.h"
#include "remoting/host/it2me/it2me_confirmation_dialog.h"
#include "remoting/host/it2me/it2me_confirmation_dialog_proxy.h"
+#include "remoting/protocol/validating_authenticator.h"
#include "remoting/signaling/xmpp_signal_strategy.h"
namespace base {
@@ -92,6 +93,18 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>,
SetState(state, error_message);
}
+ // Updates the current policies based on |policies|. Runs |done_callback| on
+ // the calling thread once the policies have been updated.
+ void SetPolicyForTesting(std::unique_ptr<base::DictionaryValue> policies,
+ const base::Closure& done_callback);
+
+ // Returns the callback used for validating the connection. Do not run the
+ // returned callback after this object has been destroyed.
+ const protocol::ValidatingAuthenticator::ValidationCallback&
+ GetValidationCallbackForTesting() {
+ return validation_callback_;
+ }
+
protected:
friend class base::RefCountedThreadSafe<It2MeHost>;
@@ -141,6 +154,12 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>,
void DisconnectOnNetworkThread();
+ // Uses details of the connection and current policies to detemine if the
+ // connection should be accepted or rejected.
+ void ValidateConnectionDetails(
+ const std::string& remote_jid,
+ const protocol::ValidatingAuthenticator::ResultCallback& result_callback);
+
// Caller supplied fields.
std::unique_ptr<ChromotingHostContext> host_context_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
@@ -182,6 +201,10 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>,
// variable contains the thunk if it is necessary.
base::Closure pending_connect_;
+ // Called after the client machine initiates the connection process and is
Jamie 2016/08/26 23:31:02 s/is//
joedow 2016/08/30 00:08:24 Acknowledged.
+ // determines whether to reject the connection or allow it to continue.
+ protocol::ValidatingAuthenticator::ValidationCallback validation_callback_;
Jamie 2016/08/26 23:31:02 Is it necessary to store this, rather than rebindi
joedow 2016/08/30 00:08:24 Probably not, I was thinking it would simplify thi
+
DISALLOW_COPY_AND_ASSIGN(It2MeHost);
};
« no previous file with comments | « remoting/host/BUILD.gn ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698