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

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: Merging upstream changes 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..953beff6d24c45246e38389dfd91f2970da905e8 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,16 @@ 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.
+ protocol::ValidatingAuthenticator::ValidationCallback
+ GetValidationCallbackForTesting();
+
protected:
friend class base::RefCountedThreadSafe<It2MeHost>;
@@ -141,6 +152,12 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>,
void DisconnectOnNetworkThread();
+ // Uses details of the connection and current policies to determine 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 +199,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
+ // determines whether to reject the connection or allow it to continue.
+ protocol::ValidatingAuthenticator::ValidationCallback validation_callback_;
+
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