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

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

Issue 9117001: For readability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/i18n/number_formatting.h ('k') | base/i18n/number_formatting_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) 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/stringprintf.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "unicode/numfmt.h" 14 #include "unicode/numfmt.h"
15 #include "unicode/ustring.h" 15 #include "unicode/ustring.h"
16 16
17 namespace base { 17 namespace base {
18 18
19 namespace { 19 namespace {
20 20
21 struct NumberFormatWrapper { 21 struct NumberFormatWrapper {
pink (ping after 24hrs) 2012/01/10 16:22:00 comment for struct?
Avi (use Gerrit) 2012/01/10 16:35:34 Done.
22 NumberFormatWrapper() { 22 NumberFormatWrapper() {
23 Reset(); 23 Reset();
24 } 24 }
25 25
26 void Reset() { 26 void Reset() {
27 // There's no ICU call to destroy a NumberFormat object other than 27 // There's no ICU call to destroy a NumberFormat object other than
28 // operator delete, so use the default Delete, which calls operator delete. 28 // operator delete, so use the default Delete, which calls operator delete.
29 // This can cause problems if a different allocator is used by this file 29 // This can cause problems if a different allocator is used by this file
30 // than by ICU. 30 // than by ICU.
31 UErrorCode status = U_ZERO_ERROR; 31 UErrorCode status = U_ZERO_ERROR;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 namespace testing { 76 namespace testing {
77 77
78 void ResetFormatters() { 78 void ResetFormatters() {
79 g_number_format_int.Get().Reset(); 79 g_number_format_int.Get().Reset();
80 g_number_format_float.Get().Reset(); 80 g_number_format_float.Get().Reset();
81 } 81 }
82 82
83 } // namespace testing 83 } // namespace testing
84 84
85 } // namespace base 85 } // namespace base
86
OLDNEW
« no previous file with comments | « base/i18n/number_formatting.h ('k') | base/i18n/number_formatting_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698