Fix breaking change in It2me Host on Ozone
[chromium-blink-merge.git] / tools / gn / config_values_extractors.cc
blob646e2d7bb2e5384f38301afe89820fcee9d66992
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
3 // found in the LICENSE file.
5 #include "tools/gn/config_values_extractors.h"
7 #include "tools/gn/escape.h"
9 namespace {
11 class EscapedStringWriter {
12 public:
13 EscapedStringWriter(const EscapeOptions& escape_options)
14 : escape_options_(escape_options) {
17 void operator()(const std::string& s, std::ostream& out) const {
18 out << " ";
19 EscapeStringToStream(out, s, escape_options_);
22 private:
23 const EscapeOptions& escape_options_;
26 } // namespace
28 void RecursiveTargetConfigStringsToStream(
29 const Target* target,
30 const std::vector<std::string>& (ConfigValues::* getter)() const,
31 const EscapeOptions& escape_options,
32 std::ostream& out) {
33 RecursiveTargetConfigToStream(target, getter,
34 EscapedStringWriter(escape_options), out);