diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 14:39:42 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 14:39:42 +0000 |
commit | c9c07779224d9dd320323943a569dbf2e416a411 (patch) | |
tree | a040e1ca03410c7cb37547b16b5a0fb8bea67dde /chrome/browser | |
parent | be1ce6a7b2fa7e9622e5b249abd5fab478b6ca05 (diff) | |
download | chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.zip chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.tar.gz chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.tar.bz2 |
Remove number conversion functions from string_util. These moved to string_number_conversions.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3054036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/authorization_util.mm | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/find_bar_text_field_cell.mm | 8 | ||||
-rw-r--r-- | chrome/browser/first_run/first_run_win.cc | 7 | ||||
-rw-r--r-- | chrome/browser/views/autofill_profiles_view_win.cc | 3 |
4 files changed, 13 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/authorization_util.mm b/chrome/browser/cocoa/authorization_util.mm index a879db2..fdd4387 100644 --- a/chrome/browser/cocoa/authorization_util.mm +++ b/chrome/browser/cocoa/authorization_util.mm @@ -13,6 +13,7 @@ #include "base/eintr_wrapper.h" #include "base/logging.h" #import "base/mac_util.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "chrome/browser/cocoa/scoped_authorizationref.h" @@ -118,7 +119,7 @@ OSStatus ExecuteWithPrivilegesAndGetPID(AuthorizationRef authorization, --line_length; } std::string line(line_c, line_length); - if (!StringToInt(line, &line_pid)) { + if (!base::StringToInt(line, &line_pid)) { // StringToInt may have set line_pid to something, but if the conversion // was imperfect, use -1. LOG(ERROR) << "ExecuteWithPrivilegesAndGetPid: funny line: " << line; diff --git a/chrome/browser/cocoa/find_bar_text_field_cell.mm b/chrome/browser/cocoa/find_bar_text_field_cell.mm index 9b52c5f..9c41ad5 100644 --- a/chrome/browser/cocoa/find_bar_text_field_cell.mm +++ b/chrome/browser/cocoa/find_bar_text_field_cell.mm @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/logging.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "grit/generated_resources.h" @@ -65,9 +66,10 @@ CGFloat WidthForResults(NSAttributedString* resultsString) { - (void)setActiveMatch:(NSInteger)current of:(NSInteger)total { NSString* results = - base::SysWideToNSString(l10n_util::GetStringF(IDS_FIND_IN_PAGE_COUNT, - IntToWString(current), - IntToWString(total))); + base::SysUTF16ToNSString(l10n_util::GetStringFUTF16( + IDS_FIND_IN_PAGE_COUNT, + base::IntToString16(current), + base::IntToString16(total))); resultsString_.reset([[NSAttributedString alloc] initWithString:results attributes:[self resultsAttributes:(total > 0)]]); diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index d885ad7..9e2c87c 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -24,6 +24,7 @@ #include "base/process_util.h" #include "base/registry.h" #include "base/scoped_comptr_win.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/win_util.h" #include "chrome/common/chrome_constants.h" @@ -591,13 +592,13 @@ bool DecodeImportParams(const std::wstring& encoded, if (v.size() != 3) return false; - if (!StringToInt(v[0], browser_type)) + if (!base::StringToInt(v[0], browser_type)) return false; - if (!StringToInt(v[1], options)) + if (!base::StringToInt(v[1], options)) return false; - *window = reinterpret_cast<HWND>(StringToInt64(v[2])); + *window = reinterpret_cast<HWND>(base::StringToInt64(v[2])); return true; } diff --git a/chrome/browser/views/autofill_profiles_view_win.cc b/chrome/browser/views/autofill_profiles_view_win.cc index ffd477e..7b05966 100644 --- a/chrome/browser/views/autofill_profiles_view_win.cc +++ b/chrome/browser/views/autofill_profiles_view_win.cc @@ -1050,7 +1050,8 @@ void AutoFillProfilesView::EditableSetViewContents::InitCreditCardFields( combo_box_billing_ = new views::Combobox(billing_model_); combo_box_billing_->set_listener(this); int billing_id = -1; - if (StringToInt(temporary_info_.credit_card.billing_address(), &billing_id)) + if (base::StringToInt(temporary_info_.credit_card.billing_address(), + &billing_id)) combo_box_billing_->SetSelectedItem(billing_model_->GetIndex(billing_id)); billing_model_->UsedWithComboBox(combo_box_billing_); |