Index: remoting/host/it2me/it2me_native_messaging_host.h |
diff --git a/remoting/host/it2me/it2me_native_messaging_host.h b/remoting/host/it2me/it2me_native_messaging_host.h |
index 948c41a8c004e04db398e1f473f0228227f17cf4..28ca6cdc84883d2b581cec76c9068e179bc57471 100644 |
--- a/remoting/host/it2me/it2me_native_messaging_host.h |
+++ b/remoting/host/it2me/it2me_native_messaging_host.h |
@@ -56,6 +56,10 @@ class It2MeNativeMessagingHost : public It2MeHost::Observer, |
void OnStateChanged(It2MeHostState state, |
const std::string& error_message) override; |
+ // Set a callback to be called when a policy error notification has been |
+ // processed. |
+ void SetPolicyErrorClosureForTesting(const base::Closure& closure); |
+ |
static std::string HostStateToString(It2MeHostState host_state); |
private: |
@@ -72,6 +76,7 @@ class It2MeNativeMessagingHost : public It2MeHost::Observer, |
std::unique_ptr<base::DictionaryValue> response); |
void SendErrorAndExit(std::unique_ptr<base::DictionaryValue> response, |
const std::string& description) const; |
+ void SendPolicyErrorAndExit() const; |
void SendMessageToClient(std::unique_ptr<base::Value> message) const; |
// Callback for DelegatingSignalStrategy. |
@@ -80,6 +85,9 @@ class It2MeNativeMessagingHost : public It2MeHost::Observer, |
// Called when initial policies are read and when they change. |
void OnPolicyUpdate(std::unique_ptr<base::DictionaryValue> policies); |
+ // Called when malformed policies are detected. |
+ void OnPolicyError(); |
+ |
// Returns whether the request was successfully sent to the elevated host. |
bool DelegateToElevatedHost(std::unique_ptr<base::DictionaryValue> message); |
@@ -125,6 +133,8 @@ class It2MeNativeMessagingHost : public It2MeHost::Observer, |
// variable contains the thunk if it is necessary. |
base::Closure pending_connect_; |
+ base::Closure policy_error_closure_for_testing_; |
+ |
base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; |
base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_; |