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

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

Issue 2807163002: [Prerender] Restore request priorities when swapped in (Closed)
Patch Set: Fix test: default image priority can be LOWEST or MEDIUM 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
« no previous file with comments | « content/browser/loader/resource_scheduler.cc ('k') | no next file » | 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_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "net/base/request_priority.h"
15 16
16 namespace net { 17 namespace net {
17 class URLRequest; 18 class URLRequest;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 class ResourceContext; 23 class ResourceContext;
23 class ResourceDispatcherHostDelegate; 24 class ResourceDispatcherHostDelegate;
24 25
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // The |starts_with| parameter is used to match the prefix of the 78 // The |starts_with| parameter is used to match the prefix of the
78 // |http_header| in the response and the interceptor will be invoked if there 79 // |http_header| in the response and the interceptor will be invoked if there
79 // is a match. If the |starts_with| parameter is empty, the interceptor will 80 // is a match. If the |starts_with| parameter is empty, the interceptor will
80 // be invoked for every occurrence of the |http_header|. 81 // be invoked for every occurrence of the |http_header|.
81 // Currently only HTTP header based interceptors are supported. 82 // Currently only HTTP header based interceptors are supported.
82 // At the moment we only support one interceptor per |http_header|. 83 // At the moment we only support one interceptor per |http_header|.
83 virtual void RegisterInterceptor(const std::string& http_header, 84 virtual void RegisterInterceptor(const std::string& http_header,
84 const std::string& starts_with, 85 const std::string& starts_with,
85 const InterceptorCallback& interceptor) = 0; 86 const InterceptorCallback& interceptor) = 0;
86 87
88 // Updates the priority for |request|. Modifies request->priority(), and may
89 // start the request loading if it wasn't already started.
90 virtual void ReprioritizeRequest(net::URLRequest* request,
91 net::RequestPriority priority) = 0;
92
87 protected: 93 protected:
88 virtual ~ResourceDispatcherHost() {} 94 virtual ~ResourceDispatcherHost() {}
89 }; 95 };
90 96
91 } // namespace content 97 } // namespace content
92 98
93 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 99 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698