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

Side by Side Diff: courgette/courgette_tool.cc

Issue 5066001: Revert 66208 - Call InitLogging() for courgette.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <vector> 5 #include <vector>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (status != courgette::OK) Problem("-applybsdiff failed."); 338 if (status != courgette::OK) Problem("-applybsdiff failed.");
339 339
340 WriteSinkToFile(&new_stream, new_file); 340 WriteSinkToFile(&new_stream, new_file);
341 } 341 }
342 342
343 int main(int argc, const char* argv[]) { 343 int main(int argc, const char* argv[]) {
344 base::AtExitManager at_exit_manager; 344 base::AtExitManager at_exit_manager;
345 CommandLine::Init(argc, argv); 345 CommandLine::Init(argc, argv);
346 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 346 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
347 347
348 (void)logging::InitLogging("courgette.log",
349 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
350 logging::LOCK_LOG_FILE,
351 logging::APPEND_TO_OLD_LOG_FILE);
352 logging::SetMinLogLevel(logging::LOG_VERBOSE);
353
354 bool cmd_dis = command_line.HasSwitch("dis"); 348 bool cmd_dis = command_line.HasSwitch("dis");
355 bool cmd_asm = command_line.HasSwitch("asm"); 349 bool cmd_asm = command_line.HasSwitch("asm");
356 bool cmd_disadj = command_line.HasSwitch("disadj"); 350 bool cmd_disadj = command_line.HasSwitch("disadj");
357 bool cmd_make_patch = command_line.HasSwitch("gen"); 351 bool cmd_make_patch = command_line.HasSwitch("gen");
358 bool cmd_apply_patch = command_line.HasSwitch("apply"); 352 bool cmd_apply_patch = command_line.HasSwitch("apply");
359 bool cmd_make_bsdiff_patch = command_line.HasSwitch("genbsdiff"); 353 bool cmd_make_bsdiff_patch = command_line.HasSwitch("genbsdiff");
360 bool cmd_apply_bsdiff_patch = command_line.HasSwitch("applybsdiff"); 354 bool cmd_apply_bsdiff_patch = command_line.HasSwitch("applybsdiff");
361 bool cmd_spread_1_adjusted = command_line.HasSwitch("gen1a"); 355 bool cmd_spread_1_adjusted = command_line.HasSwitch("gen1a");
362 bool cmd_spread_1_unadjusted = command_line.HasSwitch("gen1u"); 356 bool cmd_spread_1_unadjusted = command_line.HasSwitch("gen1u");
363 357
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) { 413 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) {
420 if (values.size() != 3) 414 if (values.size() != 3)
421 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>"); 415 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>");
422 DisassembleAdjustDiff(values[0], values[1], values[2], 416 DisassembleAdjustDiff(values[0], values[1], values[2],
423 cmd_spread_1_adjusted); 417 cmd_spread_1_adjusted);
424 } else { 418 } else {
425 UsageProblem("No operation specified"); 419 UsageProblem("No operation specified");
426 } 420 }
427 } 421 }
428 } 422 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698