| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Create a new buffer, which will be handed to the download thread for file | 65 // Create a new buffer, which will be handed to the download thread for file |
| 66 // writing and deletion. | 66 // writing and deletion. |
| 67 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 67 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 68 int* buf_size, | 68 int* buf_size, |
| 69 int min_size) override; | 69 int min_size) override; |
| 70 | 70 |
| 71 bool OnReadCompleted(int bytes_read, bool* defer) override; | 71 bool OnReadCompleted(int bytes_read, bool* defer) override; |
| 72 | 72 |
| 73 void OnResponseCompleted(const net::URLRequestStatus& status, | 73 void OnResponseCompleted(const net::URLRequestStatus& status, |
| 74 const std::string& security_info, | |
| 75 bool* defer) override; | 74 bool* defer) override; |
| 76 | 75 |
| 77 // N/A to this flavor of DownloadHandler. | 76 // N/A to this flavor of DownloadHandler. |
| 78 void OnDataDownloaded(int bytes_downloaded) override; | 77 void OnDataDownloaded(int bytes_downloaded) override; |
| 79 | 78 |
| 80 void PauseRequest(); | 79 void PauseRequest(); |
| 81 void ResumeRequest(); | 80 void ResumeRequest(); |
| 82 | 81 |
| 83 // May result in this object being deleted by its owner. | 82 // May result in this object being deleted by its owner. |
| 84 void CancelRequest(); | 83 void CancelRequest(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 103 // deletion must occur on the IO thread. | 102 // deletion must occur on the IO thread. |
| 104 std::unique_ptr<DownloadTabInfo> tab_info_; | 103 std::unique_ptr<DownloadTabInfo> tab_info_; |
| 105 | 104 |
| 106 DownloadRequestCore core_; | 105 DownloadRequestCore core_; |
| 107 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 106 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 } // namespace content | 109 } // namespace content |
| 111 | 110 |
| 112 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 111 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
| OLD | NEW |