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

Unified Diff: remoting/host/setup/me2me_native_messaging_host.cc

Issue 880133003: UAC and pin confirmation dialogs are not on foreground when updating pin # (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698