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

Side by Side Diff: net/tools/tld_cleanup/tld_cleanup_util.h

Issue 15140003: Add support for split Public Suffix List distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/tld_cleanup/tld_cleanup.gyp ('k') | net/tools/tld_cleanup/tld_cleanup_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_
6 #define NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_
7
8 #include <map>
9 #include <string>
10
11 namespace base {
12 class FilePath;
13 } // namespace base
14
15 namespace net {
16 namespace tld_cleanup {
17
18 struct Rule {
19 bool exception;
20 bool wildcard;
21 bool is_private;
22 };
23
24 typedef std::map<std::string, Rule> RuleMap;
25
26 // These result codes should be in increasing order of severity.
27 typedef enum {
28 kSuccess,
29 kWarning,
30 kError,
31 } NormalizeResult;
32
33 // Loads the file described by |in_filename|, converts it to the desired format
34 // (see the file comments in tld_cleanup.cc), and saves it into |out_filename|.
35 // Returns the most severe of the result codes encountered when normalizing the
36 // rules.
37 NormalizeResult NormalizeFile(const base::FilePath& in_filename,
38 const base::FilePath& out_filename);
39
40 // Parses |data|, and converts it to the internal data format RuleMap. Returns
41 // the most severe of the result codes encountered when normalizing the rules.
42 NormalizeResult NormalizeDataToRuleMap(const std::string data,
43 RuleMap* rules);
44
45 } // namespace tld_cleanup
46 } // namespace net
47
48 #endif // NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_
OLDNEW
« no previous file with comments | « net/tools/tld_cleanup/tld_cleanup.gyp ('k') | net/tools/tld_cleanup/tld_cleanup_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698