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_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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "content/public/browser/download_id.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 | 11 |
11 namespace net { | 12 namespace net { |
12 class URLRequest; | 13 class URLRequest; |
13 } | 14 } |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class DownloadItem; | 18 class DownloadItem; |
18 class ResourceContext; | 19 class ResourceContext; |
(...skipping 23 matching lines...) Expand all Loading... |
42 // request was generated from a web page, and hence may not be as trustworthy | 43 // request was generated from a web page, and hence may not be as trustworthy |
43 // as a browser generated request. | 44 // as a browser generated request. |
44 virtual net::Error BeginDownload( | 45 virtual net::Error BeginDownload( |
45 scoped_ptr<net::URLRequest> request, | 46 scoped_ptr<net::URLRequest> request, |
46 bool is_content_initiated, | 47 bool is_content_initiated, |
47 ResourceContext* context, | 48 ResourceContext* context, |
48 int child_id, | 49 int child_id, |
49 int route_id, | 50 int route_id, |
50 bool prefer_cache, | 51 bool prefer_cache, |
51 scoped_ptr<DownloadSaveInfo> save_info, | 52 scoped_ptr<DownloadSaveInfo> save_info, |
| 53 const std::string& last_modified, |
| 54 const std::string& etag, |
| 55 content::DownloadId download_id, |
52 const DownloadStartedCallback& started_callback) = 0; | 56 const DownloadStartedCallback& started_callback) = 0; |
53 | 57 |
54 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. | 58 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. |
55 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; | 59 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; |
56 | 60 |
57 // Causes all new requests for the route identified by |child_id| and | 61 // Causes all new requests for the route identified by |child_id| and |
58 // |route_id| to be blocked (not being started) until | 62 // |route_id| to be blocked (not being started) until |
59 // ResumeBlockedRequestsForRoute is called. | 63 // ResumeBlockedRequestsForRoute is called. |
60 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; | 64 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; |
61 | 65 |
62 // Resumes any blocked request for the specified route id. | 66 // Resumes any blocked request for the specified route id. |
63 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; | 67 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; |
64 | 68 |
65 protected: | 69 protected: |
66 virtual ~ResourceDispatcherHost() {} | 70 virtual ~ResourceDispatcherHost() {} |
67 }; | 71 }; |
68 | 72 |
69 } // namespace content | 73 } // namespace content |
70 | 74 |
71 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 75 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |