OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
11 namespace path_util { | 11 namespace path_util { |
12 | 12 |
13 // Prettifies |source_path|, by replacing the user's home directory with "~" | 13 // Prettifies |source_path|, by replacing the user's home directory with "~" |
14 // (if applicable). | 14 // (if applicable). |
15 // For OS X, prettifies |source_path| by localizing every component of the | 15 // For OS X, prettifies |source_path| by localizing every component of the |
16 // path. Additionally, if the path is inside the user's home directory, then | 16 // path. Additionally, if the path is inside the user's home directory, then |
17 // replace the home directory component with "~". | 17 // replace the home directory component with "~". |
18 // | |
19 // This function is tested in extension_path_util_unittest.cc | |
Devlin
2014/08/05 23:40:35
spell out the whole path, so that handy util like
gpdavis
2014/08/06 18:37:26
Done.
| |
18 base::FilePath PrettifyPath(const base::FilePath& source_path); | 20 base::FilePath PrettifyPath(const base::FilePath& source_path); |
19 | 21 |
20 } // namespace path_util | 22 } // namespace path_util |
21 } // namespace extensions | 23 } // namespace extensions |
22 | 24 |
23 #endif // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ | 25 #endif // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ |
OLD | NEW |