OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This command-line program converts an effective-TLD data file in UTF-8 from | 5 // This command-line program converts an effective-TLD data file in UTF-8 from |
6 // the format provided by Mozilla to the format expected by Chrome. Any errors | 6 // the format provided by Mozilla to the format expected by Chrome. Any errors |
7 // or warnings are recorded in tld_cleanup.log. | 7 // or warnings are recorded in tld_cleanup.log. |
8 // | 8 // |
9 // In particular, it | 9 // In particular, it |
10 // * Strips blank lines and comments, as well as notes for individual rules. | 10 // * Strips blank lines and comments, as well as notes for individual rules. |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 if (!WriteRules(rules, outfile)) { | 200 if (!WriteRules(rules, outfile)) { |
201 LOG(ERROR) << "Error(s) writing " << out_filename; | 201 LOG(ERROR) << "Error(s) writing " << out_filename; |
202 result = kError; | 202 result = kError; |
203 } | 203 } |
204 | 204 |
205 return result; | 205 return result; |
206 } | 206 } |
207 | 207 |
208 int main(int argc, const char* argv[]) { | 208 int main(int argc, const char* argv[]) { |
209 process_util::EnableTerminationOnHeapCorruption(); | 209 base::EnableTerminationOnHeapCorruption(); |
210 if (argc != 3) { | 210 if (argc != 3) { |
211 fprintf(stderr, "Normalizes and verifies UTF-8 TLD data files\n"); | 211 fprintf(stderr, "Normalizes and verifies UTF-8 TLD data files\n"); |
212 fprintf(stderr, "Usage: %s <input> <output>\n", argv[0]); | 212 fprintf(stderr, "Usage: %s <input> <output>\n", argv[0]); |
213 return 1; | 213 return 1; |
214 } | 214 } |
215 | 215 |
216 // Manages the destruction of singletons. | 216 // Manages the destruction of singletons. |
217 base::AtExitManager exit_manager; | 217 base::AtExitManager exit_manager; |
218 | 218 |
219 // Only use OutputDebugString in debug mode. | 219 // Only use OutputDebugString in debug mode. |
(...skipping 19 matching lines...) Expand all Loading... |
239 if (result != kSuccess) { | 239 if (result != kSuccess) { |
240 fwprintf(stderr, L"Errors or warnings processing file. See log in %ls.", | 240 fwprintf(stderr, L"Errors or warnings processing file. See log in %ls.", |
241 kLogFileName); | 241 kLogFileName); |
242 } | 242 } |
243 | 243 |
244 if (result == kError) | 244 if (result == kError) |
245 return 1; | 245 return 1; |
246 return 0; | 246 return 0; |
247 } | 247 } |
248 | 248 |
OLD | NEW |