diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 19:17:45 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 19:17:45 +0000 |
commit | e2219171711f7acf49a52ba89eb6e05c27f11103 (patch) | |
tree | 464c5ec96e0a288bf0460d9d7109d12f9bd29207 /base/string_escape.cc | |
parent | 5e5bf59cbc75839aafef3ae29bcb53408adb715d (diff) | |
download | chromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.zip chromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.tar.gz chromium_src-e2219171711f7acf49a52ba89eb6e05c27f11103.tar.bz2 |
Change the string_escape functions to use string16 rather than wstring.
Review URL: http://codereview.chromium.org/27116
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10358 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_escape.cc')
-rw-r--r-- | base/string_escape.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/base/string_escape.cc b/base/string_escape.cc index c2fc542..aafee11 100644 --- a/base/string_escape.cc +++ b/base/string_escape.cc @@ -46,14 +46,14 @@ static bool JavascriptSingleEscapeChar(const CHAR c, std::string* dst) { return true; } -void JavascriptDoubleQuote(const std::wstring& str, +void JavascriptDoubleQuote(const string16& str, bool put_in_quotes, std::string* dst) { if (put_in_quotes) dst->push_back('"'); - for (std::wstring::const_iterator it = str.begin(); it != str.end(); ++it) { - wchar_t c = *it; + for (string16::const_iterator it = str.begin(); it != str.end(); ++it) { + char16 c = *it; if (!JavascriptSingleEscapeChar(c, dst)) { if (c > 255) { // Non-ascii values need to be unicode dst-> @@ -96,4 +96,3 @@ void JavascriptDoubleQuote(const std::string& str, } } // namespace string_escape - |