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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_models.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/autofill/autofill_dialog_models.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_models.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 MonthComboboxModel::~MonthComboboxModel() {} 184 MonthComboboxModel::~MonthComboboxModel() {}
185 185
186 int MonthComboboxModel::GetItemCount() const { 186 int MonthComboboxModel::GetItemCount() const {
187 // 12 months plus the empty entry. 187 // 12 months plus the empty entry.
188 return 13; 188 return 13;
189 } 189 }
190 190
191 // static 191 // static
192 string16 MonthComboboxModel::FormatMonth(int index) { 192 string16 MonthComboboxModel::FormatMonth(int index) {
193 return ASCIIToUTF16(StringPrintf("%2d", index)); 193 return ASCIIToUTF16(base::StringPrintf("%2d", index));
194 } 194 }
195 195
196 string16 MonthComboboxModel::GetItemAt(int index) { 196 string16 MonthComboboxModel::GetItemAt(int index) {
197 return index == 0 ? string16() : FormatMonth(index); 197 return index == 0 ? string16() : FormatMonth(index);
198 } 198 }
199 199
200 // YearComboboxModel ----------------------------------------------------------- 200 // YearComboboxModel -----------------------------------------------------------
201 201
202 YearComboboxModel::YearComboboxModel() : this_year_(0) { 202 YearComboboxModel::YearComboboxModel() : this_year_(0) {
203 base::Time time = base::Time::Now(); 203 base::Time time = base::Time::Now();
(...skipping 10 matching lines...) Expand all
214 } 214 }
215 215
216 string16 YearComboboxModel::GetItemAt(int index) { 216 string16 YearComboboxModel::GetItemAt(int index) {
217 if (index == 0) 217 if (index == 0)
218 return string16(); 218 return string16();
219 219
220 return base::IntToString16(this_year_ + index - 1); 220 return base::IntToString16(this_year_ + index - 1);
221 } 221 }
222 222
223 } // autofill 223 } // autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698