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

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

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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/obfuscated_file_util.h" 5 #include "webkit/browser/fileapi/obfuscated_file_util.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 640 }
641 641
642 PlatformFileError ObfuscatedFileUtil::CopyInForeignFile( 642 PlatformFileError ObfuscatedFileUtil::CopyInForeignFile(
643 FileSystemOperationContext* context, 643 FileSystemOperationContext* context,
644 const base::FilePath& src_file_path, 644 const base::FilePath& src_file_path,
645 const FileSystemURL& dest_url) { 645 const FileSystemURL& dest_url) {
646 SandboxDirectoryDatabase* db = GetDirectoryDatabase(dest_url, true); 646 SandboxDirectoryDatabase* db = GetDirectoryDatabase(dest_url, true);
647 if (!db) 647 if (!db)
648 return base::PLATFORM_FILE_ERROR_FAILED; 648 return base::PLATFORM_FILE_ERROR_FAILED;
649 649
650 base::PlatformFileInfo src_platform_file_info; 650 base::File::Info src_platform_file_info;
651 if (!base::GetFileInfo(src_file_path, &src_platform_file_info)) 651 if (!base::GetFileInfo(src_file_path, &src_platform_file_info))
652 return base::PLATFORM_FILE_ERROR_NOT_FOUND; 652 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
653 653
654 FileId dest_file_id; 654 FileId dest_file_id;
655 bool overwrite = db->GetFileWithPath(dest_url.path(), 655 bool overwrite = db->GetFileWithPath(dest_url.path(),
656 &dest_file_id); 656 &dest_file_id);
657 657
658 FileInfo dest_file_info; 658 FileInfo dest_file_info;
659 base::PlatformFileInfo dest_platform_file_info; // overwrite case only 659 base::PlatformFileInfo dest_platform_file_info; // overwrite case only
660 if (overwrite) { 660 if (overwrite) {
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 } 1409 }
1410 return error; 1410 return error;
1411 } 1411 }
1412 1412
1413 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) { 1413 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) {
1414 return special_storage_policy_.get() && 1414 return special_storage_policy_.get() &&
1415 special_storage_policy_->HasIsolatedStorage(origin); 1415 special_storage_policy_->HasIsolatedStorage(origin);
1416 } 1416 }
1417 1417
1418 } // namespace fileapi 1418 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/native_file_util_unittest.cc ('k') | webkit/browser/fileapi/sandbox_directory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698