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

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

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
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/fileapi/file_system_url_request_job.h" 5 #include "webkit/browser/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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 NotifyFailed(net::ERR_FILE_NOT_FOUND); 162 NotifyFailed(net::ERR_FILE_NOT_FOUND);
163 return; 163 return;
164 } 164 }
165 file_system_context_->operation_runner()->GetMetadata( 165 file_system_context_->operation_runner()->GetMetadata(
166 url_, 166 url_,
167 base::Bind(&FileSystemURLRequestJob::DidGetMetadata, 167 base::Bind(&FileSystemURLRequestJob::DidGetMetadata,
168 weak_factory_.GetWeakPtr())); 168 weak_factory_.GetWeakPtr()));
169 } 169 }
170 170
171 void FileSystemURLRequestJob::DidGetMetadata( 171 void FileSystemURLRequestJob::DidGetMetadata(
172 base::PlatformFileError error_code, 172 base::File::Error error_code,
173 const base::PlatformFileInfo& file_info) { 173 const base::File::Info& file_info) {
174 if (error_code != base::PLATFORM_FILE_OK) { 174 if (error_code != base::File::FILE_OK) {
175 NotifyFailed(error_code == base::PLATFORM_FILE_ERROR_INVALID_URL ? 175 NotifyFailed(error_code == base::File::FILE_ERROR_INVALID_URL ?
176 net::ERR_INVALID_URL : net::ERR_FILE_NOT_FOUND); 176 net::ERR_INVALID_URL : net::ERR_FILE_NOT_FOUND);
177 return; 177 return;
178 } 178 }
179 179
180 // We may have been orphaned... 180 // We may have been orphaned...
181 if (!request_) 181 if (!request_)
182 return; 182 return;
183 183
184 is_directory_ = file_info.is_directory; 184 is_directory_ = file_info.is_directory;
185 185
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 return false; 238 return false;
239 } 239 }
240 240
241 void FileSystemURLRequestJob::NotifyFailed(int rv) { 241 void FileSystemURLRequestJob::NotifyFailed(int rv) {
242 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); 242 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
243 } 243 }
244 244
245 } // namespace fileapi 245 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_url_request_job.h ('k') | webkit/browser/fileapi/file_writer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698