| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 dumps the contents of a set of cache files, either | 5 // This command-line program dumps the contents of a set of cache files, either |
| 6 // to stdout or to another set of cache files. | 6 // to stdout or to another set of cache files. |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 hacked_command_line.insert(to_remove, new_program); | 91 hacked_command_line.insert(to_remove, new_program); |
| 92 | 92 |
| 93 CommandLine new_command_line = CommandLine::FromString(hacked_command_line); | 93 CommandLine new_command_line = CommandLine::FromString(hacked_command_line); |
| 94 | 94 |
| 95 if (do_upgrade || do_convert_to_text) | 95 if (do_upgrade || do_convert_to_text) |
| 96 new_command_line.AppendSwitch(kSlave); | 96 new_command_line.AppendSwitch(kSlave); |
| 97 | 97 |
| 98 // TODO(evanm): remove needless usage of wstring from here and elsewhere. | 98 // TODO(evanm): remove needless usage of wstring from here and elsewhere. |
| 99 new_command_line.AppendSwitchASCII(kPipe, WideToASCII(pipe_number)); | 99 new_command_line.AppendSwitchASCII(kPipe, WideToASCII(pipe_number)); |
| 100 if (!base::LaunchProcess(new_command_line, base::LaunchOptions())) { | 100 if (!base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL)) { |
| 101 printf("Unable to launch the needed version of this tool: %ls\n", | 101 printf("Unable to launch the needed version of this tool: %ls\n", |
| 102 new_program.c_str()); | 102 new_program.c_str()); |
| 103 printf(kUpgradeHelp); | 103 printf(kUpgradeHelp); |
| 104 return TOOL_NOT_FOUND; | 104 return TOOL_NOT_FOUND; |
| 105 } | 105 } |
| 106 return ALL_GOOD; | 106 return ALL_GOOD; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // ----------------------------------------------------------------------- | 109 // ----------------------------------------------------------------------- |
| 110 | 110 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 Sleep(500); | 177 Sleep(500); |
| 178 return ALL_GOOD; | 178 return ALL_GOOD; |
| 179 } | 179 } |
| 180 | 180 |
| 181 if (command_line.HasSwitch(kDumpContents)) | 181 if (command_line.HasSwitch(kDumpContents)) |
| 182 return DumpContents(input_path); | 182 return DumpContents(input_path); |
| 183 if (command_line.HasSwitch(kDumpHeaders)) | 183 if (command_line.HasSwitch(kDumpHeaders)) |
| 184 return DumpHeaders(input_path); | 184 return DumpHeaders(input_path); |
| 185 return Help(); | 185 return Help(); |
| 186 } | 186 } |
| OLD | NEW |