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

Side by Side Diff: webkit/fileapi/file_system_url_request_job.cc

Issue 11098067: fileapi: Add modification time check for FileSystemFileStreamReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix leak in test Created 8 years, 2 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/fileapi/file_system_url_request_job.h" 5 #include "webkit/fileapi/file_system_url_request_job.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 remaining_bytes_ = byte_range_.last_byte_position() - 200 remaining_bytes_ = byte_range_.last_byte_position() -
201 byte_range_.first_byte_position() + 1; 201 byte_range_.first_byte_position() + 1;
202 DCHECK_GE(remaining_bytes_, 0); 202 DCHECK_GE(remaining_bytes_, 0);
203 203
204 DCHECK(!reader_.get()); 204 DCHECK(!reader_.get());
205 reader_.reset( 205 reader_.reset(
206 file_system_context_->CreateFileStreamReader( 206 file_system_context_->CreateFileStreamReader(
207 url_, 207 url_,
208 byte_range_.first_byte_position())); 208 byte_range_.first_byte_position(),
209 base::Time()));
209 210
210 set_expected_content_size(remaining_bytes_); 211 set_expected_content_size(remaining_bytes_);
211 response_info_.reset(new net::HttpResponseInfo()); 212 response_info_.reset(new net::HttpResponseInfo());
212 response_info_->headers = CreateHttpResponseHeaders(); 213 response_info_->headers = CreateHttpResponseHeaders();
213 NotifyHeadersComplete(); 214 NotifyHeadersComplete();
214 } 215 }
215 216
216 void FileSystemURLRequestJob::DidRead(int result) { 217 void FileSystemURLRequestJob::DidRead(int result) {
217 if (result > 0) 218 if (result > 0)
218 SetStatus(URLRequestStatus()); // Clear the IO_PENDING status 219 SetStatus(URLRequestStatus()); // Clear the IO_PENDING status
(...skipping 23 matching lines...) Expand all
242 } 243 }
243 244
244 return false; 245 return false;
245 } 246 }
246 247
247 void FileSystemURLRequestJob::NotifyFailed(int rv) { 248 void FileSystemURLRequestJob::NotifyFailed(int rv) {
248 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); 249 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
249 } 250 }
250 251
251 } // namespace fileapi 252 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider.h ('k') | webkit/fileapi/isolated_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698