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

Side by Side Diff: net/tools/tld_cleanup/tld_cleanup.cc

Issue 6100007: Revert 70782 - Made logging not look up --enable-dcheck from command line... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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/testserver/run_testserver.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. This 6 // the format provided by Mozilla to the format expected by Chrome. This
7 // program generates an intermediate file which is then used by gperf to 7 // program generates an intermediate file which is then used by gperf to
8 // generate a perfect hash map. The benefit of this approach is that no time is 8 // generate a perfect hash map. The benefit of this approach is that no time is
9 // spent on program initialization to generate the map of this data. 9 // spent on program initialization to generate the map of this data.
10 // 10 //
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 #else 259 #else
260 logging::LoggingDestination destination = 260 logging::LoggingDestination destination =
261 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; 261 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG;
262 #endif 262 #endif
263 263
264 CommandLine::Init(argc, argv); 264 CommandLine::Init(argc, argv);
265 265
266 FilePath log_filename; 266 FilePath log_filename;
267 PathService::Get(base::DIR_EXE, &log_filename); 267 PathService::Get(base::DIR_EXE, &log_filename);
268 log_filename = log_filename.AppendASCII("tld_cleanup.log"); 268 log_filename = log_filename.AppendASCII("tld_cleanup.log");
269 logging::InitLogging( 269 logging::InitLogging(log_filename.value().c_str(),
270 log_filename.value().c_str(), 270 destination,
271 destination, 271 logging::LOCK_LOG_FILE,
272 logging::LOCK_LOG_FILE, 272 logging::DELETE_OLD_LOG_FILE);
273 logging::DELETE_OLD_LOG_FILE,
274 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
275 273
276 icu_util::Initialize(); 274 icu_util::Initialize();
277 275
278 FilePath input_file; 276 FilePath input_file;
279 PathService::Get(base::DIR_SOURCE_ROOT, &input_file); 277 PathService::Get(base::DIR_SOURCE_ROOT, &input_file);
280 input_file = input_file.Append(FILE_PATH_LITERAL("net")) 278 input_file = input_file.Append(FILE_PATH_LITERAL("net"))
281 .Append(FILE_PATH_LITERAL("base")) 279 .Append(FILE_PATH_LITERAL("base"))
282 .Append(FILE_PATH_LITERAL("effective_tld_names.dat")); 280 .Append(FILE_PATH_LITERAL("effective_tld_names.dat"));
283 FilePath output_file; 281 FilePath output_file;
284 PathService::Get(base::DIR_SOURCE_ROOT, &output_file); 282 PathService::Get(base::DIR_SOURCE_ROOT, &output_file);
285 output_file = output_file.Append(FILE_PATH_LITERAL("net")) 283 output_file = output_file.Append(FILE_PATH_LITERAL("net"))
286 .Append(FILE_PATH_LITERAL("base")) 284 .Append(FILE_PATH_LITERAL("base"))
287 .Append(FILE_PATH_LITERAL( 285 .Append(FILE_PATH_LITERAL(
288 "effective_tld_names.gperf")); 286 "effective_tld_names.gperf"));
289 NormalizeResult result = NormalizeFile(input_file, output_file); 287 NormalizeResult result = NormalizeFile(input_file, output_file);
290 if (result != kSuccess) { 288 if (result != kSuccess) {
291 fprintf(stderr, 289 fprintf(stderr,
292 "Errors or warnings processing file. See log in tld_cleanup.log."); 290 "Errors or warnings processing file. See log in tld_cleanup.log.");
293 } 291 }
294 292
295 if (result == kError) 293 if (result == kError)
296 return 1; 294 return 1;
297 return 0; 295 return 0;
298 } 296 }
OLDNEW
« no previous file with comments | « net/tools/testserver/run_testserver.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698