Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: base/strings/utf_string_conversions.cc

Issue 16320009: Use a direct include of strings headers in base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/strings/utf_string_conversions.h ('k') | base/strings/utf_string_conversions_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 6
7 #include "base/string_util.h"
8 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversion_utils.h" 9 #include "base/strings/utf_string_conversion_utils.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 namespace { 13 namespace {
14 14
15 // Generalized Unicode converter ----------------------------------------------- 15 // Generalized Unicode converter -----------------------------------------------
16 16
17 // Converts the given source Unicode character type to the given destination 17 // Converts the given source Unicode character type to the given destination
18 // Unicode character type as a STL string. The given input buffer and size 18 // Unicode character type as a STL string. The given input buffer and size
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 DCHECK(IsStringASCII(ascii)) << ascii; 176 DCHECK(IsStringASCII(ascii)) << ascii;
177 return std::wstring(ascii.begin(), ascii.end()); 177 return std::wstring(ascii.begin(), ascii.end());
178 } 178 }
179 179
180 string16 ASCIIToUTF16(const StringPiece& ascii) { 180 string16 ASCIIToUTF16(const StringPiece& ascii) {
181 DCHECK(IsStringASCII(ascii)) << ascii; 181 DCHECK(IsStringASCII(ascii)) << ascii;
182 return string16(ascii.begin(), ascii.end()); 182 return string16(ascii.begin(), ascii.end());
183 } 183 }
184 184
185 } // namespace base 185 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/utf_string_conversions.h ('k') | base/strings/utf_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698