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

Unified Diff: chrome/browser/managed_mode/managed_mode_resource_throttle.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: Split navigated_urls in two and refactor. 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_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..c74cb8136b4fe3dd41f483cd63b32e609656d976 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,10 +23,24 @@ 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);
+
// 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_;
@@ -38,6 +48,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);

Powered by Google App Engine
This is Rietveld 408576698