Index: chrome/browser/renderer_host/should_ignore_navigation_resource_throttle.h |
diff --git a/chrome/browser/renderer_host/should_ignore_navigation_resource_throttle.h b/chrome/browser/renderer_host/should_ignore_navigation_resource_throttle.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ee594664b3fafc65e6be47c848c51b86af507930 |
--- /dev/null |
+++ b/chrome/browser/renderer_host/should_ignore_navigation_resource_throttle.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_H_ |
+#define CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_H_ |
+#pragma once |
+ |
+#include <string> |
+ |
+#include "base/memory/weak_ptr.h" |
+#include "content/public/browser/resource_throttle.h" |
+ |
+namespace net { |
+class URLRequest; |
+} // namespace net |
+ |
+class ShouldIgnoreNavigationResourceThrottle |
joth
2012/05/11 15:34:13
class comment
mkosiba (inactive)
2012/05/15 14:20:23
Done.
|
+ : public content::ResourceThrottle, |
+ public base::SupportsWeakPtr<ShouldIgnoreNavigationResourceThrottle> { |
joth
2012/05/11 15:34:13
nit: as WeakPtr is only used as an internal impl d
mkosiba (inactive)
2012/05/15 14:20:23
Done.
|
+ public: |
+ explicit ShouldIgnoreNavigationResourceThrottle(net::URLRequest* request); |
+ virtual ~ShouldIgnoreNavigationResourceThrottle(); |
+ |
+ // content::ResourceThrottle implementation: |
+ virtual void WillStartRequest(bool* defer) OVERRIDE; |
+ virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE; |
+ |
+ private: |
+ void ShouldDeferRequest(const GURL& url, bool* defer); |
+ void OnResultObtained(bool should_ignore_navigation); |
+ |
+ net::URLRequest* request_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ShouldIgnoreNavigationResourceThrottle); |
+}; |
+ |
+#endif // CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_H_ |