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

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

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_util_proxy.h" 8 #include "base/file_util_proxy.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void FileSystemURLRequestJob::StartAsync() { 133 void FileSystemURLRequestJob::StartAsync() {
134 GURL origin_url; 134 GURL origin_url;
135 FileSystemType type; 135 FileSystemType type;
136 if (!CrackFileSystemURL(request_->url(), &origin_url, &type, 136 if (!CrackFileSystemURL(request_->url(), &origin_url, &type,
137 &relative_file_path_)) { 137 &relative_file_path_)) {
138 NotifyFailed(net::ERR_INVALID_URL); 138 NotifyFailed(net::ERR_INVALID_URL);
139 return; 139 return;
140 } 140 }
141 141
142 path_manager_->GetFileSystemRootPath( 142 path_manager_->GetFileSystemRootPath(
143 origin_url, type, false, // create 143 origin_url, type,
144 false, // create
145 false, // is_file_system
146 relative_file_path_,
144 callback_factory_.NewCallback(&FileSystemURLRequestJob::DidGetRootPath)); 147 callback_factory_.NewCallback(&FileSystemURLRequestJob::DidGetRootPath));
145 } 148 }
146 149
147 void FileSystemURLRequestJob::DidGetRootPath(bool success, 150 void FileSystemURLRequestJob::DidGetRootPath(bool success,
148 const FilePath& root_path, 151 const FilePath& root_path,
149 const std::string& name) { 152 const std::string& name) {
150 if (!success) { 153 if (!success) {
151 NotifyFailed(net::ERR_FILE_NOT_FOUND); 154 NotifyFailed(net::ERR_FILE_NOT_FOUND);
152 return; 155 return;
153 } 156 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 247 }
245 248
246 return false; 249 return false;
247 } 250 }
248 251
249 void FileSystemURLRequestJob::NotifyFailed(int rv) { 252 void FileSystemURLRequestJob::NotifyFailed(int rv) {
250 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); 253 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
251 } 254 }
252 255
253 } // namespace fileapi 256 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698