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

Side by Side Diff: webkit/glue/weburlloader_impl.cc

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years 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 // 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 webkit_base::WebStringToFilePath(element.filePath), 463 webkit_base::WebStringToFilePath(element.filePath),
464 0, kuint64max, base::Time()); 464 0, kuint64max, base::Time());
465 } else { 465 } else {
466 request_body->AppendFileRange( 466 request_body->AppendFileRange(
467 webkit_base::WebStringToFilePath(element.filePath), 467 webkit_base::WebStringToFilePath(element.filePath),
468 static_cast<uint64>(element.fileStart), 468 static_cast<uint64>(element.fileStart),
469 static_cast<uint64>(element.fileLength), 469 static_cast<uint64>(element.fileLength),
470 base::Time::FromDoubleT(element.modificationTime)); 470 base::Time::FromDoubleT(element.modificationTime));
471 } 471 }
472 break; 472 break;
473 case WebHTTPBody::Element::TypeURL: { 473 case WebHTTPBody::Element::TypeFileSystemURL: {
474 GURL url = GURL(element.url); 474 GURL url = GURL(element.fileSystemURL);
475 DCHECK(url.SchemeIsFileSystem()); 475 DCHECK(url.SchemeIsFileSystem());
476 request_body->AppendFileSystemFileRange( 476 request_body->AppendFileSystemFileRange(
477 url, 477 url,
478 static_cast<uint64>(element.fileStart), 478 static_cast<uint64>(element.fileStart),
479 static_cast<uint64>(element.fileLength), 479 static_cast<uint64>(element.fileLength),
480 base::Time::FromDoubleT(element.modificationTime)); 480 base::Time::FromDoubleT(element.modificationTime));
481 break; 481 break;
482 } 482 }
483 case WebHTTPBody::Element::TypeBlob: 483 case WebHTTPBody::Element::TypeBlob:
484 request_body->AppendBlob(GURL(element.blobURL)); 484 request_body->AppendBlob(element.blobUUID.utf8());
485 break; 485 break;
486 default: 486 default:
487 NOTREACHED(); 487 NOTREACHED();
488 } 488 }
489 } 489 }
490 request_body->set_identifier(request.httpBody().identifier()); 490 request_body->set_identifier(request.httpBody().identifier());
491 bridge_->SetRequestBody(request_body); 491 bridge_->SetRequestBody(request_body);
492 } 492 }
493 493
494 if (sync_load_response) { 494 if (sync_load_response) {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 772
773 void WebURLLoaderImpl::cancel() { 773 void WebURLLoaderImpl::cancel() {
774 context_->Cancel(); 774 context_->Cancel();
775 } 775 }
776 776
777 void WebURLLoaderImpl::setDefersLoading(bool value) { 777 void WebURLLoaderImpl::setDefersLoading(bool value) {
778 context_->SetDefersLoading(value); 778 context_->SetDefersLoading(value);
779 } 779 }
780 780
781 } // namespace webkit_glue 781 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698