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

Unified Diff: webkit/glue/weburlloader_impl.cc

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/weburlloader_impl.cc
===================================================================
--- webkit/glue/weburlloader_impl.cc (revision 53197)
+++ webkit/glue/weburlloader_impl.cc (working copy)
@@ -182,6 +182,7 @@
response->setWasFetchedViaProxy(info.was_fetched_via_proxy);
response->setConnectionID(info.connection_id);
response->setConnectionReused(info.connection_reused);
+ response->setDownloadFilePath(FilePathToWebString(info.download_file_path));
WebURLLoadTiming timing;
timing.initialize();
@@ -213,7 +214,7 @@
// pass it to GetSuggestedFilename.
std::string value;
if (headers->EnumerateHeader(NULL, "content-disposition", &value)) {
- response->setSuggestedFileName(webkit_glue::FilePathToWebString(
+ response->setSuggestedFileName(FilePathToWebString(
net::GetSuggestedFilename(url, value, "", FilePath())));
}
@@ -260,6 +261,7 @@
GURL* new_first_party_for_cookies);
virtual void OnReceivedResponse(
const ResourceLoaderBridge::ResponseInfo& info, bool content_filtered);
+ virtual void OnDownloadedData(int len);
virtual void OnReceivedData(const char* data, int len);
virtual void OnReceivedCachedMetadata(const char* data, int len);
virtual void OnCompletedRequest(
@@ -384,7 +386,7 @@
// TODO(brettw) this should take parameter encoding into account when
// creating the GURLs.
- webkit_glue::ResourceLoaderBridge::RequestInfo request_info;
+ ResourceLoaderBridge::RequestInfo request_info;
request_info.method = method;
request_info.url = url;
request_info.first_party_for_cookies = request.firstPartyForCookies();
@@ -397,6 +399,7 @@
request_info.request_type = FromTargetType(request.targetType());
request_info.appcache_host_id = request.appCacheHostID();
request_info.routing_id = request.requestorID();
+ request_info.download_to_file = request.downloadToFile();
bridge_.reset(ResourceLoaderBridge::Create(request_info));
if (!request.httpBody().isNull()) {
@@ -545,6 +548,11 @@
response_url_ = response.url();
}
+void WebURLLoaderImpl::Context::OnDownloadedData(int len) {
+ if (client_)
+ client_->didDownloadData(loader_, len);
+}
+
void WebURLLoaderImpl::Context::OnReceivedData(const char* data, int len) {
if (!client_)
return;
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698