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

Unified Diff: net/base/filename_util.cc

Issue 1068793002: Fixed "blocking io" from FixupPath on UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed adding cwd aka "blocking IO" used in FixupURL via FilePathToFileURL, also fixed client code Created 5 years, 8 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: net/base/filename_util.cc
diff --git a/net/base/filename_util.cc b/net/base/filename_util.cc
index c9d5fe4b5f2652bb7ab47c57d3cf80fe7ab95b9e..c41da98c17d1846539aaeeca077bca0a2c536a6d 100644
--- a/net/base/filename_util.cc
+++ b/net/base/filename_util.cc
@@ -28,12 +28,6 @@ GURL FilePathToFileURL(const base::FilePath& path) {
// "file://///server/path" for UNC. The URL canonicalizer will fix up the
// latter case to be the canonical UNC form: "file://server/path"
base::FilePath::StringType url_string(kFileURLPrefix);
- if (!path.IsAbsolute()) {
- base::FilePath current_dir;
- PathService::Get(base::DIR_CURRENT, &current_dir);
- url_string.append(current_dir.value());
- url_string.push_back(base::FilePath::kSeparators[0]);
- }
url_string.append(path.value());
// Now do replacement of some characters. Since we assume the input is a

Powered by Google App Engine
This is Rietveld 408576698