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 acefa966d4fa067c95992bf09c5d8f1f1a5d01c6..043fe7f0abf613d1329fbc80c1c3c2ab726bee6f 100644 |
--- a/chrome/browser/managed_mode/managed_mode_resource_throttle.h |
+++ b/chrome/browser/managed_mode/managed_mode_resource_throttle.h |
@@ -15,8 +15,6 @@ namespace net { |
class URLRequest; |
} |
-// This class temporarily blocks network requests that aren't whitelisted, |
-// and allows resuming them later. |
class ManagedModeResourceThrottle : public content::ResourceThrottle { |
public: |
ManagedModeResourceThrottle(const net::URLRequest* request, |
@@ -25,10 +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 (which identify a tab) |
+ // to the preview map. Adding saves the last approved hostname in the map, |
+ // which is then used to allow the user to browse on that hostname without |
+ // getting an interstitial. See managed_mode_resource_throttle.cc for more |
+ // details on the preview map. |
+ static void AddTemporaryException(int render_process_host_id, |
+ int render_view_id, |
+ const GURL& url); |
+ static void RemoveTemporaryException(int render_process_host_id, |
+ int render_view_id); |
+ |
// content::ResourceThrottle implementation: |
virtual void WillStartRequest(bool* defer) OVERRIDE; |
+ virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE; |
+ |
private: |
+ void ShowInterstitialIfNeeded(bool is_redirect, |
+ const GURL& url, |
+ bool* defer); |
void OnInterstitialResult(bool continue_request); |
base::WeakPtrFactory<ManagedModeResourceThrottle> weak_ptr_factory_; |
@@ -36,6 +51,7 @@ class ManagedModeResourceThrottle : public content::ResourceThrottle { |
int render_process_host_id_; |
int render_view_id_; |
bool is_main_frame_; |
+ bool after_interstitial_; |
Bernhard Bauer
2013/01/07 12:34:19
I would like to have a more descriptive name for t
Sergiu
2013/01/07 16:25:05
Sounds better indeed.
|
const ManagedModeURLFilter* url_filter_; |
DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); |