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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 11778016: net: Stop using base::WorkerPool from UploadFileElementReader (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: _ Created 7 years, 11 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
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 // This file contains an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 webkit_glue::ConfigureURLRequestForReferrerPolicy( 458 webkit_glue::ConfigureURLRequestForReferrerPolicy(
459 request_.get(), params->referrer_policy); 459 request_.get(), params->referrer_policy);
460 net::HttpRequestHeaders headers; 460 net::HttpRequestHeaders headers;
461 headers.AddHeadersFromString(params->headers); 461 headers.AddHeadersFromString(params->headers);
462 request_->SetExtraRequestHeaders(headers); 462 request_->SetExtraRequestHeaders(headers);
463 request_->set_load_flags(params->load_flags); 463 request_->set_load_flags(params->load_flags);
464 if (params->request_body) { 464 if (params->request_body) {
465 request_->set_upload(make_scoped_ptr( 465 request_->set_upload(make_scoped_ptr(
466 params->request_body->ResolveElementsAndCreateUploadDataStream( 466 params->request_body->ResolveElementsAndCreateUploadDataStream(
467 static_cast<TestShellRequestContext*>(g_request_context)-> 467 static_cast<TestShellRequestContext*>(g_request_context)->
468 blob_storage_controller()))); 468 blob_storage_controller(),
469 static_cast<TestShellRequestContext*>(g_request_context)->
470 file_system_context())));
469 } 471 }
470 SimpleAppCacheSystem::SetExtraRequestInfo( 472 SimpleAppCacheSystem::SetExtraRequestInfo(
471 request_.get(), params->appcache_host_id, params->request_type); 473 request_.get(), params->appcache_host_id, params->request_type);
472 474
473 download_to_file_ = params->download_to_file; 475 download_to_file_ = params->download_to_file;
474 if (download_to_file_) { 476 if (download_to_file_) {
475 FilePath path; 477 FilePath path;
476 if (file_util::CreateTemporaryFile(&path)) { 478 if (file_util::CreateTemporaryFile(&path)) {
477 downloaded_file_ = ShareableFileReference::GetOrCreate( 479 downloaded_file_ = ShareableFileReference::GetOrCreate(
478 path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, 480 path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 if (!g_file_over_http_mappings) 1152 if (!g_file_over_http_mappings)
1151 g_file_over_http_mappings = new FileOverHTTPPathMappings(); 1153 g_file_over_http_mappings = new FileOverHTTPPathMappings();
1152 g_file_over_http_mappings->AddMapping(file_path_template, http_prefix); 1154 g_file_over_http_mappings->AddMapping(file_path_template, http_prefix);
1153 } 1155 }
1154 1156
1155 // static 1157 // static
1156 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( 1158 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create(
1157 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 1159 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
1158 return new ResourceLoaderBridgeImpl(request_info); 1160 return new ResourceLoaderBridgeImpl(request_info);
1159 } 1161 }
OLDNEW
« webkit/glue/resource_request_body.cc ('K') | « webkit/glue/resource_request_body_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698