blob: 2652215d654855f621c3fc89b19668735a2ed856 [file] [log] [blame]
James Robinson24218d72014-10-20 16:18:41 -07001// 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 Robinsonb4b7af22014-12-05 11:21:01 -08005#ifndef SHELL_FILENAME_UTIL_H_
6#define SHELL_FILENAME_UTIL_H_
James Robinson24218d72014-10-20 16:18:41 -07007
8class GURL;
9
10namespace base {
11class FilePath;
12}
13
Viet-Trung Luu36faa4d2015-03-04 18:08:18 -080014namespace shell {
James Robinson24218d72014-10-20 16:18:41 -070015
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.
18GURL FilePathToFileURL(const base::FilePath& path);
19
Nick Bray29e5fc62015-01-27 12:21:30 -080020// This URL is going to be treated as a directory. Ensure there is a trailing
21// slash so that GURL.Resolve(...) works correctly.
22GURL AddTrailingSlashIfNeeded(const GURL& url);
23
Viet-Trung Luu36faa4d2015-03-04 18:08:18 -080024} // namespace shell
James Robinson24218d72014-10-20 16:18:41 -070025
James Robinsonb4b7af22014-12-05 11:21:01 -080026#endif // SHELL_FILENAME_UTIL_H_