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

Unified Diff: chrome/browser/chromeos/file_manager/filesystem_api_util.h

Issue 294163010: Refactor "IsUnderDriveMountPoint" in v2 app code for generalization to non-Drive volumes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Created 6 years, 7 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 | « apps/launcher.cc ('k') | chrome/browser/chromeos/file_manager/filesystem_api_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/filesystem_api_util.h
diff --git a/chrome/browser/chromeos/file_manager/filesystem_api_util.h b/chrome/browser/chromeos/file_manager/filesystem_api_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ce7a6be15c05f482090b3af7a99f835762bbbf6
--- /dev/null
+++ b/chrome/browser/chromeos/file_manager/filesystem_api_util.h
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// The file contains utility functions to implement chrome.fileSystem API for
+// file paths that do not directly map to host machine's file system path, such
+// as Google Drive or virtual volumes provided by fileSystemProvider extensions.
+
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_
+
+#include <string>
+
+#include "base/callback_forward.h"
+
+class Profile;
+
+namespace base {
+class FilePath;
+} // namespace base
+
+namespace file_manager {
+namespace util {
+
+// Checks whether the given |path| points to a non-local filesystem that
+// requires special handling.
+bool IsUnderNonNativeLocalPath(Profile* profile, const base::FilePath& path);
+
+// Returns the mime type of the file pointed by |path|, and asynchronously sends
+// the result to |callback|.
+void GetNonNativeLocalPathMimeType(
+ Profile* profile,
+ const base::FilePath& path,
+ const base::Callback<void(bool, const std::string&)>& callback);
+
+// Checks whether the |path| points to a directory, and asynchronously sends
+// the result to |callback|.
+void IsNonNativeLocalPathDirectory(
+ Profile* profile,
+ const base::FilePath& path,
+ const base::Callback<void(bool)>& callback);
+
+// Prepares a writable file at |path|, i.e., creates a file there if it didn't
+// exist, and asynchronously sends to |callback| whether it succeeded.
+void PrepareNonNativeLocalPathWritableFile(
+ Profile* profile,
+ const base::FilePath& path,
+ const base::Callback<void(bool)>& callback);
+
+} // namespace util
+} // namespace file_manager
+
+#endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_
« no previous file with comments | « apps/launcher.cc ('k') | chrome/browser/chromeos/file_manager/filesystem_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698