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

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

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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_desc.cc ('k') | tools/json_schema_compiler/cc_generator.py » ('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 "tools/gn/commands.h" 5 #include "tools/gn/commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "tools/gn/builder.h" 10 #include "tools/gn/builder.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 PrintTargetsAsOutputs(*targets, out); 508 PrintTargetsAsOutputs(*targets, out);
509 break; 509 break;
510 } 510 }
511 } 511 }
512 512
513 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets) { 513 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets) {
514 base::ListValue tmp; 514 base::ListValue tmp;
515 FilterAndPrintTargets(targets, &tmp); 515 FilterAndPrintTargets(targets, &tmp);
516 for (const auto& value : tmp) { 516 for (const auto& value : tmp) {
517 std::string string; 517 std::string string;
518 value.GetAsString(&string); 518 value->GetAsString(&string);
519 if (indent) 519 if (indent)
520 OutputString(" "); 520 OutputString(" ");
521 OutputString(string); 521 OutputString(string);
522 OutputString("\n"); 522 OutputString("\n");
523 } 523 }
524 } 524 }
525 525
526 void FilterAndPrintTargetSet(bool indent, 526 void FilterAndPrintTargetSet(bool indent,
527 const std::set<const Target*>& targets) { 527 const std::set<const Target*>& targets) {
528 std::vector<const Target*> target_vector(targets.begin(), targets.end()); 528 std::vector<const Target*> target_vector(targets.begin(), targets.end());
529 FilterAndPrintTargets(indent, &target_vector); 529 FilterAndPrintTargets(indent, &target_vector);
530 } 530 }
531 531
532 void FilterAndPrintTargetSet(const std::set<const Target*>& targets, 532 void FilterAndPrintTargetSet(const std::set<const Target*>& targets,
533 base::ListValue* out) { 533 base::ListValue* out) {
534 std::vector<const Target*> target_vector(targets.begin(), targets.end()); 534 std::vector<const Target*> target_vector(targets.begin(), targets.end());
535 FilterAndPrintTargets(&target_vector, out); 535 FilterAndPrintTargets(&target_vector, out);
536 } 536 }
537 537
538 } // namespace commands 538 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698