Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: content/browser/download/download_resource_handler.h

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)
Patch Set: Response to comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698