diff options
author | vabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 08:43:37 +0000 |
---|---|---|
committer | vabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 08:43:37 +0000 |
commit | 5d30f92bf4e9f055d44ea0db2327b036ae41eef6 (patch) | |
tree | e4237d83ef224e420140e6411ac84f60216555d1 /sync | |
parent | 4ccaee6820cb8ac79581141a4f2463a2abb38442 (diff) | |
download | chromium_src-5d30f92bf4e9f055d44ea0db2327b036ae41eef6.zip chromium_src-5d30f92bf4e9f055d44ea0db2327b036ae41eef6.tar.gz chromium_src-5d30f92bf4e9f055d44ea0db2327b036ae41eef6.tar.bz2 |
Correct const accessors in base/values.(h|cc), Part II (ListValue)
For problem description and other info please see the BUG page.
This is for ListValue.
BUG=138946
TEST=N/A (no fix & no new feature)
TBR=jar,zelidrag,scottbyer,mpcomplete,darin,achuith,sky,estade,atwilson,grt,thakis,jamesr,hans,sadrul,pastarmovj
Review URL: https://chromiumcodereview.appspot.com/10837044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r-- | sync/internal_api/sync_manager_impl.cc | 2 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl_unittest.cc | 12 | ||||
-rw-r--r-- | sync/protocol/proto_value_conversions_unittest.cc | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc index 950e280..93da8de 100644 --- a/sync/internal_api/sync_manager_impl.cc +++ b/sync/internal_api/sync_manager_impl.cc @@ -1683,7 +1683,7 @@ JsArgList GetNodeInfoById(const JsArgList& args, ListValue return_args; ListValue* node_summaries = new ListValue(); return_args.Append(node_summaries); - ListValue* id_list = NULL; + const ListValue* id_list = NULL; ReadTransaction trans(FROM_HERE, user_share); if (args.Get().GetList(0, &id_list)) { CHECK(id_list); diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index 6cf652e..0e6b464 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -1000,7 +1000,7 @@ TEST_F(SyncManagerTest, ProcessJsMessageGetRootNodeDetails) { SendJsMessage("getRootNodeDetails", kNoArgs, reply_handler.AsWeakHandle()); EXPECT_EQ(1u, return_args.Get().GetSize()); - DictionaryValue* node_info = NULL; + const DictionaryValue* node_info = NULL; EXPECT_TRUE(return_args.Get().GetDictionary(0, &node_info)); if (node_info) { ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); @@ -1017,11 +1017,11 @@ void CheckGetNodesByIdReturnArgs(SyncManager* sync_manager, int64 id, bool is_detailed) { EXPECT_EQ(1u, return_args.Get().GetSize()); - ListValue* nodes = NULL; + const ListValue* nodes = NULL; ASSERT_TRUE(return_args.Get().GetList(0, &nodes)); ASSERT_TRUE(nodes); EXPECT_EQ(1u, nodes->GetSize()); - DictionaryValue* node_info = NULL; + const DictionaryValue* node_info = NULL; EXPECT_TRUE(nodes->GetDictionary(0, &node_info)); ASSERT_TRUE(node_info); ReadTransaction trans(FROM_HERE, sync_manager->GetUserShare()); @@ -1164,7 +1164,7 @@ TEST_F(SyncManagerTest, GetChildNodeIds) { } EXPECT_EQ(1u, return_args.Get().GetSize()); - ListValue* nodes = NULL; + const ListValue* nodes = NULL; ASSERT_TRUE(return_args.Get().GetList(0, &nodes)); ASSERT_TRUE(nodes); EXPECT_EQ(6u, nodes->GetSize()); @@ -1238,8 +1238,8 @@ TEST_F(SyncManagerTest, GetAllNodesTest) { // would make this test brittle without greatly increasing our chances of // catching real bugs. - ListValue* node_list; - DictionaryValue* first_result; + const ListValue* node_list; + const DictionaryValue* first_result; // The resulting argument list should have one argument, a list of nodes. ASSERT_EQ(1U, return_args.Get().GetSize()); diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc index 89a99e3..fd36450 100644 --- a/sync/protocol/proto_value_conversions_unittest.cc +++ b/sync/protocol/proto_value_conversions_unittest.cc @@ -193,8 +193,8 @@ namespace { bool ValueHasSpecifics(const DictionaryValue& value, const std::string& path) { const ListValue* entities_list = NULL; - DictionaryValue* entry_dictionary = NULL; - DictionaryValue* specifics_dictionary = NULL; + const DictionaryValue* entry_dictionary = NULL; + const DictionaryValue* specifics_dictionary = NULL; if (!value.GetList(path, &entities_list)) return false; |