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

Side by Side Diff: webkit/fileapi/sandbox_mount_point_provider.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/sandbox_mount_point_provider.h" 5 #include "webkit/fileapi/sandbox_mount_point_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_callback_factory.h" 8 #include "base/memory/scoped_callback_factory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 std::vector<FilePath> SandboxMountPointProvider::GetRootDirectories() const { 215 std::vector<FilePath> SandboxMountPointProvider::GetRootDirectories() const {
216 NOTREACHED(); 216 NOTREACHED();
217 // TODO(ericu): Implement this method and check for access permissions as 217 // TODO(ericu): Implement this method and check for access permissions as
218 // fileBrowserPrivate extension API does. We currently have another mechanism, 218 // fileBrowserPrivate extension API does. We currently have another mechanism,
219 // but we should switch over. 219 // but we should switch over.
220 return std::vector<FilePath>(); 220 return std::vector<FilePath>();
221 } 221 }
222 222
223 void SandboxMountPointProvider::GetFileSystemRootPath( 223 void SandboxMountPointProvider::GetFileSystemRootPath(
224 const GURL& origin_url, fileapi::FileSystemType type, 224 const GURL& origin_url, fileapi::FileSystemType type,
225 bool create, FileSystemPathManager::GetRootPathCallback* callback_ptr) { 225 bool create, bool is_file_system, const FilePath& virtual_path,
226 FileSystemPathManager::GetRootPathCallback* callback_ptr) {
226 scoped_ptr<FileSystemPathManager::GetRootPathCallback> callback(callback_ptr); 227 scoped_ptr<FileSystemPathManager::GetRootPathCallback> callback(callback_ptr);
227 std::string name; 228 std::string name;
228 FilePath origin_base_path; 229 FilePath origin_base_path;
229 230
230 if (!GetOriginBasePathAndName(origin_url, &origin_base_path, type, &name)) { 231 if (!GetOriginBasePathAndName(origin_url, &origin_base_path, type, &name)) {
231 callback->Run(false, FilePath(), std::string()); 232 callback->Run(false, FilePath(), std::string());
232 return; 233 return;
233 } 234 }
234 235
235 scoped_refptr<GetFileSystemRootPathTask> task( 236 scoped_refptr<GetFileSystemRootPathTask> task(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 317
317 std::string type_string = 318 std::string type_string =
318 FileSystemPathManager::GetFileSystemTypeString(type); 319 FileSystemPathManager::GetFileSystemTypeString(type);
319 DCHECK(!type_string.empty()); 320 DCHECK(!type_string.empty());
320 if (name) 321 if (name)
321 *name = origin_identifier + ":" + type_string; 322 *name = origin_identifier + ":" + type_string;
322 return true; 323 return true;
323 } 324 }
324 325
325 } // namespace fileapi 326 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698