diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 01:32:58 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 01:32:58 +0000 |
commit | a11dbe9b75e6ec3e4fd8d9878526fa27426d59ad (patch) | |
tree | abe85be335ec148e1d232be881033776c2c20f48 /PRESUBMIT.py | |
parent | cdd4234611a47a064a8b15c2f3a7f47676286cef (diff) | |
download | chromium_src-a11dbe9b75e6ec3e4fd8d9878526fa27426d59ad.zip chromium_src-a11dbe9b75e6ec3e4fd8d9878526fa27426d59ad.tar.gz chromium_src-a11dbe9b75e6ec3e4fd8d9878526fa27426d59ad.tar.bz2 |
Cleaned up usage of std::wstring in src/remoting. Added presubmit warning supressions for the remaning instances because they depend on hard-to-change public APIs.
BUG=133003
Review URL: https://chromiumcodereview.appspot.com/10824166
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 4195f5a..3352574 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))] |