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

Unified Diff: chrome/browser/extensions/extension_file_browser_private_api.cc

Issue 7312023: Refactoring: Change all -FileUtils non-Singleton and to own underlying FileUtils. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reflected the comments. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/chromeos/fileapi/cros_mount_point_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_file_browser_private_api.cc
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc
index 93fbb2e655da52e117999132d462b2a9afeecb69..b060c5772a5ff11dddf786eefeb697faf16323df 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -695,16 +695,11 @@ class ExecuteTasksFileSystemCallbackDispatcher
// Check if this file system entry exists first.
base::PlatformFileInfo file_info;
- FilePath platform_path;
- fileapi::FileSystemOperationContext file_system_operation_context(
- profile_->GetFileSystemContext(),
- external_provider->GetFileSystemFileUtil());
- if (base::PLATFORM_FILE_OK !=
- fileapi::FileSystemFileUtil::GetInstance()->GetFileInfo(
- &file_system_operation_context, final_file_path, &file_info,
- &platform_path)) {
+
+ if (!file_util::PathExists(final_file_path) ||
+ file_util::IsLink(final_file_path) ||
+ !file_util::GetFileInfo(final_file_path, &file_info))
return false;
- }
// TODO(zelidrag): Let's just prevent all symlinks for now. We don't want a
// USB drive content to point to something in the rest of the file system.
« no previous file with comments | « no previous file | webkit/chromeos/fileapi/cros_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698