[sessions]: Componentize TabRestore code
[chromium-blink-merge.git] / chrome / browser / extensions / path_util.h
blob56d4b8c2ebd007fc0e0f811de2f00982b5d7db1c
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
8 #include "base/files/file_path.h"
10 namespace extensions {
11 namespace path_util {
13 // Prettifies |source_path|, by replacing the user's home directory with "~"
14 // (if applicable).
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
17 // replace the home directory component with "~".
19 // This function is tested in
20 // chrome/browser/extensions/extension_path_util_unittest.cc.
21 base::FilePath PrettifyPath(const base::FilePath& source_path);
23 } // namespace path_util
24 } // namespace extensions
26 #endif // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_