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

Unified Diff: chrome/browser/chromeos/fileapi/external_file_url_util.h

Issue 589473002: Files.app: Enable externalfile: protocol for MTP volumes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/chromeos/fileapi/external_file_url_util.h
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_util.h b/chrome/browser/chromeos/fileapi/external_file_url_util.h
index e8618efec40283c36cc8e28f2404aad1c8203c05..459e7893321104c2481110cf50f288231409eed1 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_util.h
+++ b/chrome/browser/chromeos/fileapi/external_file_url_util.h
@@ -12,13 +12,20 @@ namespace base {
class FilePath;
}
+namespace storage {
+class FileSystemURL;
+}
+
namespace chromeos {
-// Returns the external file resource url formatted as "externalfile:<path>"
-GURL FilePathToExternalFileURL(const base::FilePath& path);
+// Obtains the external file url formatted as "externalfile:<path>" from file
+// path. Returns empty URL if the file system does not provide the external file
+// URL.
+GURL FileSystemURLToExternalFileURL(
+ const storage::FileSystemURL& file_system_url);
-// Converts a externalfile: URL back to a path that can be passed to FileSystem.
-base::FilePath ExternalFileURLToFilePath(const GURL& url);
+// Converts a externalfile: URL back to a virtual path of FileSystemURL.
+base::FilePath ExternalFileURLToVirtualPath(Profile* profile, const GURL& url);
// Overwrites |url| with an external file URL when appropriate.
void MaybeSetExternalFileURL(Profile* profile,

Powered by Google App Engine
This is Rietveld 408576698