Update mojo surfaces bindings and mojo/cc/ glue
[chromium-blink-merge.git] / chrome / browser / safe_browsing / path_sanitizer.h
blob19d59fcde723b58360b5769a071e38950ad28974
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 "~".
15 class PathSanitizer {
16 public:
17 PathSanitizer();
19 const base::FilePath& GetHomeDirectory() const;
21 void StripHomeDirectory(base::FilePath* file_path) const;
23 private:
24 base::FilePath home_path_;
26 DISALLOW_COPY_AND_ASSIGN(PathSanitizer);
29 } // namespace safe_browsing
31 #endif // CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_