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

Side by Side Diff: content/public/browser/resource_throttle.h

Issue 1041993004: content::ResourceDispatcherHostImpl changes for stale-while-revalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-yhirano-patch
Patch Set: Use histograms instead of user actions. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
9
10 class GURL;
11
12 namespace net { 8 namespace net {
13 struct RedirectInfo; 9 struct RedirectInfo;
14 } 10 }
15 11
16 namespace content { 12 namespace content {
17 13
14 class AsyncRevalidationDriver;
18 class ResourceController; 15 class ResourceController;
16 class ThrottlingResourceHandler;
19 17
20 // A ResourceThrottle gets notified at various points during the process of 18 // 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 19 // 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 20 // 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 21 // deferred resource load, or it may be used to cancel a resource load at any
24 // time. 22 // time.
25 class ResourceThrottle { 23 class ResourceThrottle {
26 public: 24 public:
27 virtual ~ResourceThrottle() {} 25 virtual ~ResourceThrottle() {}
28 26
(...skipping 20 matching lines...) Expand all
49 47
50 void set_controller_for_testing(ResourceController* c) { 48 void set_controller_for_testing(ResourceController* c) {
51 controller_ = c; 49 controller_ = c;
52 } 50 }
53 51
54 protected: 52 protected:
55 ResourceThrottle() : controller_(nullptr) {} 53 ResourceThrottle() : controller_(nullptr) {}
56 ResourceController* controller() { return controller_; } 54 ResourceController* controller() { return controller_; }
57 55
58 private: 56 private:
57 friend class AsyncRevalidationDriver;
59 friend class ThrottlingResourceHandler; 58 friend class ThrottlingResourceHandler;
60 void set_controller(ResourceController* c) { controller_ = c; } 59 void set_controller(ResourceController* c) { controller_ = c; }
61 60
62 ResourceController* controller_; 61 ResourceController* controller_;
63 }; 62 };
64 63
65 } // namespace content 64 } // namespace content
66 65
67 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_THROTTLE_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698