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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
6 | 6 |
7 #include "webkit/child/weburlloader_impl.h" | 7 #include "webkit/child/weburlloader_impl.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 GURL file_system_url = element.fileSystemURL; | 427 GURL file_system_url = element.fileSystemURL; |
428 DCHECK(file_system_url.SchemeIsFileSystem()); | 428 DCHECK(file_system_url.SchemeIsFileSystem()); |
429 request_body->AppendFileSystemFileRange( | 429 request_body->AppendFileSystemFileRange( |
430 file_system_url, | 430 file_system_url, |
431 static_cast<uint64>(element.fileStart), | 431 static_cast<uint64>(element.fileStart), |
432 static_cast<uint64>(element.fileLength), | 432 static_cast<uint64>(element.fileLength), |
433 base::Time::FromDoubleT(element.modificationTime)); | 433 base::Time::FromDoubleT(element.modificationTime)); |
434 break; | 434 break; |
435 } | 435 } |
436 case WebHTTPBody::Element::TypeBlob: | 436 case WebHTTPBody::Element::TypeBlob: |
437 #ifdef USE_BLOB_UUIDS | |
438 request_body->AppendBlob(element.blobUUID.utf8()); | 437 request_body->AppendBlob(element.blobUUID.utf8()); |
439 #else | |
440 request_body->AppendBlobDeprecated(GURL(element.blobURL)); | |
441 #endif | |
442 break; | 438 break; |
443 default: | 439 default: |
444 NOTREACHED(); | 440 NOTREACHED(); |
445 } | 441 } |
446 } | 442 } |
447 request_body->set_identifier(request.httpBody().identifier()); | 443 request_body->set_identifier(request.httpBody().identifier()); |
448 bridge_->SetRequestBody(request_body.get()); | 444 bridge_->SetRequestBody(request_body.get()); |
449 } | 445 } |
450 | 446 |
451 if (sync_load_response) { | 447 if (sync_load_response) { |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 845 |
850 void WebURLLoaderImpl::setDefersLoading(bool value) { | 846 void WebURLLoaderImpl::setDefersLoading(bool value) { |
851 context_->SetDefersLoading(value); | 847 context_->SetDefersLoading(value); |
852 } | 848 } |
853 | 849 |
854 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { | 850 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { |
855 context_->DidChangePriority(new_priority); | 851 context_->DidChangePriority(new_priority); |
856 } | 852 } |
857 | 853 |
858 } // namespace webkit_glue | 854 } // namespace webkit_glue |
OLD | NEW |