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

Unified Diff: chrome/browser/extensions/api/file_handlers/directory_util.cc

Issue 2666763005: API delegate for non-native file systems (Closed)
Patch Set: rebase Created 3 years, 10 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
Index: chrome/browser/extensions/api/file_handlers/directory_util.cc
diff --git a/chrome/browser/extensions/api/file_handlers/directory_util.cc b/chrome/browser/extensions/api/file_handlers/directory_util.cc
index 11ccd0d6c1504bf3ac20cd141875e98cc30da204..c01951efe3999586e036dda34eede54122c9a158 100644
--- a/chrome/browser/extensions/api/file_handlers/directory_util.cc
+++ b/chrome/browser/extensions/api/file_handlers/directory_util.cc
@@ -13,7 +13,8 @@
#include "storage/browser/fileapi/file_system_url.h"
#if defined(OS_CHROMEOS)
-#include "chrome/browser/chromeos/file_manager/filesystem_api_util.h"
+#include "extensions/browser/api/extensions_api_client.h"
+#include "extensions/browser/api/file_handlers/non_native_file_system_delegate.h"
#endif
namespace extensions {
@@ -40,8 +41,10 @@ void EntryIsDirectory(Profile* profile,
const base::FilePath& path,
const base::Callback<void(bool)>& callback) {
#if defined(OS_CHROMEOS)
- if (file_manager::util::IsUnderNonNativeLocalPath(profile, path)) {
- file_manager::util::IsNonNativeLocalPathDirectory(profile, path, callback);
+ NonNativeFileSystemDelegate* delegate =
+ ExtensionsAPIClient::Get()->GetNonNativeFileSystemDelegate();
+ if (delegate && delegate->IsUnderNonNativeLocalPath(profile, path)) {
+ delegate->IsNonNativeLocalPathDirectory(profile, path, callback);
return;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698