Chromium Code Reviews| 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_ |