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

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

Issue 18300006: FileAPI: Factor out getting root URI and FS name parts into each FS backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/isolated_file_system_backend.h" 5 #include "webkit/browser/fileapi/isolated_file_system_backend.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 void IsolatedFileSystemBackend::OpenFileSystem( 59 void IsolatedFileSystemBackend::OpenFileSystem(
60 const GURL& origin_url, 60 const GURL& origin_url,
61 FileSystemType type, 61 FileSystemType type,
62 OpenFileSystemMode mode, 62 OpenFileSystemMode mode,
63 const OpenFileSystemCallback& callback) { 63 const OpenFileSystemCallback& callback) {
64 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. 64 // We never allow opening a new isolated FileSystem via usual OpenFileSystem.
65 base::MessageLoopProxy::current()->PostTask( 65 base::MessageLoopProxy::current()->PostTask(
66 FROM_HERE, 66 FROM_HERE,
67 base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY)); 67 base::Bind(callback,
68 GetFileSystemRootURI(origin_url, type),
69 GetFileSystemName(origin_url, type),
70 base::PLATFORM_FILE_ERROR_SECURITY));
68 } 71 }
69 72
70 FileSystemFileUtil* IsolatedFileSystemBackend::GetFileUtil( 73 FileSystemFileUtil* IsolatedFileSystemBackend::GetFileUtil(
71 FileSystemType type) { 74 FileSystemType type) {
72 switch (type) { 75 switch (type) {
73 case kFileSystemTypeNativeLocal: 76 case kFileSystemTypeNativeLocal:
74 return isolated_file_util_->sync_file_util(); 77 return isolated_file_util_->sync_file_util();
75 case kFileSystemTypeDragged: 78 case kFileSystemTypeDragged:
76 return dragged_file_util_->sync_file_util(); 79 return dragged_file_util_->sync_file_util();
77 case kFileSystemTypeForTransientFile: 80 case kFileSystemTypeForTransientFile:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter( 135 return scoped_ptr<FileStreamWriter>(new LocalFileStreamWriter(
133 context->task_runners()->file_task_runner(), url.path(), offset)); 136 context->task_runners()->file_task_runner(), url.path(), offset));
134 } 137 }
135 138
136 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { 139 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() {
137 // No quota support. 140 // No quota support.
138 return NULL; 141 return NULL;
139 } 142 }
140 143
141 } // namespace fileapi 144 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_context.cc ('k') | webkit/browser/fileapi/sandbox_file_system_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698