| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ResourceResponse* response, | 60 ResourceResponse* response, |
| 61 std::unique_ptr<ResourceController> controller) override; | 61 std::unique_ptr<ResourceController> controller) override; |
| 62 | 62 |
| 63 // Pass-through implementation. | 63 // Pass-through implementation. |
| 64 void OnWillStart(const GURL& url, | 64 void OnWillStart(const GURL& url, |
| 65 std::unique_ptr<ResourceController> controller) override; | 65 std::unique_ptr<ResourceController> controller) override; |
| 66 | 66 |
| 67 // Create a new buffer, which will be handed to the download thread for file | 67 // Create a new buffer, which will be handed to the download thread for file |
| 68 // writing and deletion. | 68 // writing and deletion. |
| 69 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 69 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 70 int* buf_size, | 70 int* buf_size) override; |
| 71 int min_size) override; | |
| 72 | 71 |
| 73 void OnReadCompleted(int bytes_read, | 72 void OnReadCompleted(int bytes_read, |
| 74 std::unique_ptr<ResourceController> controller) override; | 73 std::unique_ptr<ResourceController> controller) override; |
| 75 | 74 |
| 76 void OnResponseCompleted( | 75 void OnResponseCompleted( |
| 77 const net::URLRequestStatus& status, | 76 const net::URLRequestStatus& status, |
| 78 std::unique_ptr<ResourceController> controller) override; | 77 std::unique_ptr<ResourceController> controller) override; |
| 79 | 78 |
| 80 // N/A to this flavor of DownloadHandler. | 79 // N/A to this flavor of DownloadHandler. |
| 81 void OnDataDownloaded(int bytes_downloaded) override; | 80 void OnDataDownloaded(int bytes_downloaded) override; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 107 std::unique_ptr<DownloadTabInfo> tab_info_; | 106 std::unique_ptr<DownloadTabInfo> tab_info_; |
| 108 | 107 |
| 109 DownloadRequestCore core_; | 108 DownloadRequestCore core_; |
| 110 | 109 |
| 111 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 110 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 } // namespace content | 113 } // namespace content |
| 115 | 114 |
| 116 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| OLD | NEW |