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

Unified Diff: chrome/browser/managed_mode/managed_user_service.h

Issue 13778004: Start in elevated mode when creating a new managed user profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a startup elevation flag. Created 7 years, 8 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/managed_mode/managed_user_service.h
diff --git a/chrome/browser/managed_mode/managed_user_service.h b/chrome/browser/managed_mode/managed_user_service.h
index 8be4a06b223343d7ee4836cf6206674bc3a827e7..e110e5ea54a2e6bd230d96bb1e703658fa913662 100644
--- a/chrome/browser/managed_mode/managed_user_service.h
+++ b/chrome/browser/managed_mode/managed_user_service.h
@@ -102,10 +102,28 @@ class ManagedUserService : public ProfileKeyedService,
// Remove the elevation for a specific extension.
void RemoveElevationForExtension(const std::string& extension_id);
+ // Add elevation for |url|. This allows to start a tab displaying this URL
+ // in elevated mode.
+ void AddElevationForURL(const GURL& url);
Bernhard Bauer 2013/04/10 09:30:03 These method declarations are not unnecessary (and
Adrian Kuegel 2013/04/10 09:47:01 I had already implemented them, but forgot to remo
+
+ // Remove elevation for |url|.
+ void RemoveElevationForURL(const GURL& url);
+
+ // Returns if the managed user has elevation for this URL.
+ bool IsElevatedForURL(const GURL& url);
+
// Initializes this object. This method does nothing if the profile is not
// managed.
void Init();
+ void set_startup_elevation(bool elevation) {
+ startup_elevation_ = elevation;
+ }
+
+ bool startup_elevation() const {
+ return startup_elevation_;
+ }
+
// extensions::ManagementPolicy::Provider implementation:
virtual std::string GetDebugPolicyProviderName() const OVERRIDE;
virtual bool UserMayLoad(const extensions::Extension* extension,
@@ -179,6 +197,9 @@ class ManagedUserService : public ProfileKeyedService,
// Owns us via the ProfileKeyedService mechanism.
Profile* profile_;
+ // Is true if the managed user should start in elevated mode.
+ bool startup_elevation_;
+
content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698