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

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

Issue 10828252: Support FileSystem URL in File object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 uint64 offset, 886 uint64 offset,
887 uint64 length, 887 uint64 length,
888 const base::Time& expected_modification_time) { 888 const base::Time& expected_modification_time) {
889 DCHECK(params_.get()); 889 DCHECK(params_.get());
890 if (!params_->upload) 890 if (!params_->upload)
891 params_->upload = new net::UploadData(); 891 params_->upload = new net::UploadData();
892 params_->upload->AppendFileRange(file_path, offset, length, 892 params_->upload->AppendFileRange(file_path, offset, length,
893 expected_modification_time); 893 expected_modification_time);
894 } 894 }
895 895
896 virtual void AppendFileSystemFileRangeToUpload(
897 const GURL& url,
898 uint64 offset,
899 uint64 length,
900 const base::Time& expected_modification_time) {
901 DCHECK(params_.get());
902 if (!params_->upload)
903 params_->upload = new net::UploadData();
904 params_->upload->AppendFileSystemFileRange(url, offset, length,
905 expected_modification_time);
906 }
907
896 virtual void AppendBlobToUpload(const GURL& blob_url) { 908 virtual void AppendBlobToUpload(const GURL& blob_url) {
897 DCHECK(params_.get()); 909 DCHECK(params_.get());
898 if (!params_->upload) 910 if (!params_->upload)
899 params_->upload = new net::UploadData(); 911 params_->upload = new net::UploadData();
900 params_->upload->AppendBlob(blob_url); 912 params_->upload->AppendBlob(blob_url);
901 } 913 }
902 914
903 virtual void SetUploadIdentifier(int64 identifier) { 915 virtual void SetUploadIdentifier(int64 identifier) {
904 DCHECK(params_.get()); 916 DCHECK(params_.get());
905 if (!params_->upload) 917 if (!params_->upload)
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); 1146 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https")));
1135 g_file_over_http_params = new FileOverHTTPParams(file_path_template, 1147 g_file_over_http_params = new FileOverHTTPParams(file_path_template,
1136 http_prefix); 1148 http_prefix);
1137 } 1149 }
1138 1150
1139 // static 1151 // static
1140 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( 1152 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create(
1141 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 1153 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
1142 return new ResourceLoaderBridgeImpl(request_info); 1154 return new ResourceLoaderBridgeImpl(request_info);
1143 } 1155 }
OLDNEW
« net/base/upload_data.h ('K') | « webkit/plugins/ppapi/ppb_url_request_info_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698