diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 16:33:14 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 16:33:14 +0000 |
commit | 816721e5f44997efdf2fb5280666ccd126f4c00e (patch) | |
tree | 0ab3cd5a30d71a16df1d5b0f84d1e576665351a1 /sandbox/wow_helper | |
parent | d75faa8114fe821e65c2c3844729cf10d3c69088 (diff) | |
download | chromium_src-816721e5f44997efdf2fb5280666ccd126f4c00e.zip chromium_src-816721e5f44997efdf2fb5280666ccd126f4c00e.tar.gz chromium_src-816721e5f44997efdf2fb5280666ccd126f4c00e.tar.bz2 |
Sync sandbox WriteInto with updated version from base
Review URL: http://codereview.chromium.org/45049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/wow_helper')
-rw-r--r-- | sandbox/wow_helper/wow_helper.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sandbox/wow_helper/wow_helper.cc b/sandbox/wow_helper/wow_helper.cc index 6df4c0e..6c272e4 100644 --- a/sandbox/wow_helper/wow_helper.cc +++ b/sandbox/wow_helper/wow_helper.cc @@ -17,18 +17,16 @@ namespace { -// Grabbed from chrome/common/string_util.h -template <class char_type> -inline char_type* WriteInto( - std::basic_string<char_type, std::char_traits<char_type>, - std::allocator<char_type> >* str, - size_t length_including_null) { - str->reserve(length_including_null); - str->resize(length_including_null - 1); +// Grabbed from base/string_util.h +template <class string_type> +inline typename string_type::value_type* WriteInto(string_type* str, + size_t length_with_null) { + str->reserve(length_with_null); + str->resize(length_with_null - 1); return &((*str)[0]); } -// Grabbed from chrome/common/string_util.cc +// Grabbed from base/string_util.cc std::string WideToMultiByte(const std::wstring& wide, UINT code_page) { if (wide.length() == 0) return std::string(); @@ -47,7 +45,7 @@ std::string WideToMultiByte(const std::wstring& wide, UINT code_page) { return mb; } -// Grabbed from chrome/common/string_util.cc +// Grabbed from base/string_util.cc std::string WideToUTF8(const std::wstring& wide) { return WideToMultiByte(wide, CP_UTF8); } |