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

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

Issue 10815003: Adding FileUtil::CreateSnapshotFile (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
« no previous file with comments | « webkit/fileapi/isolated_file_util.h ('k') | webkit/fileapi/local_file_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/isolated_file_util.h" 5 #include "webkit/fileapi/isolated_file_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "webkit/blob/shareable_file_reference.h"
11 #include "webkit/fileapi/file_system_context.h" 12 #include "webkit/fileapi/file_system_context.h"
12 #include "webkit/fileapi/file_system_operation_context.h" 13 #include "webkit/fileapi/file_system_operation_context.h"
13 #include "webkit/fileapi/file_system_url.h" 14 #include "webkit/fileapi/file_system_url.h"
14 #include "webkit/fileapi/isolated_context.h" 15 #include "webkit/fileapi/isolated_context.h"
15 #include "webkit/fileapi/native_file_util.h" 16 #include "webkit/fileapi/native_file_util.h"
16 17
17 using base::PlatformFileError; 18 using base::PlatformFileError;
18 using base::PlatformFileInfo; 19 using base::PlatformFileInfo;
19 20
20 namespace fileapi { 21 namespace fileapi {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 const FileSystemURL& url) { 365 const FileSystemURL& url) {
365 return base::PLATFORM_FILE_ERROR_SECURITY; 366 return base::PLATFORM_FILE_ERROR_SECURITY;
366 } 367 }
367 368
368 PlatformFileError IsolatedFileUtil::DeleteSingleDirectory( 369 PlatformFileError IsolatedFileUtil::DeleteSingleDirectory(
369 FileSystemOperationContext* context, 370 FileSystemOperationContext* context,
370 const FileSystemURL& url) { 371 const FileSystemURL& url) {
371 return base::PLATFORM_FILE_ERROR_SECURITY; 372 return base::PLATFORM_FILE_ERROR_SECURITY;
372 } 373 }
373 374
375 scoped_refptr<webkit_blob::ShareableFileReference>
376 IsolatedFileUtil::CreateSnapshotFile(
377 FileSystemOperationContext* context,
378 const FileSystemURL& url,
379 base::PlatformFileError* result,
380 base::PlatformFileInfo* file_info,
381 FilePath* platform_path) {
382 DCHECK(result);
383 *result = GetFileInfo(context, url, file_info, platform_path);
384 return NULL;
385 }
386
374 bool IsolatedFileUtil::GetPlatformPath(const FileSystemURL& url, 387 bool IsolatedFileUtil::GetPlatformPath(const FileSystemURL& url,
375 FilePath* platform_path) const { 388 FilePath* platform_path) const {
376 DCHECK(platform_path); 389 DCHECK(platform_path);
377 std::string filesystem_id; 390 std::string filesystem_id;
378 if (!IsolatedContext::GetInstance()->CrackIsolatedPath( 391 if (!IsolatedContext::GetInstance()->CrackIsolatedPath(
379 url.path(), &filesystem_id, NULL, platform_path)) 392 url.path(), &filesystem_id, NULL, platform_path))
380 return false; 393 return false;
381 return true; 394 return true;
382 } 395 }
383 396
384 } // namespace 397 } // namespace
OLDNEW
« no previous file with comments | « webkit/fileapi/isolated_file_util.h ('k') | webkit/fileapi/local_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698