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

Side by Side Diff: tools/gn/standard_out.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/setup.h ('k') | tools/gn/substitution_pattern.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/standard_out.h" 5 #include "tools/gn/standard_out.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 break; 88 break;
89 case DECORATION_YELLOW: 89 case DECORATION_YELLOW:
90 ::SetConsoleTextAttribute(hstdout, 90 ::SetConsoleTextAttribute(hstdout,
91 FOREGROUND_RED | FOREGROUND_GREEN); 91 FOREGROUND_RED | FOREGROUND_GREEN);
92 break; 92 break;
93 } 93 }
94 } 94 }
95 95
96 DWORD written = 0; 96 DWORD written = 0;
97 ::WriteFile(hstdout, output.c_str(), static_cast<DWORD>(output.size()), 97 ::WriteFile(hstdout, output.c_str(), static_cast<DWORD>(output.size()),
98 &written, NULL); 98 &written, nullptr);
99 99
100 if (is_console) 100 if (is_console)
101 ::SetConsoleTextAttribute(hstdout, default_attributes); 101 ::SetConsoleTextAttribute(hstdout, default_attributes);
102 } 102 }
103 103
104 #else 104 #else
105 105
106 void OutputString(const std::string& output, TextDecoration dec) { 106 void OutputString(const std::string& output, TextDecoration dec) {
107 EnsureInitialized(); 107 EnsureInitialized();
108 if (is_console) { 108 if (is_console) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 break; 186 break;
187 } else if (line[char_i] != ' ') { 187 } else if (line[char_i] != ' ') {
188 break; 188 break;
189 } 189 }
190 } 190 }
191 191
192 OutputString(line + "\n", dec); 192 OutputString(line + "\n", dec);
193 } 193 }
194 } 194 }
195 195
OLDNEW
« no previous file with comments | « tools/gn/setup.h ('k') | tools/gn/substitution_pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698