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

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

Issue 964203002: tools/gn: Fix errors found by Facebook's flint tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromium-style plugin errors Created 5 years, 9 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/commands.cc ('k') | tools/gn/copy_target_generator.h » ('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/config_values_extractors.h" 5 #include "tools/gn/config_values_extractors.h"
6 6
7 #include "tools/gn/escape.h" 7 #include "tools/gn/escape.h"
8 8
9 namespace { 9 namespace {
10 10
11 class EscapedStringWriter { 11 class EscapedStringWriter {
12 public: 12 public:
13 EscapedStringWriter(const EscapeOptions& escape_options) 13 explicit EscapedStringWriter(const EscapeOptions& escape_options)
14 : escape_options_(escape_options) { 14 : escape_options_(escape_options) {
15 } 15 }
16 16
17 void operator()(const std::string& s, std::ostream& out) const { 17 void operator()(const std::string& s, std::ostream& out) const {
18 out << " "; 18 out << " ";
19 EscapeStringToStream(out, s, escape_options_); 19 EscapeStringToStream(out, s, escape_options_);
20 } 20 }
21 21
22 private: 22 private:
23 const EscapeOptions& escape_options_; 23 const EscapeOptions& escape_options_;
24 }; 24 };
25 25
26 } // namespace 26 } // namespace
27 27
28 void RecursiveTargetConfigStringsToStream( 28 void RecursiveTargetConfigStringsToStream(
29 const Target* target, 29 const Target* target,
30 const std::vector<std::string>& (ConfigValues::* getter)() const, 30 const std::vector<std::string>& (ConfigValues::* getter)() const,
31 const EscapeOptions& escape_options, 31 const EscapeOptions& escape_options,
32 std::ostream& out) { 32 std::ostream& out) {
33 RecursiveTargetConfigToStream(target, getter, 33 RecursiveTargetConfigToStream(target, getter,
34 EscapedStringWriter(escape_options), out); 34 EscapedStringWriter(escape_options), out);
35 } 35 }
OLDNEW
« no previous file with comments | « tools/gn/commands.cc ('k') | tools/gn/copy_target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698