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/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 webkit_base::WebStringToFilePath(element.filePath), | 503 webkit_base::WebStringToFilePath(element.filePath), |
504 0, kuint64max, base::Time()); | 504 0, kuint64max, base::Time()); |
505 } else { | 505 } else { |
506 request_body->AppendFileRange( | 506 request_body->AppendFileRange( |
507 webkit_base::WebStringToFilePath(element.filePath), | 507 webkit_base::WebStringToFilePath(element.filePath), |
508 static_cast<uint64>(element.fileStart), | 508 static_cast<uint64>(element.fileStart), |
509 static_cast<uint64>(element.fileLength), | 509 static_cast<uint64>(element.fileLength), |
510 base::Time::FromDoubleT(element.modificationTime)); | 510 base::Time::FromDoubleT(element.modificationTime)); |
511 } | 511 } |
512 break; | 512 break; |
513 case WebHTTPBody::Element::TypeURL: { | 513 case WebHTTPBody::Element::TypeFileSystemURL: { |
514 GURL url = GURL(element.url); | 514 GURL url = GURL(element.fileSystemURL); |
515 DCHECK(url.SchemeIsFileSystem()); | 515 DCHECK(url.SchemeIsFileSystem()); |
516 request_body->AppendFileSystemFileRange( | 516 request_body->AppendFileSystemFileRange( |
517 url, | 517 url, |
518 static_cast<uint64>(element.fileStart), | 518 static_cast<uint64>(element.fileStart), |
519 static_cast<uint64>(element.fileLength), | 519 static_cast<uint64>(element.fileLength), |
520 base::Time::FromDoubleT(element.modificationTime)); | 520 base::Time::FromDoubleT(element.modificationTime)); |
521 break; | 521 break; |
522 } | 522 } |
523 case WebHTTPBody::Element::TypeBlob: | 523 case WebHTTPBody::Element::TypeBlob: |
524 request_body->AppendBlob(GURL(element.blobURL)); | 524 request_body->AppendBlob(element.blobUUID.utf8()); |
525 break; | 525 break; |
526 default: | 526 default: |
527 NOTREACHED(); | 527 NOTREACHED(); |
528 } | 528 } |
529 } | 529 } |
530 request_body->set_identifier(request.httpBody().identifier()); | 530 request_body->set_identifier(request.httpBody().identifier()); |
531 bridge_->SetRequestBody(request_body); | 531 bridge_->SetRequestBody(request_body); |
532 } | 532 } |
533 | 533 |
534 if (sync_load_response) { | 534 if (sync_load_response) { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 | 816 |
817 void WebURLLoaderImpl::setDefersLoading(bool value) { | 817 void WebURLLoaderImpl::setDefersLoading(bool value) { |
818 context_->SetDefersLoading(value); | 818 context_->SetDefersLoading(value); |
819 } | 819 } |
820 | 820 |
821 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { | 821 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { |
822 context_->DidChangePriority(new_priority); | 822 context_->DidChangePriority(new_priority); |
823 } | 823 } |
824 | 824 |
825 } // namespace webkit_glue | 825 } // namespace webkit_glue |
OLD | NEW |