James Robinson | 24218d7 | 2014-10-20 16:18:41 -0700 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
James Robinson | b4b7af2 | 2014-12-05 11:21:01 -0800 | [diff] [blame] | 5 | #ifndef SHELL_FILENAME_UTIL_H_ |
| 6 | #define SHELL_FILENAME_UTIL_H_ |
James Robinson | 24218d7 | 2014-10-20 16:18:41 -0700 | [diff] [blame] | 7 | |
| 8 | class GURL; |
| 9 | |
| 10 | namespace base { |
| 11 | class FilePath; |
| 12 | } |
| 13 | |
Viet-Trung Luu | 36faa4d | 2015-03-04 18:08:18 -0800 | [diff] [blame] | 14 | namespace shell { |
James Robinson | 24218d7 | 2014-10-20 16:18:41 -0700 | [diff] [blame] | 15 | |
| 16 | // Given the full path to a file name, creates a file: URL. The returned URL |
| 17 | // may not be valid if the input is malformed. |
| 18 | GURL FilePathToFileURL(const base::FilePath& path); |
| 19 | |
Nick Bray | 29e5fc6 | 2015-01-27 12:21:30 -0800 | [diff] [blame] | 20 | // This URL is going to be treated as a directory. Ensure there is a trailing |
| 21 | // slash so that GURL.Resolve(...) works correctly. |
| 22 | GURL AddTrailingSlashIfNeeded(const GURL& url); |
| 23 | |
Viet-Trung Luu | 36faa4d | 2015-03-04 18:08:18 -0800 | [diff] [blame] | 24 | } // namespace shell |
James Robinson | 24218d7 | 2014-10-20 16:18:41 -0700 | [diff] [blame] | 25 | |
James Robinson | b4b7af2 | 2014-12-05 11:21:01 -0800 | [diff] [blame] | 26 | #endif // SHELL_FILENAME_UTIL_H_ |