Index: mojo/shell/filename_util.h |
diff --git a/mojo/shell/filename_util.h b/mojo/shell/filename_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..28d0e780a9910576e031f0b578d81318a152277e |
--- /dev/null |
+++ b/mojo/shell/filename_util.h |
@@ -0,0 +1,28 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SHELL_FILENAME_UTIL_H_ |
+#define SHELL_FILENAME_UTIL_H_ |
+ |
+class GURL; |
+ |
+namespace base { |
+class FilePath; |
+} |
+ |
+namespace mojo { |
+namespace shell { |
+ |
+// Given the full path to a file name, creates a file: URL. The returned URL |
+// may not be valid if the input is malformed. |
+GURL FilePathToFileURL(const base::FilePath& path); |
+ |
+// This URL is going to be treated as a directory. Ensure there is a trailing |
+// slash so that GURL.Resolve(...) works correctly. |
+GURL AddTrailingSlashIfNeeded(const GURL& url); |
+ |
+} // namespace shell |
+} // namespace mojo |
+ |
+#endif // SHELL_FILENAME_UTIL_H_ |