Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Side by Side Diff: chrome/browser/extensions/path_util.h

Issue 439873002: Check for empty paths in path_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enhanced test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
20 // chrome/browser/extensions/extension_path_util_unittest.cc.
18 base::FilePath PrettifyPath(const base::FilePath& source_path); 21 base::FilePath PrettifyPath(const base::FilePath& source_path);
19 22
20 } // namespace path_util 23 } // namespace path_util
21 } // namespace extensions 24 } // namespace extensions
22 25
23 #endif // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_ 26 #endif // CHROME_BROWSER_EXTENSIONS_PATH_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698