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

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: Addressing comments 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 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698