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

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: Automatically reset tab elevation when navigating the frame to a non-special URL. 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 59588cc449240bc61c442cf7db152f5a01673db6..755f2ff75814ed52bf2cc52f5bc50c3ef8c6112c 100644
--- a/chrome/browser/managed_mode/managed_user_service.h
+++ b/chrome/browser/managed_mode/managed_user_service.h
@@ -43,8 +43,13 @@ class ManagedUserService : public ProfileKeyedService,
virtual ~ManagedUserService();
bool ProfileIsManaged() const;
+
+ // Deprecated. Use IsElevatedForWebContents() instead.
bool IsElevated() const;
+ // 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
@@ -81,10 +86,17 @@ class ManagedUserService : public ProfileKeyedService,
void SetManualBehaviorForURLs(const std::vector<GURL>& url,
ManualBehavior behavior);
- // Checks if the passphrase dialog can be skipped (the profile is already in
- // elevated state or the passphrase is empty).
+ // Deprecated. Use the CanSkipPassphraseDialog() method which requires a
+ // WebContents parameter instead.
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;
Bernhard Bauer 2013/03/21 15:52:58 Where do we need this method?
Adrian Kuegel 2013/03/21 16:30:04 In CanSkipPassphraseDialog. But I guess we can mak
+
// Handles the request to authorize as the custodian of the managed user.
void RequestAuthorization(content::WebContents* web_contents,
const PassphraseCheckedCallback& callback);
@@ -96,6 +108,7 @@ class ManagedUserService : public ProfileKeyedService,
Browser* browser,
const PassphraseCheckedCallback& callback);
+ // Set the elevation state for the profile.
void SetElevated(bool is_elevated);
// Add an elevation for a specific extension which allows the managed user to

Powered by Google App Engine
This is Rietveld 408576698