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

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

Issue 13533017: Fix managed mode allow/block flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename variable 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
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_mode_navigation_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ddd4953e9a79fb2549b6c5dd43ccf931b6df305..2127f8b57107ae4f6a4bca9fd2968147dd83f30a 100644
--- a/chrome/browser/managed_mode/managed_mode_navigation_observer.h
+++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
@@ -69,8 +69,6 @@ class ManagedModeNavigationObserver
// an interstitial for this RenderView. This allows the user to navigate
// around on the website after clicking preview.
void AddTemporaryException();
- // Updates the ResourceThrottle with the latest user navigation status.
- void UpdateExceptionNavigationStatus();
void RemoveTemporaryException();
void AddURLToPatternList(const GURL& url);
@@ -102,7 +100,6 @@ class ManagedModeNavigationObserver
const GURL& url,
content::PageTransition transition_type,
content::RenderViewHost* render_view_host) OVERRIDE;
- virtual void DidGetUserGesture() OVERRIDE;
// Returns whether the user would stay in elevated state if he visits this
// URL.
@@ -118,12 +115,6 @@ class ManagedModeNavigationObserver
InfoBarDelegate* warn_infobar_delegate_;
InfoBarDelegate* preview_infobar_delegate_;
- // Whether we received a user gesture.
- // The goal is to allow automatic redirects (in order not to break the flow
- // or show too many interstitials) while not allowing the user to navigate
- // to blocked pages. We consider a redirect to be automatic if we did
- // not get a user gesture.
- bool got_user_gesture_;
ObserverState state_;
std::set<GURL> navigated_urls_;
GURL last_url_;
@@ -134,6 +125,16 @@ class ManagedModeNavigationObserver
int last_allowed_page_;
+ // There are two starting points for a new navigation:
+ // 1. NavigateToPendingEntry when the omnibox is used to navigate to a URL or
+ // the user goes back or forward.
+ // 2. ProvisionalChangeToMainFrameURL when the user clicks on a link.
+ // The main problem is that ProvisionalChangeToMainFrameURL is called for
+ // redirects as well and we need a way to distinguish between the two
+ // scenarios. |finished_redirects_| helps us do that by tracking the cases
+ // when the user did not click on a URL.
+ bool finished_redirects_;
+
DISALLOW_COPY_AND_ASSIGN(ManagedModeNavigationObserver);
};
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_mode_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698