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

Side by Side Diff: webkit/fileapi/file_system_dir_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_dir_url_request_job.h" 5 #include "webkit/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util_proxy.h" 10 #include "base/file_util_proxy.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void FileSystemDirURLRequestJob::StartAsync() { 77 void FileSystemDirURLRequestJob::StartAsync() {
78 GURL origin_url; 78 GURL origin_url;
79 FileSystemType type; 79 FileSystemType type;
80 if (!CrackFileSystemURL(request_->url(), &origin_url, &type, 80 if (!CrackFileSystemURL(request_->url(), &origin_url, &type,
81 &relative_dir_path_)) { 81 &relative_dir_path_)) {
82 NotifyFailed(net::ERR_INVALID_URL); 82 NotifyFailed(net::ERR_INVALID_URL);
83 return; 83 return;
84 } 84 }
85 85
86 path_manager_->GetFileSystemRootPath( 86 path_manager_->GetFileSystemRootPath(
87 origin_url, type, false, // create 87 origin_url, type,
88 false, // create
89 false, // is_file_system
90 relative_dir_path_,
88 callback_factory_.NewCallback( 91 callback_factory_.NewCallback(
89 &FileSystemDirURLRequestJob::DidGetRootPath)); 92 &FileSystemDirURLRequestJob::DidGetRootPath));
90 } 93 }
91 94
92 void FileSystemDirURLRequestJob::DidGetRootPath(bool success, 95 void FileSystemDirURLRequestJob::DidGetRootPath(bool success,
93 const FilePath& root_path, 96 const FilePath& root_path,
94 const std::string& name) { 97 const std::string& name) {
95 if (!success) { 98 if (!success) {
96 NotifyFailed(net::ERR_FILE_NOT_FOUND); 99 NotifyFailed(net::ERR_FILE_NOT_FOUND);
97 return; 100 return;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 141
139 set_expected_content_size(data_.size()); 142 set_expected_content_size(data_.size());
140 NotifyHeadersComplete(); 143 NotifyHeadersComplete();
141 } 144 }
142 145
143 void FileSystemDirURLRequestJob::NotifyFailed(int rv) { 146 void FileSystemDirURLRequestJob::NotifyFailed(int rv) {
144 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); 147 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv));
145 } 148 }
146 149
147 } // namespace fileapi 150 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698