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

Side by Side Diff: webkit/blob/blob_url_request_job.h

Issue 10067026: Accomodate files larger than maxint in size in blob/file reading. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | webkit/blob/blob_url_request_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void SetExtraRequestHeaders( 48 virtual void SetExtraRequestHeaders(
49 const net::HttpRequestHeaders& headers) OVERRIDE; 49 const net::HttpRequestHeaders& headers) OVERRIDE;
50 50
51 private: 51 private:
52 typedef std::map<size_t, LocalFileReader*> IndexToReaderMap; 52 typedef std::map<size_t, LocalFileReader*> IndexToReaderMap;
53 53
54 // For preparing for read: get the size, apply the range and perform seek. 54 // For preparing for read: get the size, apply the range and perform seek.
55 void DidStart(); 55 void DidStart();
56 void CountSize(); 56 void CountSize();
57 void DidCountSize(int error); 57 void DidCountSize(int error);
58 void DidGetFileItemLength(size_t index, int result); 58 void DidGetFileItemLength(size_t index, int64 result);
59 void Seek(int64 offset); 59 void Seek(int64 offset);
60 60
61 // For reading the blob. 61 // For reading the blob.
62 bool ReadLoop(int* bytes_read); 62 bool ReadLoop(int* bytes_read);
63 bool ReadItem(); 63 bool ReadItem();
64 void AdvanceItem(); 64 void AdvanceItem();
65 void AdvanceBytesRead(int result); 65 void AdvanceBytesRead(int result);
66 bool ReadBytesItem(const BlobData::Item& item, int bytes_to_read); 66 bool ReadBytesItem(const BlobData::Item& item, int bytes_to_read);
67 bool ReadFileItem(LocalFileReader* reader, int bytes_to_read); 67 bool ReadFileItem(LocalFileReader* reader, int bytes_to_read);
68 68
(...skipping 27 matching lines...) Expand all
96 bool byte_range_set_; 96 bool byte_range_set_;
97 net::HttpByteRange byte_range_; 97 net::HttpByteRange byte_range_;
98 scoped_ptr<net::HttpResponseInfo> response_info_; 98 scoped_ptr<net::HttpResponseInfo> response_info_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); 100 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob);
101 }; 101 };
102 102
103 } // namespace webkit_blob 103 } // namespace webkit_blob
104 104
105 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ 105 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/blob/blob_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698