| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.fileInfo.modificationTime)); |
| 433 } | 433 } |
| 434 break; | 434 break; |
| 435 case WebHTTPBody::Element::TypeBlob: |
| 436 bridge_->AppendBlobToUpload(GURL(element.blobURL)); |
| 437 break; |
| 435 default: | 438 default: |
| 436 NOTREACHED(); | 439 NOTREACHED(); |
| 437 } | 440 } |
| 438 } | 441 } |
| 439 bridge_->SetUploadIdentifier(request.httpBody().identifier()); | 442 bridge_->SetUploadIdentifier(request.httpBody().identifier()); |
| 440 } | 443 } |
| 441 | 444 |
| 442 if (sync_load_response) { | 445 if (sync_load_response) { |
| 443 bridge_->SyncLoad(sync_load_response); | 446 bridge_->SyncLoad(sync_load_response); |
| 444 return; | 447 return; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 692 |
| 690 void WebURLLoaderImpl::cancel() { | 693 void WebURLLoaderImpl::cancel() { |
| 691 context_->Cancel(); | 694 context_->Cancel(); |
| 692 } | 695 } |
| 693 | 696 |
| 694 void WebURLLoaderImpl::setDefersLoading(bool value) { | 697 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 695 context_->SetDefersLoading(value); | 698 context_->SetDefersLoading(value); |
| 696 } | 699 } |
| 697 | 700 |
| 698 } // namespace webkit_glue | 701 } // namespace webkit_glue |
| OLD | NEW |