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

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

Issue 2437693002: arc: Add URL converter functions (Closed)
Patch Set: Created 4 years, 2 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.cc
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_util.cc b/chrome/browser/chromeos/fileapi/external_file_url_util.cc
index 74910d722cc2584c3509efc299e1cebecbd2e109..42c7e3d34e30e5e8e371be772251c056d79f6c05 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_util.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_util.cc
@@ -37,10 +37,7 @@ GURL FileSystemURLToExternalFileURL(
return GURL();
}
- return GURL(base::StringPrintf(
- "%s:%s",
- content::kExternalFileScheme,
- file_system_url.virtual_path().AsUTF8Unsafe().c_str()));
+ return VirtualPathToExternalFileURL(file_system_url.virtual_path());
}
base::FilePath ExternalFileURLToVirtualPath(const GURL& url) {
@@ -51,6 +48,11 @@ base::FilePath ExternalFileURLToVirtualPath(const GURL& url) {
return base::FilePath::FromUTF8Unsafe(path_string);
}
+GURL VirtualPathToExternalFileURL(const base::FilePath& virtual_path) {
+ return GURL(base::StringPrintf("%s:%s", content::kExternalFileScheme,
+ virtual_path.AsUTF8Unsafe().c_str()));
+}
+
GURL CreateExternalFileURLFromPath(Profile* profile,
const base::FilePath& path) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);

Powered by Google App Engine
This is Rietveld 408576698