| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <iostream> | 6 #include <iostream> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 show_comma = true; | 169 show_comma = true; |
| 170 } else if (std::string("--filter") == *argv) { | 170 } else if (std::string("--filter") == *argv) { |
| 171 filter = *(++argv); | 171 filter = *(++argv); |
| 172 --argc; | 172 --argc; |
| 173 } else if (std::string("--ids") == *argv) { | 173 } else if (std::string("--ids") == *argv) { |
| 174 show_ids = true; | 174 show_ids = true; |
| 175 } else if (std::string("--no-check") == *argv) { | 175 } else if (std::string("--no-check") == *argv) { |
| 176 skip_check = true; | 176 skip_check = true; |
| 177 } else { | 177 } else { |
| 178 std::cout << | 178 std::cout << |
| 179 "usage: ipclist [--args] [--ids] [--no-check] [--filter prefix] " | 179 "usage: ipc_message_list [--args] [--ids] [--no-check] " |
| 180 "[--comma]\n"; | 180 "[--filter prefix] [--comma]\n"; |
| 181 return 1; | 181 return 1; |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 std::sort(msgtable, msgtable + MSGTABLE_SIZE); | 185 std::sort(msgtable, msgtable + MSGTABLE_SIZE); |
| 186 | 186 |
| 187 if (!skip_check && check_msgtable() == false) | 187 if (!skip_check && check_msgtable() == false) |
| 188 return 1; | 188 return 1; |
| 189 | 189 |
| 190 dump_msgtable(show_args, show_ids, show_comma, filter); | 190 dump_msgtable(show_args, show_ids, show_comma, filter); |
| 191 return 0; | 191 return 0; |
| 192 } | 192 } |
| 193 | 193 |
| OLD | NEW |