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

Side by Side Diff: tools/gn/command_refs.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
« no previous file with comments | « tools/gn/command_ls.cc ('k') | tools/gn/exec_process.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "tools/gn/commands.h" 9 #include "tools/gn/commands.h"
10 #include "tools/gn/deps_iterator.h" 10 #include "tools/gn/deps_iterator.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 " containing the given file as a source.\n"; 280 " containing the given file as a source.\n";
281 281
282 int RunRefs(const std::vector<std::string>& args) { 282 int RunRefs(const std::vector<std::string>& args) {
283 if (args.size() != 2) { 283 if (args.size() != 2) {
284 Err(Location(), "You're holding it wrong.", 284 Err(Location(), "You're holding it wrong.",
285 "Usage: \"gn refs <build_dir> (<label_pattern>|<file>)\"") 285 "Usage: \"gn refs <build_dir> (<label_pattern>|<file>)\"")
286 .PrintToStdout(); 286 .PrintToStdout();
287 return 1; 287 return 1;
288 } 288 }
289 289
290 const CommandLine* cmdline = CommandLine::ForCurrentProcess(); 290 const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
291 bool tree = cmdline->HasSwitch("tree"); 291 bool tree = cmdline->HasSwitch("tree");
292 bool all = cmdline->HasSwitch("all"); 292 bool all = cmdline->HasSwitch("all");
293 bool all_toolchains = cmdline->HasSwitch("all-toolchains"); 293 bool all_toolchains = cmdline->HasSwitch("all-toolchains");
294 bool files = cmdline->HasSwitch("files"); 294 bool files = cmdline->HasSwitch("files");
295 295
296 Setup* setup = new Setup; 296 Setup* setup = new Setup;
297 setup->set_check_for_bad_items(false); 297 setup->set_check_for_bad_items(false);
298 if (!setup->DoSetup(args[0], false) || !setup->Run()) 298 if (!setup->DoSetup(args[0], false) || !setup->Run())
299 return 1; 299 return 1;
300 300
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 results.insert(cur_dep->second); 378 results.insert(cur_dep->second);
379 } 379 }
380 } 380 }
381 OutputResultSet(results, files); 381 OutputResultSet(results, files);
382 } 382 }
383 383
384 return 0; 384 return 0;
385 } 385 }
386 386
387 } // namespace commands 387 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/command_ls.cc ('k') | tools/gn/exec_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698