| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void OnResponseStarted( | 59 void OnResponseStarted( |
| 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 void OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 70 int* buf_size) override; | 70 int* buf_size, |
| 71 std::unique_ptr<ResourceController> controller) override; |
| 71 | 72 |
| 72 void OnReadCompleted(int bytes_read, | 73 void OnReadCompleted(int bytes_read, |
| 73 std::unique_ptr<ResourceController> controller) override; | 74 std::unique_ptr<ResourceController> controller) override; |
| 74 | 75 |
| 75 void OnResponseCompleted( | 76 void OnResponseCompleted( |
| 76 const net::URLRequestStatus& status, | 77 const net::URLRequestStatus& status, |
| 77 std::unique_ptr<ResourceController> controller) override; | 78 std::unique_ptr<ResourceController> controller) override; |
| 78 | 79 |
| 79 // N/A to this flavor of DownloadHandler. | 80 // N/A to this flavor of DownloadHandler. |
| 80 void OnDataDownloaded(int bytes_downloaded) override; | 81 void OnDataDownloaded(int bytes_downloaded) override; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 106 std::unique_ptr<DownloadTabInfo> tab_info_; | 107 std::unique_ptr<DownloadTabInfo> tab_info_; |
| 107 | 108 |
| 108 DownloadRequestCore core_; | 109 DownloadRequestCore core_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 111 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 } // namespace content | 114 } // namespace content |
| 114 | 115 |
| 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 116 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| OLD | NEW |