diff options
author | Raul Tambre <raul@tambre.ee> | 2019-02-06 19:54:03 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-05 11:59:36 +0900 |
commit | 623e5ff592f34717e64be7d7023872d842157b3b (patch) | |
tree | 6d19a31b65e3b546cea971fdfd07f40de86870d9 | |
parent | ec49e566c997f1bcf12e8e2537af127c057b2e53 (diff) | |
download | libchrome-623e5ff592f34717e64be7d7023872d842157b3b.tar.gz |
//components: Convert base::(U)Int(64)ToString(16) to NumberToString(16)
The former non-overloaded variants are deprecated.
Removed casts where they are now unnecessary.
This is a mechanical change; there is no intended behavior change.
Change-Id: Idc852a0940c2e104a3b38c7419d29f5df5b05125
Reviewed-on: https://chromium-review.googlesource.com/c/1454631
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629523}
CrOS-Libchrome-Original-Commit: f88e5108fc018e680a449f876bddc2bded9fb122
-rw-r--r-- | components/policy/core/common/config_dir_policy_loader_unittest.cc | 7 | ||||
-rw-r--r-- | components/policy/core/common/plist_writer.cc | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/components/policy/core/common/config_dir_policy_loader_unittest.cc b/components/policy/core/common/config_dir_policy_loader_unittest.cc index 1f3d4347f1..d6b21a54e2 100644 --- a/components/policy/core/common/config_dir_policy_loader_unittest.cc +++ b/components/policy/core/common/config_dir_policy_loader_unittest.cc @@ -155,7 +155,8 @@ void TestHarness::WriteConfigFile(const base::DictionaryValue& dict, std::string TestHarness::NextConfigFileName() { EXPECT_LE(next_policy_file_index_, 999); - return std::string("policy") + base::IntToString(next_policy_file_index_++); + return std::string("policy") + + base::NumberToString(next_policy_file_index_++); } // static @@ -224,12 +225,12 @@ TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsMergePrefs) { const char kHomepageLocation[] = "HomepageLocation"; test_dict_bar.SetString(kHomepageLocation, "http://bar.com"); for (unsigned int i = 1; i <= 4; ++i) - harness_.WriteConfigFile(test_dict_bar, base::UintToString(i)); + harness_.WriteConfigFile(test_dict_bar, base::NumberToString(i)); base::DictionaryValue test_dict_foo; test_dict_foo.SetString(kHomepageLocation, "http://foo.com"); harness_.WriteConfigFile(test_dict_foo, "9"); for (unsigned int i = 5; i <= 8; ++i) - harness_.WriteConfigFile(test_dict_bar, base::UintToString(i)); + harness_.WriteConfigFile(test_dict_bar, base::NumberToString(i)); ConfigDirPolicyLoader loader( scoped_task_environment_.GetMainThreadTaskRunner(), harness_.test_dir(), diff --git a/components/policy/core/common/plist_writer.cc b/components/policy/core/common/plist_writer.cc index 68c1db5494..77b8002614 100644 --- a/components/policy/core/common/plist_writer.cc +++ b/components/policy/core/common/plist_writer.cc @@ -26,7 +26,7 @@ bool BuildPlistString(const base::Value& node, XmlWriter& plist_writer) { case base::Value::Type::INTEGER: { int value = node.GetInt(); - plist_writer.WriteElement("integer", base::IntToString(value)); + plist_writer.WriteElement("integer", base::NumberToString(value)); return true; } |