Index: remoting/host/setup/me2me_native_messaging_host.cc |
diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc |
index 37bedac0e592b79723c13f447499bc9827e0dadf..e3480b1afc3c493bbc2b0464db4699b05a32d439 100644 |
--- a/remoting/host/setup/me2me_native_messaging_host.cc |
+++ b/remoting/host/setup/me2me_native_messaging_host.cc |
@@ -280,6 +280,12 @@ void Me2MeNativeMessagingHost::ProcessUpdateDaemonConfig( |
scoped_ptr<base::DictionaryValue> response) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (needs_elevation_) { |
+ if (!DelegateToElevatedHost(message.Pass())) |
+ SendAsyncResult(response.Pass(), DaemonController::RESULT_FAILED); |
+ return; |
+ } |
+ |
scoped_ptr<base::DictionaryValue> config_dict = |
ConfigDictionaryFromMessage(message.Pass()); |
if (!config_dict) { |
@@ -333,6 +339,12 @@ void Me2MeNativeMessagingHost::ProcessStartDaemon( |
scoped_ptr<base::DictionaryValue> response) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (needs_elevation_) { |
+ if (!DelegateToElevatedHost(message.Pass())) |
+ SendAsyncResult(response.Pass(), DaemonController::RESULT_FAILED); |
+ return; |
+ } |
+ |
bool consent; |
if (!message->GetBoolean("consent", &consent)) { |
LOG(ERROR) << "'consent' not found."; |
@@ -358,6 +370,12 @@ void Me2MeNativeMessagingHost::ProcessStopDaemon( |
scoped_ptr<base::DictionaryValue> response) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (needs_elevation_) { |
+ if (!DelegateToElevatedHost(message.Pass())) |
+ SendAsyncResult(response.Pass(), DaemonController::RESULT_FAILED); |
+ return; |
+ } |
+ |
daemon_controller_->Stop( |
base::Bind(&Me2MeNativeMessagingHost::SendAsyncResult, weak_ptr_, |
base::Passed(&response))); |