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

Unified Diff: chrome/browser/managed_mode/managed_mode_navigation_observer.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_mode_navigation_observer.h
diff --git a/chrome/browser/managed_mode/managed_mode_navigation_observer.h b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
index 6e3ede6e7fe6f3f17880f91120d6dc034d7bb6bc..f4904e8d09f7091bb3d45e5b099d800f0984be70 100644
--- a/chrome/browser/managed_mode/managed_mode_navigation_observer.h
+++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
@@ -40,6 +40,12 @@ class ManagedModeNavigationObserver
// observer state after adding the URLs.
void AddSavedURLsToWhitelistAndClearState();
+ // Returns the elevation state for the corresponding WebContents.
+ bool is_elevated() const;
+
+ // Set the elevation state for the corresponding WebContents.
+ void SetElevated(bool is_elevated);
Bernhard Bauer 2013/03/20 15:08:30 If this method only changes the flag, it's okay (a
Adrian Kuegel 2013/03/20 15:51:16 Done.
+
private:
// An observer can be in one of the following states:
// - RECORDING_URLS_BEFORE_PREVIEW: This is the initial state when the user
@@ -126,6 +132,10 @@ class ManagedModeNavigationObserver
std::set<GURL> navigated_urls_;
GURL last_url_;
+ // The elevation state corresponding to the current WebContents.
+ // Will be set to true for non-managed users.
+ bool is_elevated_;
+
int last_allowed_page_;
DISALLOW_COPY_AND_ASSIGN(ManagedModeNavigationObserver);

Powered by Google App Engine
This is Rietveld 408576698