diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
commit | e83326f8400791e92875546b2fd1885a3a17d1b1 (patch) | |
tree | edbe773208b1a9f6965b45b55da10afd210ea7bb /chrome/common | |
parent | 8e0a03bf3b1aacaa7a2bc2561d8eb1b83eb9c2e5 (diff) | |
download | chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.zip chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.gz chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.bz2 |
Convert more callers of the integer/string functions to using
string_number_conversions.h
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3013046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 3 | ||||
-rw-r--r-- | chrome/common/json_pref_store_unittest.cc | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index 259849b..17c176d 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -14,6 +14,7 @@ #include "base/file_util.h" #include "base/i18n/rtl.h" #include "base/path_service.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" @@ -123,7 +124,7 @@ TEST(ExtensionTest, InitFromValueInvalid) { DictionaryValue* icons = NULL; input_value->GetDictionary(keys::kIcons, &icons); ASSERT_FALSE(NULL == icons); - icons->SetInteger(ASCIIToWide(IntToString(128)), 42); + icons->SetInteger(ASCIIToWide(base::IntToString(128)), 42); EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error)); EXPECT_TRUE(MatchPatternASCII(error, errors::kInvalidIconPath)); diff --git a/chrome/common/json_pref_store_unittest.cc b/chrome/common/json_pref_store_unittest.cc index 723a959..8f05fd8 100644 --- a/chrome/common/json_pref_store_unittest.cc +++ b/chrome/common/json_pref_store_unittest.cc @@ -7,6 +7,7 @@ #include "base/message_loop_proxy.h" #include "base/path_service.h" #include "base/scoped_ptr.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/thread.h" #include "base/utf_string_conversions.h" @@ -134,9 +135,12 @@ TEST_F(JsonPrefStoreTest, Basic) { EXPECT_TRUE(prefs->GetInteger(kMaxTabs, &integer)); EXPECT_EQ(10, integer); - prefs->SetString(kLongIntPref, Int64ToWString(214748364842LL)); + prefs->SetString(kLongIntPref, + UTF8ToWide(base::Int64ToString(214748364842LL))); EXPECT_TRUE(prefs->GetString(kLongIntPref, &string_value)); - EXPECT_EQ(214748364842LL, StringToInt64(WideToUTF16Hack(string_value))); + int64 value; + base::StringToInt64(WideToUTF8(string_value), &value); + EXPECT_EQ(214748364842LL, value); // Serialize and compare to expected output. FilePath output_file = input_file; |