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

Side by Side Diff: chrome/browser/safe_browsing/path_sanitizer.h

Issue 323953002: Support for recording registered LSPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@grt
Patch Set: Created 6 years, 6 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
(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 safe_browsing {
12
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();
18
19 const base::FilePath& GetHomeDirectory() const;
20
21 void StripHomeDirectory(base::FilePath* file_path) const;
22 void StripHomeDirectory(base::string16* file_path_str) const;
grt (UTC plus 2) 2014/06/10 13:47:54 in chromium, we generally don't overload like this
pmonette_google.com 2014/06/10 19:34:39 Done.
23
24 private:
25 base::FilePath home_path_;
26
27 DISALLOW_COPY_AND_ASSIGN(PathSanitizer);
28 };
29
30 } // namespace safe_browsing
31
32 #endif // CHROME_BROWSER_SAFE_BROWSING_PATH_SANITIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698