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

Unified Diff: PRESUBMIT.py

Issue 10824166: Cleaned up usage of std::wstring in src/remoting. Added presubmit warning supressions for the reman… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/base/breakpad_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 4195f5ab79781febb69d040698cb80a20499d960..33525749f7ca15436815de578dd0b311c14fab6c 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -292,14 +292,21 @@ def _CheckNoNewWStrings(input_api, output_api):
f.LocalPath().endswith('test.cc')):
continue
+ allowWString = False
for line_num, line in f.ChangedContents():
- if 'wstring' in line:
+ if 'presubmit: allow wstring' in line:
+ allowWString = True
+ elif not allowWString and 'wstring' in line:
problems.append(' %s:%d' % (f.LocalPath(), line_num))
+ allowWString = False
+ else:
+ allowWString = False
if not problems:
return []
return [output_api.PresubmitPromptWarning('New code should not use wstrings.'
- ' If you are calling an API that accepts a wstring, fix the API.\n' +
+ ' If you are calling a cross-platform API that accepts a wstring, '
+ 'fix the API.\n' +
'\n'.join(problems))]
« no previous file with comments | « no previous file | remoting/base/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698