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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.h

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/ui/webui/extensions/extension_settings_handler.h
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.h b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
index ab0882f0bcbfde10be4e29ae37340a118f01f7c4..6c45f9b4a7c5aaa0284ece476c23405f436d3fed 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
@@ -17,6 +17,7 @@
#include "chrome/browser/extensions/extension_uninstall_dialog.h"
#include "chrome/browser/extensions/extension_warning_service.h"
#include "chrome/browser/extensions/requirements_checker.h"
+#include "chrome/browser/managed_mode/scoped_extension_elevation.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -137,6 +138,15 @@ class ExtensionSettingsHandler
// it gives this information back to the UI.
void PassphraseDialogCallback(bool success);
+ // Generates a temporary elevation for a managed user which is bound to the
+ // life-time of the return value.
+ scoped_ptr<ScopedExtensionElevation> GetScopedElevation(
+ std::string extension_id);
+
+ // Verifies that the management policy allows the user to enable,
+ // disable or uninstall an extension.
+ bool CheckUserMayModifySettings(const extensions::Extension* extension);
+
// Callback for "requestExtensionsData" message.
void HandleRequestExtensionsData(const base::ListValue* args);

Powered by Google App Engine
This is Rietveld 408576698