OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_ H_ | |
6 #define CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_ H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/memory/weak_ptr.h" | |
12 #include "content/public/browser/resource_throttle.h" | |
13 | |
14 namespace net { | |
15 class URLRequest; | |
16 } // namespace net | |
17 | |
18 class ShouldIgnoreNavigationResourceThrottle | |
joth
2012/05/11 15:34:13
class comment
mkosiba (inactive)
2012/05/15 14:20:23
Done.
| |
19 : public content::ResourceThrottle, | |
20 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.
| |
21 public: | |
22 explicit ShouldIgnoreNavigationResourceThrottle(net::URLRequest* request); | |
23 virtual ~ShouldIgnoreNavigationResourceThrottle(); | |
24 | |
25 // content::ResourceThrottle implementation: | |
26 virtual void WillStartRequest(bool* defer) OVERRIDE; | |
27 virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE; | |
28 | |
29 private: | |
30 void ShouldDeferRequest(const GURL& url, bool* defer); | |
31 void OnResultObtained(bool should_ignore_navigation); | |
32 | |
33 net::URLRequest* request_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(ShouldIgnoreNavigationResourceThrottle); | |
36 }; | |
37 | |
38 #endif // CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTT LE_H_ | |
OLD | NEW |