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

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

Issue 275703003: Make GN Android build link executables (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace Created 6 years, 7 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
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/escape.h" 5 #include "tools/gn/escape.h"
6 6
7 #include "base/containers/stack_container.h" 7 #include "base/containers/stack_container.h"
8 8
9 namespace { 9 namespace {
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void EscapeStringToStream(std::ostream& out, 84 void EscapeStringToStream(std::ostream& out,
85 const base::StringPiece& str, 85 const base::StringPiece& str,
86 const EscapeOptions& options) { 86 const EscapeOptions& options) {
87 // Escape to a stack buffer and then write out to the stream. 87 // Escape to a stack buffer and then write out to the stream.
88 base::StackVector<char, 256> result; 88 base::StackVector<char, 256> result;
89 result->reserve(str.size() + 4); // Guess we'll add a couple of extra chars. 89 result->reserve(str.size() + 4); // Guess we'll add a couple of extra chars.
90 EscapeStringToString(str, options, &result.container(), NULL); 90 EscapeStringToString(str, options, &result.container(), NULL);
91 if (!result->empty()) 91 if (!result->empty())
92 out.write(result->data(), result->size()); 92 out.write(&result[0], result->size());
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698