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

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

Issue 9288084: Added Net logging to FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed copyright issue. Created 8 years, 10 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 | « webkit/blob/blob_url_request_job.cc ('k') | webkit/fileapi/file_writer_delegate.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 #include "webkit/fileapi/file_system_url_request_job.h" 5 #include "webkit/fileapi/file_system_url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util_proxy.h" 10 #include "base/file_util_proxy.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 void FileSystemURLRequestJob::DidOpen(base::PlatformFileError error_code, 262 void FileSystemURLRequestJob::DidOpen(base::PlatformFileError error_code,
263 base::PassPlatformFile file, 263 base::PassPlatformFile file,
264 bool created) { 264 bool created) {
265 if (error_code != base::PLATFORM_FILE_OK) { 265 if (error_code != base::PLATFORM_FILE_OK) {
266 NotifyFailed(error_code); 266 NotifyFailed(error_code);
267 return; 267 return;
268 } 268 }
269 269
270 stream_.reset(new net::FileStream(file.ReleaseValue(), kFileFlags)); 270 stream_.reset(new net::FileStream(file.ReleaseValue(), kFileFlags, NULL));
271 271
272 remaining_bytes_ = byte_range_.last_byte_position() - 272 remaining_bytes_ = byte_range_.last_byte_position() -
273 byte_range_.first_byte_position() + 1; 273 byte_range_.first_byte_position() + 1;
274 DCHECK_GE(remaining_bytes_, 0); 274 DCHECK_GE(remaining_bytes_, 0);
275 275
276 // TODO(adamk): Please remove this ScopedAllowIO once we support async seek on 276 // TODO(adamk): Please remove this ScopedAllowIO once we support async seek on
277 // FileStream. 277 // FileStream.
278 base::ThreadRestrictions::ScopedAllowIO allow_io; 278 base::ThreadRestrictions::ScopedAllowIO allow_io;
279 // Do the seek at the beginning of the request. 279 // Do the seek at the beginning of the request.
280 if (remaining_bytes_ > 0 && 280 if (remaining_bytes_ > 0 &&
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 321 }
322 322
323 return false; 323 return false;
324 } 324 }
325 325
326 void FileSystemURLRequestJob::NotifyFailed(int rv) { 326 void FileSystemURLRequestJob::NotifyFailed(int rv) {
327 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); 327 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
328 } 328 }
329 329
330 } // namespace fileapi 330 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/blob/blob_url_request_job.cc ('k') | webkit/fileapi/file_writer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698