OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 break; | 422 break; |
423 case WebHTTPBody::Element::TypeFile: | 423 case WebHTTPBody::Element::TypeFile: |
424 if (element.fileLength == -1) { | 424 if (element.fileLength == -1) { |
425 bridge_->AppendFileToUpload( | 425 bridge_->AppendFileToUpload( |
426 WebStringToFilePath(element.filePath)); | 426 WebStringToFilePath(element.filePath)); |
427 } else { | 427 } else { |
428 bridge_->AppendFileRangeToUpload( | 428 bridge_->AppendFileRangeToUpload( |
429 WebStringToFilePath(element.filePath), | 429 WebStringToFilePath(element.filePath), |
430 static_cast<uint64>(element.fileStart), | 430 static_cast<uint64>(element.fileStart), |
431 static_cast<uint64>(element.fileLength), | 431 static_cast<uint64>(element.fileLength), |
432 base::Time::FromDoubleT(element.fileInfo.modificationTime)); | 432 base::Time::FromDoubleT(element.modificationTime)); |
433 } | 433 } |
434 break; | 434 break; |
435 case WebHTTPBody::Element::TypeBlob: | 435 case WebHTTPBody::Element::TypeBlob: |
436 bridge_->AppendBlobToUpload(GURL(element.blobURL)); | 436 bridge_->AppendBlobToUpload(GURL(element.blobURL)); |
437 break; | 437 break; |
438 default: | 438 default: |
439 NOTREACHED(); | 439 NOTREACHED(); |
440 } | 440 } |
441 } | 441 } |
442 bridge_->SetUploadIdentifier(request.httpBody().identifier()); | 442 bridge_->SetUploadIdentifier(request.httpBody().identifier()); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 692 |
693 void WebURLLoaderImpl::cancel() { | 693 void WebURLLoaderImpl::cancel() { |
694 context_->Cancel(); | 694 context_->Cancel(); |
695 } | 695 } |
696 | 696 |
697 void WebURLLoaderImpl::setDefersLoading(bool value) { | 697 void WebURLLoaderImpl::setDefersLoading(bool value) { |
698 context_->SetDefersLoading(value); | 698 context_->SetDefersLoading(value); |
699 } | 699 } |
700 | 700 |
701 } // namespace webkit_glue | 701 } // namespace webkit_glue |
OLD | NEW |