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

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

Issue 11299035: Support manual (white|black)list, previewing and allowing after interstitial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 c0b16abe24e725a2ccdbb80c21712c755261542f..32a33632bc99e9d397f84665ced46ccc3a0b37c3 100644
--- a/chrome/browser/managed_mode/managed_mode_navigation_observer.h
+++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_MANAGED_MODE_NAVIGATION_OBSERVER_H_
-#define CHROME_BROWSER_MANAGED_MODE_NAVIGATION_OBSERVER_H_
+#ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_
+#define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -17,7 +17,20 @@ class ManagedModeNavigationObserver
public:
virtual ~ManagedModeNavigationObserver();
- void InfobarDismissed();
+ void WarnInfobarDismissed();
+ void PreviewInfobarDismissed();
+
+ // Adds the url to the list of navigated URLs if it was not already there.
+ void AddNavigatedURL(const GURL& url);
+
+ // For the list of URLs that were navigated since the last Observer
+ // instantiation:
+ // * add the first N-1 to the whitelist such that only those URLs are
+ // allowed and not more general versions of them.
Bernhard Bauer 2012/11/16 15:04:46 I think this can be put a bit more succinctly by s
Sergiu 2012/11/26 14:48:08 Done.
+ // * add only the host part of the last URL so that it allows all
+ // pages on that domain. If it's HTTPS do the same but only on the HTTPS
+ // protocol.
+ void AddURLList();
Bernhard Bauer 2012/11/16 15:04:46 Add NavigatedURL and AddURLList are very similarly
Sergiu 2012/11/26 14:48:08 Done.
private:
friend class WebContentsUserData<ManagedModeNavigationObserver>;
@@ -52,9 +65,12 @@ class ManagedModeNavigationObserver
// Owned by ManagedMode (which is a singleton and outlives us).
const ManagedModeURLFilter* url_filter_;
- InfoBarDelegate* infobar_delegate_;
+ InfoBarDelegate* warn_infobar_delegate_;
+ InfoBarDelegate* preview_infobar_delegate_;
+ std::vector<GURL> navigated_urls_;
+ bool after_interstitial_;
DISALLOW_COPY_AND_ASSIGN(ManagedModeNavigationObserver);
};
-#endif // CHROME_BROWSER_MANAGED_MODE_NAVIGATION_OBSERVER_H_
+#endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698