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

Side by Side Diff: webkit/browser/blob/blob_url_request_job.cc

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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 #include "webkit/browser/blob/blob_url_request_job.h" 5 #include "webkit/browser/blob/blob_url_request_job.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 FileStreamReader* reader = NULL; 551 FileStreamReader* reader = NULL;
552 switch (item.type()) { 552 switch (item.type()) {
553 case BlobData::Item::TYPE_FILE: 553 case BlobData::Item::TYPE_FILE:
554 reader = new LocalFileStreamReader(file_thread_proxy_.get(), 554 reader = new LocalFileStreamReader(file_thread_proxy_.get(),
555 item.path(), 555 item.path(),
556 item.offset() + additional_offset, 556 item.offset() + additional_offset,
557 item.expected_modification_time()); 557 item.expected_modification_time());
558 break; 558 break;
559 case BlobData::Item::TYPE_FILE_FILESYSTEM: 559 case BlobData::Item::TYPE_FILE_FILESYSTEM:
560 reader = file_system_context_->CreateFileStreamReader( 560 reader = file_system_context_->CreateFileStreamReader(
561 fileapi::FileSystemURL(file_system_context_->CrackURL(item.url())), 561 fileapi::FileSystemURL(
562 file_system_context_->CrackURL(item.filesystem_url())),
562 item.offset() + additional_offset, 563 item.offset() + additional_offset,
563 item.expected_modification_time()).release(); 564 item.expected_modification_time()).release();
564 break; 565 break;
565 default: 566 default:
566 NOTREACHED(); 567 NOTREACHED();
567 } 568 }
568 DCHECK(reader); 569 DCHECK(reader);
569 index_to_reader_[index] = reader; 570 index_to_reader_[index] = reader;
570 } 571 }
571 572
572 } // namespace webkit_blob 573 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « webkit/browser/blob/blob_storage_host.cc ('k') | webkit/browser/blob/blob_url_request_job_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698