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

Side by Side Diff: base/i18n/number_formatting.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/i18n/number_formatting.h" 5 #include "base/i18n/number_formatting.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "unicode/numfmt.h" 13 #include "unicode/numfmt.h"
14 #include "unicode/ustring.h" 14 #include "unicode/ustring.h"
15 15
16 namespace base { 16 namespace base {
17 17
18 namespace { 18 namespace {
19 19
20 struct NumberFormatWrapper { 20 struct NumberFormatWrapper {
(...skipping 21 matching lines...) Expand all
42 // As a fallback, just return the raw number in a string. 42 // As a fallback, just return the raw number in a string.
43 return UTF8ToUTF16(StringPrintf("%" PRId64, number)); 43 return UTF8ToUTF16(StringPrintf("%" PRId64, number));
44 } 44 }
45 icu::UnicodeString ustr; 45 icu::UnicodeString ustr;
46 number_format->format(number, ustr); 46 number_format->format(number, ustr);
47 47
48 return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length())); 48 return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
49 } 49 }
50 50
51 } // namespace base 51 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698