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

Unified Diff: chrome/browser/chromeos/extensions/file_manager_util.cc

Issue 12674003: Fix playing video files with hash in the filename in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added some comments. Created 7 years, 9 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 | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc
index 7c9f1034135663f3212e61df5671a69ff92409a6..1baa0b8a66aa7c029ea197f3d3a814dd364af20c 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager_util.cc
@@ -405,14 +405,18 @@ void OpenFileBrowserImpl(const base::FilePath& path,
arg_value.SetString("action", action_id);
std::string query;
base::JSONWriter::Write(&arg_value, &query);
- url += "?" + net::EscapeUrlEncodedData(query, false);
+ url += "?" +
+ net::EscapeUrlEncodedData(query,
+ false); // Space to %20 instead of +.
}
if (!path.empty()) {
base::FilePath virtual_path;
if (!ConvertFileToRelativeFileSystemPath(profile, kFileBrowserDomain, path,
&virtual_path))
return;
- url += "#/" + net::EscapeUrlEncodedData(virtual_path.value(), false);
+ url += "#/" +
yoshiki 2013/03/26 11:44:50 Should we use "#%2F" instead of "#/", because the
+ net::EscapeUrlEncodedData(virtual_path.value(),
+ false); // Space to %20 instead of +.
}
ExtensionService* service =
@@ -617,7 +621,9 @@ bool ConvertFileToFileSystemUrl(Profile* profile,
GURL base_url = fileapi::GetFileSystemRootURI(origin_url,
fileapi::kFileSystemTypeExternal);
- *url = GURL(base_url.spec() + virtual_path.value());
+ *url = GURL(base_url.spec() +
+ net::EscapeUrlEncodedData(virtual_path.value(),
+ false)); // Space to %20 instead of +.
return true;
}
@@ -699,8 +705,9 @@ GURL GetFileBrowserUrlWithParams(
// kChromeUIFileManagerURL could not be used since query parameters are not
// supported for it.
- std::string url = GetFileBrowserUrl().spec() +
- '?' + net::EscapeUrlEncodedData(json_args, false);
+ std::string url = GetFileBrowserUrl().spec() + '?' +
+ net::EscapeUrlEncodedData(json_args,
+ false); // Space to %20 instead of +.
return GURL(url);
}
@@ -774,7 +781,8 @@ void OpenActionChoiceDialog(const base::FilePath& path) {
&virtual_path))
return;
std::string url = kActionChoiceUrl;
- url += "#/" + net::EscapeUrlEncodedData(virtual_path.value(), false);
+ url += "#/" + net::EscapeUrlEncodedData(virtual_path.value(),
yoshiki 2013/03/26 11:44:50 ditto
+ false); // Space to %20 instead of +.
GURL dialog_url(url);
const gfx::Size screen = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698