Chromium Code Reviews| Index: chrome/browser/managed_mode/managed_mode_resource_throttle.h |
| diff --git a/chrome/browser/managed_mode/managed_mode_resource_throttle.h b/chrome/browser/managed_mode/managed_mode_resource_throttle.h |
| index 886fb2a2d9b7930f1be01bbd6e6c74096991bdeb..817d9ada8f87f58870289dac10cb2631ff44786b 100644 |
| --- a/chrome/browser/managed_mode/managed_mode_resource_throttle.h |
| +++ b/chrome/browser/managed_mode/managed_mode_resource_throttle.h |
| @@ -15,10 +15,6 @@ namespace net { |
| class URLRequest; |
| } |
| -namespace policy { |
| -class URLBlacklist; |
| -} |
| - |
| class ManagedModeResourceThrottle : public content::ResourceThrottle { |
| public: |
| ManagedModeResourceThrottle(const net::URLRequest* request, |
| @@ -27,9 +23,27 @@ class ManagedModeResourceThrottle : public content::ResourceThrottle { |
| bool is_main_frame); |
| virtual ~ManagedModeResourceThrottle(); |
| + // Adds/removes a temporary exception to filtering for a |
| + // render_process_host_id and render_view_id pair to the preview map. |
| + // Adding saves the last approved hostname in the map. |
| + static void AddTemporaryException(int render_process_host_id, |
| + int render_view_id, |
| + const std::string& host); |
| + static void RemoveTemporaryException(int render_process_host_id, |
| + int render_view_id); |
| + |
| + // Checks whether the |url| needs to trigger an interstitial. If it |
|
Bernhard Bauer
2012/11/27 18:44:46
Update the comment now? We do more than check, als
Sergiu
2012/11/28 12:53:25
Done.
|
| + // |is_redirect| or the user already saw an interstitial on the same hostname |
| + // as this |url| then do not show another one. |
| + void ShowInterstitialIfNeeded(bool is_redirect, |
|
Bernhard Bauer
2012/11/27 18:44:46
Also, make this method private?
Sergiu
2012/11/28 12:53:25
Done.
|
| + const GURL& url, |
| + bool* defer); |
| + |
| // content::ResourceThrottle implementation: |
| virtual void WillStartRequest(bool* defer) OVERRIDE; |
| + virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE; |
| + |
| private: |
| void OnInterstitialResult(bool continue_request); |
| @@ -38,6 +52,7 @@ class ManagedModeResourceThrottle : public content::ResourceThrottle { |
| int render_process_host_id_; |
| int render_view_id_; |
| bool is_main_frame_; |
| + bool after_interstitial_; |
| const ManagedModeURLFilter* url_filter_; |
| DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); |