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

Unified Diff: net/base/filename_util.h

Issue 1068793002: Fixed "blocking io" from FixupPath on UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed "blocking io" from FixupURL on UI thread 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.h
diff --git a/net/base/filename_util.h b/net/base/filename_util.h
index 6b151bad9b0bb93f859d7ee06a78695360b7569b..7d269720d63fdcbf24243638b3b7b83898b7f6d7 100644
--- a/net/base/filename_util.h
+++ b/net/base/filename_util.h
@@ -20,8 +20,14 @@ namespace net {
// Given the full path to a file name, creates a file: URL. The returned URL
// may not be valid if the input is malformed.
+// Can be used only in IO thread because if adding current diretory to path
+// will indirectly do AssertIOAllowed
davidben 2015/04/14 16:26:22 I think there may be some confusion here. AssertIO
NET_EXPORT GURL FilePathToFileURL(const base::FilePath& path);
+// Variant of FilePathToFileURL, that doesn't add current direstory fo paths
+// that are recognized as relarive. Can be used on any thread.
+NET_EXPORT GURL FilePathToFileURLNoCWD(const base::FilePath& path);
+
// Converts a file: URL back to a filename that can be passed to the OS. The
// file URL must be well-formed (GURL::is_valid() must return true); we don't
// handle degenerate cases here. Returns true on success, false if it isn't a

Powered by Google App Engine
This is Rietveld 408576698