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

Side by Side Diff: content/browser/loader/resource_scheduler.h

Issue 2807163002: [Prerender] Restore request priorities when swapped in (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
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_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Called when we received a response to a http request that was served 91 // Called when we received a response to a http request that was served
92 // from a proxy using SPDY. 92 // from a proxy using SPDY.
93 void OnReceivedSpdyProxiedHttpResponse(int child_id, int route_id); 93 void OnReceivedSpdyProxiedHttpResponse(int child_id, int route_id);
94 94
95 // Client functions: 95 // Client functions:
96 96
97 // Returns true if at least one client is currently loading. 97 // Returns true if at least one client is currently loading.
98 bool HasLoadingClients() const; 98 bool HasLoadingClients() const;
99 99
100 // Update the priority for |request|. Modifies request->priority(), and may 100 // Updates the priority for |request|. Modifies request->priority(), and may
101 // start the request loading if it wasn't already started. 101 // start the request loading if it wasn't already started.
102 void ReprioritizeRequest(net::URLRequest* request, 102 void ReprioritizeRequest(net::URLRequest* request,
103 net::RequestPriority new_priority, 103 net::RequestPriority new_priority,
104 int intra_priority_value); 104 int intra_priority_value);
105 // Same as above, but keeps the existing intra priority value.
106 void ReprioritizeRequest(net::URLRequest* request,
107 net::RequestPriority new_priority);
105 108
106 private: 109 private:
107 // Returns the maximum number of delayable requests to all be in-flight at 110 // Returns the maximum number of delayable requests to all be in-flight at
108 // any point in time (across all hosts). 111 // any point in time (across all hosts).
109 size_t max_num_delayable_requests() const { 112 size_t max_num_delayable_requests() const {
110 return max_num_delayable_requests_; 113 return max_num_delayable_requests_;
111 } 114 }
112 115
113 class RequestQueue; 116 class RequestQueue;
114 class ScheduledResourceRequest; 117 class ScheduledResourceRequest;
(...skipping 29 matching lines...) Expand all
144 // start resource requests. 147 // start resource requests.
145 bool yielding_scheduler_enabled_; 148 bool yielding_scheduler_enabled_;
146 int max_requests_before_yielding_; 149 int max_requests_before_yielding_;
147 150
148 DISALLOW_COPY_AND_ASSIGN(ResourceScheduler); 151 DISALLOW_COPY_AND_ASSIGN(ResourceScheduler);
149 }; 152 };
150 153
151 } // namespace content 154 } // namespace content
152 155
153 #endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ 156 #endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698