Home | History | Annotate | Download | only in extensions
      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 
      5 #ifndef CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
      6 #define CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
      7 
      8 #include "base/files/file_path.h"
      9 
     10 namespace extensions {
     11 namespace path_util {
     12 
     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 "~".
     18 //
     19 // This function is tested in
     20 // chrome/browser/extensions/extension_path_util_unittest.cc.
     21 base::FilePath PrettifyPath(const base::FilePath& source_path);
     22 
     23 }  // namespace path_util
     24 }  // namespace extensions
     25 
     26 #endif  // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
     27