diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 08:16:10 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 08:16:10 +0000 |
commit | ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe (patch) | |
tree | 092af8f9dd66777c0b34975cf999d54b37d6279e /chrome/browser/drive | |
parent | c8884db174f04db3f766da5d3caadbd2432c6f84 (diff) | |
download | chromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.zip chromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.tar.gz chromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.tar.bz2 |
Make various string_util functions take StringPieces instead of char[].
This allows most callers to pass string literals or results of ASCIIToUTF16(),
rather than construct error-prone character arrays that must be manually
nul-terminated.
Also cleans up various bits of the callers.
BUG=104260
TEST=none
Review URL: https://codereview.chromium.org/296593003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/drive')
-rw-r--r-- | chrome/browser/drive/drive_api_util.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/drive/drive_api_util.cc b/chrome/browser/drive/drive_api_util.cc index b7b350a..13cefa6 100644 --- a/chrome/browser/drive/drive_api_util.cc +++ b/chrome/browser/drive/drive_api_util.cc @@ -66,8 +66,7 @@ std::string TranslateQuery(const std::string& original_query) { // In order to handle non-ascii white spaces correctly, convert to UTF16. base::string16 query = base::UTF8ToUTF16(original_query); const base::string16 kDelimiter( - base::kWhitespaceUTF16 + - base::string16(1, static_cast<base::char16>('"'))); + base::kWhitespaceUTF16 + base::ASCIIToUTF16("\"")); std::string result; for (size_t index = query.find_first_not_of(base::kWhitespaceUTF16); |