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
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 4195f5a..33525749 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -292,14 +292,21 @@
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))]