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_SAFE_BROWSING_PATH_SANITIZER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_
8 #include "base/files/file_path.h"
9 #include "base/macros.h"
11 namespace safe_browsing
{
13 // A helper class to sanitize any number of file paths by replacing the portion
14 // that represents the current user's home directory with "~".
19 const base::FilePath
& GetHomeDirectory() const;
21 void StripHomeDirectory(base::FilePath
* file_path
) const;
24 base::FilePath home_path_
;
26 DISALLOW_COPY_AND_ASSIGN(PathSanitizer
);
29 } // namespace safe_browsing
31 #endif // CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_