OLD | NEW |
---|---|
(Empty) | |
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_SAFE_BROWSING_PATH_SANITIZER_H_ | |
6 #define CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/macros.h" | |
10 | |
11 /*namespace FilePath { | |
12 typedef StringType; | |
13 } // namespace FilePath*/ | |
mattm
2014/06/17 17:55:51
dead code
pmonette_google.com
2014/06/18 15:34:18
Removed
| |
14 | |
15 namespace safe_browsing { | |
16 | |
17 // A helper class to sanitize any number of file paths by replacing the portion | |
18 // that represents the current user's home directory with "~". | |
19 class PathSanitizer { | |
20 public: | |
21 PathSanitizer(); | |
22 | |
23 const base::FilePath& GetHomeDirectory() const; | |
24 | |
25 void StripHomeDirectory(base::FilePath* file_path) const; | |
26 void StripHomeDirectoryFromString( | |
27 base::FilePath::StringType* file_path_str) const; | |
28 | |
29 private: | |
30 base::FilePath home_path_; | |
31 | |
32 DISALLOW_COPY_AND_ASSIGN(PathSanitizer); | |
33 }; | |
34 | |
35 } // namespace safe_browsing | |
36 | |
37 #endif // CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_ | |
OLD | NEW |