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

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

Issue 12413028: Add elevation to the managed mode navigation observer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add elevation state to the managed mode navigation observer. 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/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 6dbcfa2210c8fa47980255ed904a9112f93ce7db..6427cd38cdf5546668eb04dc2fea4c6e89e731ae 100644
--- a/chrome/browser/managed_mode/managed_user_service.h
+++ b/chrome/browser/managed_mode/managed_user_service.h
@@ -45,6 +45,9 @@ class ManagedUserService : public ProfileKeyedService,
bool ProfileIsManaged() const;
bool IsElevated() const;
Bernhard Bauer 2013/03/20 15:08:30 Aaand now this is getting confusing. How do per-pr
Adrian Kuegel 2013/03/20 15:51:16 No, we don't want that anymore, but I guess if I c
Bernhard Bauer 2013/03/20 15:57:17 OK, but please add a deprecation message in that c
+ // Returns the elevation state for specific WebContents.
+ bool IsElevatedForWebContents(const content::WebContents* web_contents) const;
+
static void RegisterUserPrefs(PrefRegistrySyncable* registry);
// Returns the URL filter for the IO thread, for filtering network requests
@@ -85,6 +88,13 @@ class ManagedUserService : public ProfileKeyedService,
// elevated state or the passphrase is empty).
bool CanSkipPassphraseDialog();
+ // Checks if the passphrase dialog can be skipped (the profile is already in
+ // elevated state for the given WebContents or the passphrase is empty).
+ bool CanSkipPassphraseDialog(const content::WebContents* web_contents) const;
+
+ // Returns if the passphrase to authorize as the custodian is empty.
+ bool IsPassphraseEmpty() const;
+
// Handles the request to authorize as the custodian of the managed user.
void RequestAuthorization(content::WebContents* web_contents,
const PassphraseCheckedCallback& callback);
@@ -96,8 +106,13 @@ class ManagedUserService : public ProfileKeyedService,
Browser* browser,
const PassphraseCheckedCallback& callback);
+ // Set the elevation state for the profile.
void SetElevated(bool is_elevated);
+ // Set the elevation state for specific WebContents only.
+ void SetElevatedForWebContents(bool is_elevated,
+ content::WebContents* web_contents);
+
// Add an elevation for a specific extension which allows the managed user to
// install/uninstall this specific extension.
void AddElevationForExtension(const std::string& extension_id);

Powered by Google App Engine
This is Rietveld 408576698