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

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

Issue 6997006: iwyu: Include stringprintf.h where appropriate, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/stringprintf.h"
11 #include "base/string_util.h" 12 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
13 #include "unicode/numfmt.h" 14 #include "unicode/numfmt.h"
14 #include "unicode/ustring.h" 15 #include "unicode/ustring.h"
15 16
16 namespace base { 17 namespace base {
17 18
18 namespace { 19 namespace {
19 20
20 struct NumberFormatWrapper { 21 struct NumberFormatWrapper {
(...skipping 21 matching lines...) Expand all
42 // As a fallback, just return the raw number in a string. 43 // As a fallback, just return the raw number in a string.
43 return UTF8ToUTF16(StringPrintf("%" PRId64, number)); 44 return UTF8ToUTF16(StringPrintf("%" PRId64, number));
44 } 45 }
45 icu::UnicodeString ustr; 46 icu::UnicodeString ustr;
46 number_format->format(number, ustr); 47 number_format->format(number, ustr);
47 48
48 return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length())); 49 return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
49 } 50 }
50 51
51 } // namespace base 52 } // namespace base
OLDNEW
« no previous file with comments | « app/sql/connection.cc ('k') | base/json/json_reader.cc » ('j') | base/json/string_escape.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698