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

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

Issue 10810053: Enables internal filesystem types via Isolated filesystems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/fileapi/local_file_util.h" 5 #include "webkit/fileapi/local_file_util.h"
6 6
7 #include "base/file_util_proxy.h" 7 #include "base/file_util_proxy.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "webkit/fileapi/file_system_context.h" 9 #include "webkit/fileapi/file_system_context.h"
10 #include "webkit/fileapi/file_system_mount_point_provider.h" 10 #include "webkit/fileapi/file_system_mount_point_provider.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 file_path, root_url.path(), recursive, 146 file_path, root_url.path(), recursive,
147 static_cast<file_util::FileEnumerator::FileType>( 147 static_cast<file_util::FileEnumerator::FileType>(
148 file_util::FileEnumerator::FILES | 148 file_util::FileEnumerator::FILES |
149 file_util::FileEnumerator::DIRECTORIES)); 149 file_util::FileEnumerator::DIRECTORIES));
150 } 150 }
151 151
152 PlatformFileError LocalFileUtil::GetLocalFilePath( 152 PlatformFileError LocalFileUtil::GetLocalFilePath(
153 FileSystemOperationContext* context, 153 FileSystemOperationContext* context,
154 const FileSystemURL& url, 154 const FileSystemURL& url,
155 FilePath* local_file_path) { 155 FilePath* local_file_path) {
156
157 FileSystemMountPointProvider* provider = 156 FileSystemMountPointProvider* provider =
158 context->file_system_context()->GetMountPointProvider(url.type()); 157 context->file_system_context()->GetMountPointProvider(url.type());
159 DCHECK(provider); 158 DCHECK(provider);
160 FilePath root = provider->GetFileSystemRootPathOnFileThread( 159 FilePath root = provider->GetFileSystemRootPathOnFileThread(
161 url.origin(), url.type(), url.path(), false); 160 url.origin(), url.type(), url.path(), false);
162 if (root.empty()) 161 if (root.empty())
163 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 162 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
164 *local_file_path = root.Append(url.path()); 163 *local_file_path = root.Append(url.path());
165 return base::PLATFORM_FILE_OK; 164 return base::PLATFORM_FILE_OK;
166 } 165 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 base::PlatformFileInfo* file_info, 276 base::PlatformFileInfo* file_info,
278 FilePath* platform_path) { 277 FilePath* platform_path) {
279 DCHECK(result); 278 DCHECK(result);
280 *result = GetFileInfo(context, url, file_info, platform_path); 279 *result = GetFileInfo(context, url, file_info, platform_path);
281 // We don't want the third party to delete our local file, so just returning 280 // We don't want the third party to delete our local file, so just returning
282 // NULL. 281 // NULL.
283 return NULL; 282 return NULL;
284 } 283 }
285 284
286 } // namespace fileapi 285 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698