| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "chrome/browser/prerender/prerender_manager.h" |
| 13 #include "content/public/browser/resource_request_info.h" | 14 #include "content/public/browser/resource_request_info.h" |
| 14 #include "content/public/browser/resource_throttle.h" | 15 #include "content/public/browser/resource_throttle.h" |
| 15 #include "content/public/common/resource_type.h" | 16 #include "content/public/common/resource_type.h" |
| 16 | 17 |
| 17 class GURL; | 18 class GURL; |
| 18 | 19 |
| 19 namespace net { | 20 namespace net { |
| 20 class URLRequest; | 21 class URLRequest; |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool is_no_store, | 77 bool is_no_store, |
| 77 int redirect_count, | 78 int redirect_count, |
| 78 scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info); | 79 scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info); |
| 79 | 80 |
| 80 // Helper to return the PrerenderContents given a WebContentsGetter. May | 81 // Helper to return the PrerenderContents given a WebContentsGetter. May |
| 81 // return nullptr if it's gone. | 82 // return nullptr if it's gone. |
| 82 static PrerenderContents* PrerenderContentsFromGetter( | 83 static PrerenderContents* PrerenderContentsFromGetter( |
| 83 const content::ResourceRequestInfo::WebContentsGetter& | 84 const content::ResourceRequestInfo::WebContentsGetter& |
| 84 web_contents_getter); | 85 web_contents_getter); |
| 85 | 86 |
| 87 void set_prerender_mode(PrerenderMode mode) { prerender_mode_ = mode; } |
| 88 |
| 86 net::URLRequest* request_; | 89 net::URLRequest* request_; |
| 90 PrerenderMode prerender_mode_; |
| 87 | 91 |
| 88 scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info_; | 92 scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info_; |
| 89 | 93 |
| 90 DISALLOW_COPY_AND_ASSIGN(PrerenderResourceThrottle); | 94 DISALLOW_COPY_AND_ASSIGN(PrerenderResourceThrottle); |
| 91 }; | 95 }; |
| 92 | 96 |
| 93 } // namespace prerender | 97 } // namespace prerender |
| 94 | 98 |
| 95 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ | 99 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ |
| OLD | NEW |