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

Unified Diff: chrome/browser/extensions/extension_uninstall_dialog.cc

Issue 13119011: Enable WebContents elevation for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor duplicate code into GetScopedElevation function. Created 7 years, 9 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
Index: chrome/browser/extensions/extension_uninstall_dialog.cc
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_dialog.cc
index 8c89ded52dc4d0e1b0f8d1b6951819b7c7306019..44db08b45fcc83069e51ce03ab38475247a7674d 100644
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc
+++ b/chrome/browser/extensions/extension_uninstall_dialog.cc
@@ -9,6 +9,7 @@
#include "base/message_loop.h"
#include "chrome/browser/extensions/image_loader.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/api/icons/icons_handler.h"
#include "chrome/common/extensions/extension.h"
@@ -150,13 +151,17 @@ void ExtensionUninstallDialog::Observe(
bool ExtensionUninstallDialog::ShowAuthorizationDialog() {
ManagedUserService* service =
ManagedUserServiceFactory::GetForProfile(profile_);
- if (service->ProfileIsManaged() && !service->CanSkipPassphraseDialog()) {
- service->RequestAuthorizationUsingActiveWebContents(
- browser_,
+ content::WebContents* web_contents =
+ browser_->tab_strip_model()->GetActiveWebContents();
+ if (service->ProfileIsManaged() &&
+ !service->CanSkipPassphraseDialog(web_contents)) {
+ service->RequestAuthorization(
+ web_contents,
base::Bind(&ExtensionUninstallDialog::OnAuthorizationResult,
base::Unretained(this)));
return true;
}
+ service->AddElevationForExtension(extension_->id());
not at google - send to devlin 2013/04/02 21:55:26 It seems like this should be part of the interface
return false;
}

Powered by Google App Engine
This is Rietveld 408576698