Chromium Code Reviews| 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); |
| }; |