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

Unified Diff: tools/gn/input_conversion.cc

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/input_conversion.cc
diff --git a/tools/gn/input_conversion.cc b/tools/gn/input_conversion.cc
index efdff1a53d647969fe5f6e744c41ec7c1ad75637..e64323abdd10b4455f7c8446d47cb58d3ec68a0c 100644
--- a/tools/gn/input_conversion.cc
+++ b/tools/gn/input_conversion.cc
@@ -19,34 +19,6 @@
namespace {
-// Returns the "first bit" of some script output for writing to error messages.
-std::string GetExampleOfBadInput(const std::string& input) {
- std::string result(input);
-
- // Maybe the result starts with a blank line or something, which we don't
- // want.
- TrimWhitespaceASCII(result, TRIM_ALL, &result);
-
- // Now take the first line, or the first set of chars, whichever is shorter.
- bool trimmed = false;
- size_t newline_offset = result.find('\n');
- if (newline_offset != std::string::npos) {
- trimmed = true;
- result.resize(newline_offset);
- }
- TrimWhitespaceASCII(result, TRIM_ALL, &result);
-
- const size_t kMaxSize = 50;
- if (result.size() > kMaxSize) {
- trimmed = true;
- result.resize(kMaxSize);
- }
-
- if (trimmed)
- result.append("...");
- return result;
-}
-
// When parsing the result as a value, we may get various types of errors.
// This creates an error message for this case with an optional nested error
// message to reference. If there is no nested err, pass Err().
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698