Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 // TODO(ricea): Remove this when prerender_resource_throttle.h has been fixed. |
| 9 | |
| 10 class GURL; | 9 class GURL; |
|
davidben
2015/10/08 21:57:52
This appears to be fixed.
Adam Rice
2015/10/13 22:53:18
Thanks. Removed.
| |
| 11 | 10 |
| 12 namespace net { | 11 namespace net { |
| 13 struct RedirectInfo; | 12 struct RedirectInfo; |
| 14 } | 13 } |
| 15 | 14 |
| 16 namespace content { | 15 namespace content { |
| 17 | 16 |
| 17 class AsyncRevalidationDriver; | |
| 18 class ResourceController; | 18 class ResourceController; |
| 19 class ThrottlingResourceHandler; | |
| 19 | 20 |
| 20 // A ResourceThrottle gets notified at various points during the process of | 21 // A ResourceThrottle gets notified at various points during the process of |
| 21 // loading a resource. At each stage, it has the opportunity to defer the | 22 // loading a resource. At each stage, it has the opportunity to defer the |
| 22 // resource load. The ResourceController interface may be used to resume a | 23 // resource load. The ResourceController interface may be used to resume a |
| 23 // deferred resource load, or it may be used to cancel a resource load at any | 24 // deferred resource load, or it may be used to cancel a resource load at any |
| 24 // time. | 25 // time. |
| 25 class ResourceThrottle { | 26 class ResourceThrottle { |
| 26 public: | 27 public: |
| 27 virtual ~ResourceThrottle() {} | 28 virtual ~ResourceThrottle() {} |
| 28 | 29 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 49 | 50 |
| 50 void set_controller_for_testing(ResourceController* c) { | 51 void set_controller_for_testing(ResourceController* c) { |
| 51 controller_ = c; | 52 controller_ = c; |
| 52 } | 53 } |
| 53 | 54 |
| 54 protected: | 55 protected: |
| 55 ResourceThrottle() : controller_(nullptr) {} | 56 ResourceThrottle() : controller_(nullptr) {} |
| 56 ResourceController* controller() { return controller_; } | 57 ResourceController* controller() { return controller_; } |
| 57 | 58 |
| 58 private: | 59 private: |
| 60 friend class AsyncRevalidationDriver; | |
| 59 friend class ThrottlingResourceHandler; | 61 friend class ThrottlingResourceHandler; |
| 60 void set_controller(ResourceController* c) { controller_ = c; } | 62 void set_controller(ResourceController* c) { controller_ = c; } |
| 61 | 63 |
| 62 ResourceController* controller_; | 64 ResourceController* controller_; |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace content | 67 } // namespace content |
| 66 | 68 |
| 67 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ | 69 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ |
| OLD | NEW |