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_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, | 45 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
46 ResourceResponse* response, | 46 ResourceResponse* response, |
47 bool* defer) override; | 47 bool* defer) override; |
48 | 48 |
49 // Send the download creation information to the download thread. | 49 // Send the download creation information to the download thread. |
50 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; | 50 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; |
51 | 51 |
52 // Pass-through implementation. | 52 // Pass-through implementation. |
53 bool OnWillStart(const GURL& url, bool* defer) override; | 53 bool OnWillStart(const GURL& url, bool* defer) override; |
54 | 54 |
55 // Pass-through implementation. | |
56 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override; | |
57 | |
58 // Create a new buffer, which will be handed to the download thread for file | 55 // Create a new buffer, which will be handed to the download thread for file |
59 // writing and deletion. | 56 // writing and deletion. |
60 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 57 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
61 int* buf_size, | 58 int* buf_size, |
62 int min_size) override; | 59 int min_size) override; |
63 | 60 |
64 bool OnReadCompleted(int bytes_read, bool* defer) override; | 61 bool OnReadCompleted(int bytes_read, bool* defer) override; |
65 | 62 |
66 void OnResponseCompleted(const net::URLRequestStatus& status, | 63 void OnResponseCompleted(const net::URLRequestStatus& status, |
67 const std::string& security_info, | 64 const std::string& security_info, |
(...skipping 28 matching lines...) Expand all Loading... |
96 // deletion must occur on the IO thread. | 93 // deletion must occur on the IO thread. |
97 std::unique_ptr<DownloadTabInfo> tab_info_; | 94 std::unique_ptr<DownloadTabInfo> tab_info_; |
98 | 95 |
99 DownloadRequestCore core_; | 96 DownloadRequestCore core_; |
100 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 97 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
101 }; | 98 }; |
102 | 99 |
103 } // namespace content | 100 } // namespace content |
104 | 101 |
105 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 102 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
OLD | NEW |