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.
5 #ifndef NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_
6 #define NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_
16 namespace tld_cleanup
{
24 typedef std::map
<std::string
, Rule
> RuleMap
;
26 // These result codes should be in increasing order of severity.
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
37 NormalizeResult
NormalizeFile(const base::FilePath
& in_filename
,
38 const base::FilePath
& out_filename
);
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
,
45 } // namespace tld_cleanup
48 #endif // NET_TOOLS_TLD_CLEANUP_TLD_CLEANUP_UTIL_H_