diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-23 21:58:45 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-23 21:58:45 +0000 |
commit | 85ecd7e2a7efe7fd05d1803412bfe46d8b3bd9d0 (patch) | |
tree | 945304a53f7fe9aa4df18620e55cb6d067604ea7 /components | |
parent | e53a7f29591f8b3f03f97541b3b30422780b39a6 (diff) | |
download | chromium_src-85ecd7e2a7efe7fd05d1803412bfe46d8b3bd9d0.zip chromium_src-85ecd7e2a7efe7fd05d1803412bfe46d8b3bd9d0.tar.gz chromium_src-85ecd7e2a7efe7fd05d1803412bfe46d8b3bd9d0.tar.bz2 |
Update uses of Value in chromeos/, cloud_print/, components/, content/ to use the base:: namespace.
BUG=88666
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/108603005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
30 files changed, 196 insertions, 184 deletions
diff --git a/components/autofill/content/browser/wallet/full_wallet.cc b/components/autofill/content/browser/wallet/full_wallet.cc index f66b28a..4a13b4f 100644 --- a/components/autofill/content/browser/wallet/full_wallet.cc +++ b/components/autofill/content/browser/wallet/full_wallet.cc @@ -44,8 +44,8 @@ FullWallet::~FullWallet() {} // static scoped_ptr<FullWallet> - FullWallet::CreateFullWallet(const DictionaryValue& dictionary) { - const ListValue* required_actions_list; + FullWallet::CreateFullWallet(const base::DictionaryValue& dictionary) { + const base::ListValue* required_actions_list; std::vector<RequiredAction> required_actions; if (dictionary.GetList("required_action", &required_actions_list)) { for (size_t i = 0; i < required_actions_list->GetSize(); ++i) { @@ -97,7 +97,7 @@ scoped_ptr<FullWallet> return scoped_ptr<FullWallet>(); } - const DictionaryValue* billing_address_dict; + const base::DictionaryValue* billing_address_dict; if (!dictionary.GetDictionary("billing_address", &billing_address_dict)) { DLOG(ERROR) << "Response from Google wallet missing billing address"; return scoped_ptr<FullWallet>(); @@ -110,7 +110,7 @@ scoped_ptr<FullWallet> return scoped_ptr<FullWallet>(); } - const DictionaryValue* shipping_address_dict; + const base::DictionaryValue* shipping_address_dict; scoped_ptr<Address> shipping_address; if (dictionary.GetDictionary("shipping_address", &shipping_address_dict)) { shipping_address = diff --git a/components/autofill/content/browser/wallet/full_wallet_unittest.cc b/components/autofill/content/browser/wallet/full_wallet_unittest.cc index 6f66213..59e6dd9 100644 --- a/components/autofill/content/browser/wallet/full_wallet_unittest.cc +++ b/components/autofill/content/browser/wallet/full_wallet_unittest.cc @@ -355,12 +355,12 @@ class FullWalletTest : public testing::Test { FullWalletTest() {} protected: void SetUpDictionary(const std::string& json) { - scoped_ptr<Value> value(base::JSONReader::Read(json)); + scoped_ptr<base::Value> value(base::JSONReader::Read(json)); ASSERT_TRUE(value.get()); - ASSERT_TRUE(value->IsType(Value::TYPE_DICTIONARY)); - dict.reset(static_cast<DictionaryValue*>(value.release())); + ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY)); + dict.reset(static_cast<base::DictionaryValue*>(value.release())); } - scoped_ptr<DictionaryValue> dict; + scoped_ptr<base::DictionaryValue> dict; }; TEST_F(FullWalletTest, CreateFullWalletMissingExpirationMonth) { diff --git a/components/autofill/content/browser/wallet/wallet_address.cc b/components/autofill/content/browser/wallet/wallet_address.cc index e7ab050..6d41222 100644 --- a/components/autofill/content/browser/wallet/wallet_address.cc +++ b/components/autofill/content/browser/wallet/wallet_address.cc @@ -51,7 +51,7 @@ Address* CreateAddressInternal(const base::DictionaryValue& dictionary, base::string16 address_line_1; base::string16 address_line_2; - const ListValue* address_line_list; + const base::ListValue* address_line_list; if (dictionary.GetList("postal_address.address_line", &address_line_list)) { if (!address_line_list->GetString(0, &address_line_1)) DVLOG(1) << "Response from Google Wallet missing address line 1"; diff --git a/components/autofill/content/browser/wallet/wallet_address_unittest.cc b/components/autofill/content/browser/wallet/wallet_address_unittest.cc index 728d635..3fc1882 100644 --- a/components/autofill/content/browser/wallet/wallet_address_unittest.cc +++ b/components/autofill/content/browser/wallet/wallet_address_unittest.cc @@ -162,12 +162,12 @@ class WalletAddressTest : public testing::Test { WalletAddressTest() {} protected: void SetUpDictionary(const std::string& json) { - scoped_ptr<Value> value(base::JSONReader::Read(json)); + scoped_ptr<base::Value> value(base::JSONReader::Read(json)); DCHECK(value.get()); - DCHECK(value->IsType(Value::TYPE_DICTIONARY)); - dict_.reset(static_cast<DictionaryValue*>(value.release())); + DCHECK(value->IsType(base::Value::TYPE_DICTIONARY)); + dict_.reset(static_cast<base::DictionaryValue*>(value.release())); } - scoped_ptr<const DictionaryValue> dict_; + scoped_ptr<const base::DictionaryValue> dict_; }; TEST_F(WalletAddressTest, AddressEqualsIgnoreID) { diff --git a/components/autofill/content/browser/wallet/wallet_client.cc b/components/autofill/content/browser/wallet/wallet_client.cc index 9e4f5f2..c5475cd 100644 --- a/components/autofill/content/browser/wallet/wallet_client.cc +++ b/components/autofill/content/browser/wallet/wallet_client.cc @@ -590,9 +590,9 @@ void WalletClient::OnURLFetchComplete( // error code and message for the user. case net::HTTP_OK: case net::HTTP_INTERNAL_SERVER_ERROR: { - scoped_ptr<Value> message_value(base::JSONReader::Read(data)); + scoped_ptr<base::Value> message_value(base::JSONReader::Read(data)); if (message_value.get() && - message_value->IsType(Value::TYPE_DICTIONARY)) { + message_value->IsType(base::Value::TYPE_DICTIONARY)) { response_dict.reset( static_cast<base::DictionaryValue*>(message_value.release())); } diff --git a/components/autofill/content/browser/wallet/wallet_client_unittest.cc b/components/autofill/content/browser/wallet/wallet_client_unittest.cc index 2d3aac4..1ea7f03 100644 --- a/components/autofill/content/browser/wallet/wallet_client_unittest.cc +++ b/components/autofill/content/browser/wallet/wallet_client_unittest.cc @@ -842,14 +842,15 @@ class WalletClientTest : public testing::Test { private: std::string GetData(const std::string& upload_data) { - scoped_ptr<Value> root(base::JSONReader::Read(upload_data)); + scoped_ptr<base::Value> root(base::JSONReader::Read(upload_data)); // If this is not a JSON dictionary, return plain text. - if (!root || !root->IsType(Value::TYPE_DICTIONARY)) + if (!root || !root->IsType(base::Value::TYPE_DICTIONARY)) return upload_data; // Remove api_key entry (to prevent accidental leak), return JSON as text. - DictionaryValue* dict = static_cast<DictionaryValue*>(root.get()); + base::DictionaryValue* dict = + static_cast<base::DictionaryValue*>(root.get()); dict->Remove("api_key", NULL); std::string clean_upload_data; base::JSONWriter::Write(dict, &clean_upload_data); diff --git a/components/autofill/content/browser/wallet/wallet_items.cc b/components/autofill/content/browser/wallet/wallet_items.cc index f947266..f655882 100644 --- a/components/autofill/content/browser/wallet/wallet_items.cc +++ b/components/autofill/content/browser/wallet/wallet_items.cc @@ -155,7 +155,7 @@ scoped_ptr<WalletItems::MaskedInstrument> return scoped_ptr<MaskedInstrument>(); } - const DictionaryValue* address_dict; + const base::DictionaryValue* address_dict; if (!dictionary.GetDictionary("billing_address", &address_dict)) { DLOG(ERROR) << "Response from Google wallet missing address"; return scoped_ptr<MaskedInstrument>(); @@ -168,7 +168,7 @@ scoped_ptr<WalletItems::MaskedInstrument> } std::vector<base::string16> supported_currencies; - const ListValue* supported_currency_list; + const base::ListValue* supported_currency_list; if (dictionary.GetList("supported_currency", &supported_currency_list)) { for (size_t i = 0; i < supported_currency_list->GetSize(); ++i) { base::string16 currency; @@ -437,7 +437,7 @@ WalletItems::~WalletItems() {} scoped_ptr<WalletItems> WalletItems::CreateWalletItems(const base::DictionaryValue& dictionary) { std::vector<RequiredAction> required_action; - const ListValue* required_action_list; + const base::ListValue* required_action_list; if (dictionary.GetList("required_action", &required_action_list)) { for (size_t i = 0; i < required_action_list->GetSize(); ++i) { std::string action_string; @@ -501,10 +501,10 @@ scoped_ptr<WalletItems> DVLOG(1) << "Response from Google wallet missing GAIA accounts"; } - const ListValue* legal_docs; + const base::ListValue* legal_docs; if (dictionary.GetList("required_legal_document", &legal_docs)) { for (size_t i = 0; i < legal_docs->GetSize(); ++i) { - const DictionaryValue* legal_doc_dict; + const base::DictionaryValue* legal_doc_dict; if (legal_docs->GetDictionary(i, &legal_doc_dict)) { scoped_ptr<LegalDocument> legal_doc( LegalDocument::CreateLegalDocument(*legal_doc_dict)); @@ -524,10 +524,10 @@ scoped_ptr<WalletItems> DVLOG(1) << "Response from Google wallet missing legal docs"; } - const ListValue* instruments; + const base::ListValue* instruments; if (dictionary.GetList("instrument", &instruments)) { for (size_t i = 0; i < instruments->GetSize(); ++i) { - const DictionaryValue* instrument_dict; + const base::DictionaryValue* instrument_dict; if (instruments->GetDictionary(i, &instrument_dict)) { scoped_ptr<MaskedInstrument> instrument( MaskedInstrument::CreateMaskedInstrument(*instrument_dict)); @@ -539,10 +539,10 @@ scoped_ptr<WalletItems> DVLOG(1) << "Response from Google wallet missing instruments"; } - const ListValue* addresses; + const base::ListValue* addresses; if (dictionary.GetList("address", &addresses)) { for (size_t i = 0; i < addresses->GetSize(); ++i) { - const DictionaryValue* address_dict; + const base::DictionaryValue* address_dict; if (addresses->GetDictionary(i, &address_dict)) { scoped_ptr<Address> address( Address::CreateAddressWithID(*address_dict)); diff --git a/components/autofill/content/browser/wallet/wallet_items_unittest.cc b/components/autofill/content/browser/wallet/wallet_items_unittest.cc index 02217be..f0f299b 100644 --- a/components/autofill/content/browser/wallet/wallet_items_unittest.cc +++ b/components/autofill/content/browser/wallet/wallet_items_unittest.cc @@ -393,12 +393,12 @@ class WalletItemsTest : public testing::Test { WalletItemsTest() {} protected: void SetUpDictionary(const std::string& json) { - scoped_ptr<Value> value(base::JSONReader::Read(json)); + scoped_ptr<base::Value> value(base::JSONReader::Read(json)); ASSERT_TRUE(value.get()); - ASSERT_TRUE(value->IsType(Value::TYPE_DICTIONARY)); - dict.reset(static_cast<DictionaryValue*>(value.release())); + ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY)); + dict.reset(static_cast<base::DictionaryValue*>(value.release())); } - scoped_ptr<DictionaryValue> dict; + scoped_ptr<base::DictionaryValue> dict; }; TEST_F(WalletItemsTest, CreateMaskedInstrumentMissingStatus) { diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc index 9067b71..3b8eee6 100644 --- a/components/dom_distiller/webui/dom_distiller_handler.cc +++ b/components/dom_distiller/webui/dom_distiller_handler.cc @@ -36,7 +36,7 @@ void DomDistillerHandler::RegisterMessages() { base::Unretained(this))); } -void DomDistillerHandler::HandleAddArticle(const ListValue* args) { +void DomDistillerHandler::HandleAddArticle(const base::ListValue* args) { std::string url; args->GetString(0, &url); GURL gurl(url); @@ -50,14 +50,14 @@ void DomDistillerHandler::HandleAddArticle(const ListValue* args) { } } -void DomDistillerHandler::HandleSelectArticle(const ListValue* args) { +void DomDistillerHandler::HandleSelectArticle(const base::ListValue* args) { std::string entry_id; args->GetString(0, &entry_id); // TODO(nyquist): Do something here. } -void DomDistillerHandler::HandleRequestEntries(const ListValue* args) { +void DomDistillerHandler::HandleRequestEntries(const base::ListValue* args) { base::ListValue entries; const std::vector<ArticleEntry>& entries_specifics = service_->GetEntries(); for (std::vector<ArticleEntry>::const_iterator it = entries_specifics.begin(); diff --git a/components/dom_distiller/webui/dom_distiller_handler.h b/components/dom_distiller/webui/dom_distiller_handler.h index e328633..24a951d 100644 --- a/components/dom_distiller/webui/dom_distiller_handler.h +++ b/components/dom_distiller/webui/dom_distiller_handler.h @@ -29,16 +29,16 @@ class DomDistillerHandler : public content::WebUIMessageHandler { // Callback from JavaScript for the "requestEntries" message. This // requests the list of entries and returns it to the front end by calling // "onReceivedEntries". There are no JavaScript arguments to this method. - void HandleRequestEntries(const ListValue* args); + void HandleRequestEntries(const base::ListValue* args); // Callback from JavaScript for when an article should be added. The first // element in |args| should be a string representing the URL to be added. - void HandleAddArticle(const ListValue* args); + void HandleAddArticle(const base::ListValue* args); // Callback from JavaScript for when an article is selected. The first element // in |args| should be a string representing the ID of the entry to be // selected. - void HandleSelectArticle(const ListValue* args); + void HandleSelectArticle(const base::ListValue* args); private: // Callback from DomDistillerService when an article is available. diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc index d1e4833..60e1fb5 100644 --- a/components/policy/core/browser/configuration_policy_handler.cc +++ b/components/policy/core/browser/configuration_policy_handler.cc @@ -24,7 +24,8 @@ namespace policy { // ConfigurationPolicyHandler implementation ----------------------------------- // static -std::string ConfigurationPolicyHandler::ValueTypeToString(Value::Type type) { +std::string ConfigurationPolicyHandler::ValueTypeToString( + base::Value::Type type) { static const char* strings[] = { "null", "boolean", @@ -53,7 +54,7 @@ void ConfigurationPolicyHandler::PrepareForDisplaying( TypeCheckingPolicyHandler::TypeCheckingPolicyHandler( const char* policy_name, - Value::Type value_type) + base::Value::Type value_type) : policy_name_(policy_name), value_type_(value_type) { } @@ -67,13 +68,13 @@ const char* TypeCheckingPolicyHandler::policy_name() const { bool TypeCheckingPolicyHandler::CheckPolicySettings(const PolicyMap& policies, PolicyErrorMap* errors) { - const Value* value = NULL; + const base::Value* value = NULL; return CheckAndGetValue(policies, errors, &value); } bool TypeCheckingPolicyHandler::CheckAndGetValue(const PolicyMap& policies, PolicyErrorMap* errors, - const Value** value) { + const base::Value** value) { *value = policies.GetValue(policy_name_); if (*value && !(*value)->IsType(value_type_)) { errors->AddError(policy_name_, @@ -278,7 +279,7 @@ void IntPercentageToDoublePolicyHandler::ApplyPolicySettings( SimplePolicyHandler::SimplePolicyHandler( const char* policy_name, const char* pref_path, - Value::Type value_type) + base::Value::Type value_type) : TypeCheckingPolicyHandler(policy_name, value_type), pref_path_(pref_path) { } @@ -290,7 +291,7 @@ void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, PrefValueMap* prefs) { if (!pref_path_) return; - const Value* value = policies.GetValue(policy_name()); + const base::Value* value = policies.GetValue(policy_name()); if (value) prefs->SetValue(pref_path_, value->DeepCopy()); } diff --git a/components/policy/core/browser/configuration_policy_handler.h b/components/policy/core/browser/configuration_policy_handler.h index 2c9c5df..74afaa3 100644 --- a/components/policy/core/browser/configuration_policy_handler.h +++ b/components/policy/core/browser/configuration_policy_handler.h @@ -31,7 +31,7 @@ struct POLICY_EXPORT PolicyToPreferenceMapEntry { // their corresponding preferences, and to check whether the policies are valid. class POLICY_EXPORT ConfigurationPolicyHandler { public: - static std::string ValueTypeToString(Value::Type type); + static std::string ValueTypeToString(base::Value::Type type); ConfigurationPolicyHandler(); virtual ~ConfigurationPolicyHandler(); @@ -76,7 +76,7 @@ class POLICY_EXPORT TypeCheckingPolicyHandler // Runs policy checks and returns the policy value if successful. bool CheckAndGetValue(const PolicyMap& policies, PolicyErrorMap* errors, - const Value** value); + const base::Value** value); private: // The name of the policy. diff --git a/components/policy/core/browser/configuration_policy_pref_store.cc b/components/policy/core/browser/configuration_policy_pref_store.cc index b47639f..60670fb 100644 --- a/components/policy/core/browser/configuration_policy_pref_store.cc +++ b/components/policy/core/browser/configuration_policy_pref_store.cc @@ -63,8 +63,8 @@ bool ConfigurationPolicyPrefStore::IsInitializationComplete() const { } bool ConfigurationPolicyPrefStore::GetValue(const std::string& key, - const Value** value) const { - const Value* stored_value = NULL; + const base::Value** value) const { + const base::Value* stored_value = NULL; if (!prefs_.get() || !prefs_->GetValue(key, &stored_value)) return false; diff --git a/components/policy/core/browser/configuration_policy_pref_store.h b/components/policy/core/browser/configuration_policy_pref_store.h index 38f4bf7..2a7b526 100644 --- a/components/policy/core/browser/configuration_policy_pref_store.h +++ b/components/policy/core/browser/configuration_policy_pref_store.h @@ -43,7 +43,7 @@ class POLICY_EXPORT ConfigurationPolicyPrefStore virtual bool HasObservers() const OVERRIDE; virtual bool IsInitializationComplete() const OVERRIDE; virtual bool GetValue(const std::string& key, - const Value** result) const OVERRIDE; + const base::Value** result) const OVERRIDE; // PolicyService::Observer methods: virtual void OnPolicyUpdated(const PolicyNamespace& ns, diff --git a/components/policy/core/common/cloud/policy_header_service_unittest.cc b/components/policy/core/common/cloud/policy_header_service_unittest.cc index 94363b5..b8c4e5b 100644 --- a/components/policy/core/common/cloud/policy_header_service_unittest.cc +++ b/components/policy/core/common/cloud/policy_header_service_unittest.cc @@ -61,9 +61,9 @@ class PolicyHeaderServiceTest : public testing::Test { std::string decoded; base::Base64Decode(header, &decoded); // Parse the JSON. - scoped_ptr<Value> value(base::JSONReader::Read(decoded)); + scoped_ptr<base::Value> value(base::JSONReader::Read(decoded)); ASSERT_TRUE(value); - DictionaryValue* dict; + base::DictionaryValue* dict; EXPECT_TRUE(value->GetAsDictionary(&dict)); // Read the values and verify them vs the expected values. std::string dm_token; diff --git a/components/policy/core/common/cloud/user_info_fetcher_unittest.cc b/components/policy/core/common/cloud/user_info_fetcher_unittest.cc index 47a4121..8649427 100644 --- a/components/policy/core/common/cloud/user_info_fetcher_unittest.cc +++ b/components/policy/core/common/cloud/user_info_fetcher_unittest.cc @@ -29,7 +29,7 @@ class MockUserInfoFetcherDelegate : public UserInfoFetcher::Delegate { ~MockUserInfoFetcherDelegate() {} MOCK_METHOD1(OnGetUserInfoFailure, void(const GoogleServiceAuthError& error)); - MOCK_METHOD1(OnGetUserInfoSuccess, void(const DictionaryValue* result)); + MOCK_METHOD1(OnGetUserInfoSuccess, void(const base::DictionaryValue* result)); }; MATCHER_P(MatchDict, expected, "matches DictionaryValue") { @@ -62,7 +62,7 @@ TEST_F(UserInfoFetcherTest, SuccessfulFetch) { // Generate what we expect our result will look like (should match // parsed kUserInfoResponse). - scoped_ptr<DictionaryValue> dict(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); dict->SetString("email", "test_user@test.com"); dict->SetBoolean("verified_email", true); dict->SetString("hd", "test.com"); diff --git a/components/policy/core/common/policy_map.cc b/components/policy/core/common/policy_map.cc index ffcdf43..5e1fd5b 100644 --- a/components/policy/core/common/policy_map.cc +++ b/components/policy/core/common/policy_map.cc @@ -48,7 +48,7 @@ bool PolicyMap::Entry::has_higher_priority_than( bool PolicyMap::Entry::Equals(const PolicyMap::Entry& other) const { return level == other.level && scope == other.scope && - Value::Equals(value, other.value) && + base::Value::Equals(value, other.value) && ExternalDataFetcher::Equals(external_data_fetcher, other.external_data_fetcher); } @@ -65,7 +65,7 @@ const PolicyMap::Entry* PolicyMap::Get(const std::string& policy) const { return entry == map_.end() ? NULL : &entry->second; } -const Value* PolicyMap::GetValue(const std::string& policy) const { +const base::Value* PolicyMap::GetValue(const std::string& policy) const { PolicyMapType::const_iterator entry = map_.find(policy); return entry == map_.end() ? NULL : entry->second.value; } @@ -73,7 +73,7 @@ const Value* PolicyMap::GetValue(const std::string& policy) const { void PolicyMap::Set(const std::string& policy, PolicyLevel level, PolicyScope scope, - Value* value, + base::Value* value, ExternalDataFetcher* external_data_fetcher) { Entry& entry = map_[policy]; entry.DeleteOwnedMembers(); @@ -124,11 +124,13 @@ void PolicyMap::MergeFrom(const PolicyMap& other) { } void PolicyMap::LoadFrom( - const DictionaryValue* policies, + const base::DictionaryValue* policies, PolicyLevel level, PolicyScope scope) { - for (DictionaryValue::Iterator it(*policies); !it.IsAtEnd(); it.Advance()) + for (base::DictionaryValue::Iterator it(*policies); + !it.IsAtEnd(); it.Advance()) { Set(it.key(), level, scope, it.value().DeepCopy(), NULL); + } } void PolicyMap::GetDifferingKeys(const PolicyMap& other, diff --git a/components/policy/core/common/policy_map_unittest.cc b/components/policy/core/common/policy_map_unittest.cc index d6d01f9..4a0dd9f 100644 --- a/components/policy/core/common/policy_map_unittest.cc +++ b/components/policy/core/common/policy_map_unittest.cc @@ -24,7 +24,7 @@ const char kTestPolicyName7[] = "policy.test.7"; const char kTestPolicyName8[] = "policy.test.8"; // Utility functions for the tests. -void SetPolicy(PolicyMap* map, const char* name, Value* value) { +void SetPolicy(PolicyMap* map, const char* name, base::Value* value) { map->Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, value, NULL); } @@ -51,11 +51,11 @@ scoped_ptr<ExternalDataFetcher> PolicyMapTest::CreateExternalDataFetcher( TEST_F(PolicyMapTest, SetAndGet) { PolicyMap map; - SetPolicy(&map, kTestPolicyName1, Value::CreateStringValue("aaa")); - StringValue expected("aaa"); + SetPolicy(&map, kTestPolicyName1, base::Value::CreateStringValue("aaa")); + base::StringValue expected("aaa"); EXPECT_TRUE(expected.Equals(map.GetValue(kTestPolicyName1))); - SetPolicy(&map, kTestPolicyName1, Value::CreateStringValue("bbb")); - StringValue expected_b("bbb"); + SetPolicy(&map, kTestPolicyName1, base::Value::CreateStringValue("bbb")); + base::StringValue expected_b("bbb"); EXPECT_TRUE(expected_b.Equals(map.GetValue(kTestPolicyName1))); SetPolicy(&map, kTestPolicyName1, CreateExternalDataFetcher("dummy").release()); @@ -78,14 +78,14 @@ TEST_F(PolicyMapTest, SetAndGet) { TEST_F(PolicyMapTest, Equals) { PolicyMap a; - SetPolicy(&a, kTestPolicyName1, Value::CreateStringValue("aaa")); + SetPolicy(&a, kTestPolicyName1, base::Value::CreateStringValue("aaa")); PolicyMap a2; - SetPolicy(&a2, kTestPolicyName1, Value::CreateStringValue("aaa")); + SetPolicy(&a2, kTestPolicyName1, base::Value::CreateStringValue("aaa")); PolicyMap b; - SetPolicy(&b, kTestPolicyName1, Value::CreateStringValue("bbb")); + SetPolicy(&b, kTestPolicyName1, base::Value::CreateStringValue("bbb")); PolicyMap c; - SetPolicy(&c, kTestPolicyName1, Value::CreateStringValue("aaa")); - SetPolicy(&c, kTestPolicyName2, Value::CreateBooleanValue(true)); + SetPolicy(&c, kTestPolicyName1, base::Value::CreateStringValue("aaa")); + SetPolicy(&c, kTestPolicyName2, base::Value::CreateBooleanValue(true)); PolicyMap d; SetPolicy(&d, kTestPolicyName1, CreateExternalDataFetcher("ddd").release()); @@ -129,12 +129,12 @@ TEST_F(PolicyMapTest, Equals) { TEST_F(PolicyMapTest, Swap) { PolicyMap a; - SetPolicy(&a, kTestPolicyName1, Value::CreateStringValue("aaa")); + SetPolicy(&a, kTestPolicyName1, base::Value::CreateStringValue("aaa")); SetPolicy(&a, kTestPolicyName2, CreateExternalDataFetcher("dummy").release()); PolicyMap b; - SetPolicy(&b, kTestPolicyName1, Value::CreateStringValue("bbb")); - SetPolicy(&b, kTestPolicyName3, Value::CreateBooleanValue(true)); + SetPolicy(&b, kTestPolicyName1, base::Value::CreateStringValue("bbb")); + SetPolicy(&b, kTestPolicyName3, base::Value::CreateBooleanValue(true)); a.Swap(&b); base::StringValue expected("bbb"); @@ -143,7 +143,7 @@ TEST_F(PolicyMapTest, Swap) { EXPECT_TRUE(expected_bool.Equals(a.GetValue(kTestPolicyName3))); EXPECT_FALSE(a.GetValue(kTestPolicyName2)); EXPECT_FALSE(a.Get(kTestPolicyName2)); - StringValue expected_a("aaa"); + base::StringValue expected_a("aaa"); EXPECT_TRUE(expected_a.Equals(b.GetValue(kTestPolicyName1))); EXPECT_FALSE(b.GetValue(kTestPolicyName3)); EXPECT_FALSE(a.GetValue(kTestPolicyName2)); @@ -162,37 +162,37 @@ TEST_F(PolicyMapTest, Swap) { TEST_F(PolicyMapTest, MergeFrom) { PolicyMap a; a.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - Value::CreateStringValue("google.com"), NULL); + base::Value::CreateStringValue("google.com"), NULL); a.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); a.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); a.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - Value::CreateBooleanValue(false), NULL); + base::Value::CreateBooleanValue(false), NULL); a.Set(kTestPolicyName5, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_MACHINE, - Value::CreateStringValue("google.com/q={x}"), NULL); + base::Value::CreateStringValue("google.com/q={x}"), NULL); PolicyMap b; b.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateStringValue("chromium.org"), NULL); + base::Value::CreateStringValue("chromium.org"), NULL); b.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateBooleanValue(false), NULL); + base::Value::CreateBooleanValue(false), NULL); b.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("b").release()); b.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_MACHINE, Value::CreateBooleanValue(true), NULL); + POLICY_SCOPE_MACHINE, base::Value::CreateBooleanValue(true), NULL); b.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateStringValue(std::string()), + base::Value::CreateStringValue(std::string()), NULL); b.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - Value::CreateBooleanValue(true), + base::Value::CreateBooleanValue(true), NULL); a.MergeFrom(b); @@ -200,25 +200,25 @@ TEST_F(PolicyMapTest, MergeFrom) { PolicyMap c; // POLICY_SCOPE_MACHINE over POLICY_SCOPE_USER. c.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateStringValue("chromium.org"), NULL); + base::Value::CreateStringValue("chromium.org"), NULL); // |a| has precedence over |b|. c.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); c.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); // POLICY_SCOPE_MACHINE over POLICY_SCOPE_USER for POLICY_LEVEL_RECOMMENDED. c.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_MACHINE, Value::CreateBooleanValue(true), NULL); + POLICY_SCOPE_MACHINE, base::Value::CreateBooleanValue(true), NULL); // POLICY_LEVEL_MANDATORY over POLICY_LEVEL_RECOMMENDED. c.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateStringValue(std::string()), + base::Value::CreateStringValue(std::string()), NULL); // Merge new ones. c.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); EXPECT_TRUE(a.Equals(c)); } @@ -226,40 +226,41 @@ TEST_F(PolicyMapTest, MergeFrom) { TEST_F(PolicyMapTest, GetDifferingKeys) { PolicyMap a; a.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - Value::CreateStringValue("google.com"), NULL); + base::Value::CreateStringValue("google.com"), NULL); a.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("dummy").release()); a.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); a.Set(kTestPolicyName4, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); a.Set(kTestPolicyName5, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - Value::CreateBooleanValue(false), NULL); + base::Value::CreateBooleanValue(false), NULL); a.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_MACHINE, - Value::CreateStringValue("google.com/q={x}"), NULL); + base::Value::CreateStringValue("google.com/q={x}"), NULL); a.Set(kTestPolicyName7, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); PolicyMap b; b.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - Value::CreateStringValue("google.com"), NULL); + base::Value::CreateStringValue("google.com"), NULL); b.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("dummy").release()); b.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - Value::CreateBooleanValue(false), NULL); + base::Value::CreateBooleanValue(false), NULL); b.Set(kTestPolicyName4, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("b").release()); b.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - Value::CreateBooleanValue(false), NULL); + base::Value::CreateBooleanValue(false), NULL); b.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_USER, Value::CreateStringValue("google.com/q={x}"), NULL); + POLICY_SCOPE_USER, base::Value::CreateStringValue("google.com/q={x}"), + NULL); b.Set(kTestPolicyName8, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - Value::CreateBooleanValue(true), NULL); + base::Value::CreateBooleanValue(true), NULL); std::set<std::string> diff; std::set<std::string> diff2; diff --git a/components/policy/core/common/policy_service.cc b/components/policy/core/common/policy_service.cc index fe4bb303..8ba3da2 100644 --- a/components/policy/core/common/policy_service.cc +++ b/components/policy/core/common/policy_service.cc @@ -32,8 +32,8 @@ void PolicyChangeRegistrar::OnPolicyUpdated(const PolicyNamespace& ns, return; for (CallbackMap::iterator it = callback_map_.begin(); it != callback_map_.end(); ++it) { - const Value* prev = previous.GetValue(it->first); - const Value* cur = current.GetValue(it->first); + const base::Value* prev = previous.GetValue(it->first); + const base::Value* cur = current.GetValue(it->first); if (!base::Value::Equals(prev, cur)) it->second.Run(prev, cur); } diff --git a/components/policy/core/common/policy_service.h b/components/policy/core/common/policy_service.h index 4293e5c..dbc09ae 100644 --- a/components/policy/core/common/policy_service.h +++ b/components/policy/core/common/policy_service.h @@ -78,7 +78,8 @@ class POLICY_EXPORT PolicyService { // PolicyMap for the given policy namespace. class POLICY_EXPORT PolicyChangeRegistrar : public PolicyService::Observer { public: - typedef base::Callback<void(const Value*, const Value*)> UpdateCallback; + typedef base::Callback<void(const base::Value*, + const base::Value*)> UpdateCallback; // Observes updates to the given (domain, component_id) namespace in the given // |policy_service|, and notifies |observer| whenever any of the registered diff --git a/components/policy/core/common/registry_dict_win.cc b/components/policy/core/common/registry_dict_win.cc index 80f9a34..a843d89 100644 --- a/components/policy/core/common/registry_dict_win.cc +++ b/components/policy/core/common/registry_dict_win.cc @@ -70,7 +70,7 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value, if (value.GetAsInteger(&int_value) || (value.GetAsString(&string_value) && base::StringToInt(string_value, &int_value))) { - return make_scoped_ptr(Value::CreateBooleanValue(int_value != 0)); + return make_scoped_ptr(base::Value::CreateBooleanValue(int_value != 0)); } break; } @@ -198,7 +198,7 @@ void RegistryDict::SetValue(const std::string& name, return; } - Value*& entry = values_[name]; + base::Value*& entry = values_[name]; delete entry; entry = dict.release(); } diff --git a/components/url_matcher/url_matcher_factory.cc b/components/url_matcher/url_matcher_factory.cc index ab1c365..f36e452 100644 --- a/components/url_matcher/url_matcher_factory.cc +++ b/components/url_matcher/url_matcher_factory.cc @@ -114,7 +114,7 @@ URLMatcherFactory::CreateFromURLFilterDictionary( for (base::DictionaryValue::Iterator iter(*url_filter_dict); !iter.IsAtEnd(); iter.Advance()) { const std::string& condition_attribute_name = iter.key(); - const Value& condition_attribute_value = iter.value(); + const base::Value& condition_attribute_value = iter.value(); if (IsURLMatcherConditionAttribute(condition_attribute_name)) { // Handle {host, path, ...}{Prefix, Suffix, Contains, Equals}. URLMatcherCondition url_matcher_condition = @@ -245,9 +245,9 @@ scoped_ptr<URLMatcherPortFilter> URLMatcherFactory::CreateURLMatcherPorts( return scoped_ptr<URLMatcherPortFilter>(); } - for (ListValue::const_iterator i = value_list->begin(); + for (base::ListValue::const_iterator i = value_list->begin(); i != value_list->end(); ++i) { - Value* entry = *i; + base::Value* entry = *i; int port = 0; base::ListValue* range = NULL; if (entry->GetAsInteger(&port)) { diff --git a/components/url_matcher/url_matcher_factory_unittest.cc b/components/url_matcher/url_matcher_factory_unittest.cc index 9d6632e..697432e 100644 --- a/components/url_matcher/url_matcher_factory_unittest.cc +++ b/components/url_matcher/url_matcher_factory_unittest.cc @@ -23,19 +23,19 @@ TEST(URLMatcherFactoryTest, CreateFromURLFilterDictionary) { scoped_refptr<URLMatcherConditionSet> result; // Invalid key: {"invalid": "foobar"} - DictionaryValue invalid_condition; + base::DictionaryValue invalid_condition; invalid_condition.SetString("invalid", "foobar"); // Invalid value type: {"hostSuffix": []} - DictionaryValue invalid_condition2; - invalid_condition2.Set(keys::kHostSuffixKey, new ListValue); + base::DictionaryValue invalid_condition2; + invalid_condition2.Set(keys::kHostSuffixKey, new base::ListValue); // Invalid regex value: {"urlMatches": "*"} - DictionaryValue invalid_condition3; + base::DictionaryValue invalid_condition3; invalid_condition3.SetString(keys::kURLMatchesKey, "*"); // Invalid regex value: {"originAndPathMatches": "*"} - DictionaryValue invalid_condition4; + base::DictionaryValue invalid_condition4; invalid_condition4.SetString(keys::kOriginAndPathMatchesKey, "*"); // Valid values: @@ -47,17 +47,17 @@ TEST(URLMatcherFactoryTest, CreateFromURLFilterDictionary) { // } // Port range: Allow 80;1000-1010. - ListValue* port_range = new ListValue(); - port_range->Append(Value::CreateIntegerValue(1000)); - port_range->Append(Value::CreateIntegerValue(1010)); - ListValue* port_ranges = new ListValue(); - port_ranges->Append(Value::CreateIntegerValue(80)); + base::ListValue* port_range = new base::ListValue(); + port_range->Append(base::Value::CreateIntegerValue(1000)); + port_range->Append(base::Value::CreateIntegerValue(1010)); + base::ListValue* port_ranges = new base::ListValue(); + port_ranges->Append(base::Value::CreateIntegerValue(80)); port_ranges->Append(port_range); - ListValue* scheme_list = new ListValue(); - scheme_list->Append(Value::CreateStringValue("http")); + base::ListValue* scheme_list = new base::ListValue(); + scheme_list->Append(base::Value::CreateStringValue("http")); - DictionaryValue valid_condition; + base::DictionaryValue valid_condition; valid_condition.SetString(keys::kHostSuffixKey, "example.com"); valid_condition.SetString(keys::kHostPrefixKey, "www"); valid_condition.Set(keys::kPortsKey, port_ranges); @@ -120,28 +120,28 @@ TEST(URLMatcherFactoryTest, UpperCase) { scoped_refptr<URLMatcherConditionSet> result; // {"hostContains": "exaMple"} - DictionaryValue invalid_condition1; + base::DictionaryValue invalid_condition1; invalid_condition1.SetString(keys::kHostContainsKey, "exaMple"); // {"hostSuffix": ".Com"} - DictionaryValue invalid_condition2; + base::DictionaryValue invalid_condition2; invalid_condition2.SetString(keys::kHostSuffixKey, ".Com"); // {"hostPrefix": "WWw."} - DictionaryValue invalid_condition3; + base::DictionaryValue invalid_condition3; invalid_condition3.SetString(keys::kHostPrefixKey, "WWw."); // {"hostEquals": "WWW.example.Com"} - DictionaryValue invalid_condition4; + base::DictionaryValue invalid_condition4; invalid_condition4.SetString(keys::kHostEqualsKey, "WWW.example.Com"); // {"scheme": ["HTTP"]} - ListValue* scheme_list = new ListValue(); - scheme_list->Append(Value::CreateStringValue("HTTP")); - DictionaryValue invalid_condition5; + base::ListValue* scheme_list = new base::ListValue(); + scheme_list->Append(base::Value::CreateStringValue("HTTP")); + base::DictionaryValue invalid_condition5; invalid_condition5.Set(keys::kSchemesKey, scheme_list); - const DictionaryValue* invalid_conditions[] = { + const base::DictionaryValue* invalid_conditions[] = { &invalid_condition1, &invalid_condition2, &invalid_condition3, @@ -227,10 +227,10 @@ void UrlConditionCaseTest::Test() const { void UrlConditionCaseTest::CheckCondition( const std::string& value, UrlConditionCaseTest::ResultType expected_result) const { - DictionaryValue condition; + base::DictionaryValue condition; if (use_list_of_strings_) { - ListValue* list = new ListValue(); - list->Append(Value::CreateStringValue(value)); + base::ListValue* list = new base::ListValue(); + list->Append(base::Value::CreateStringValue(value)); condition.SetWithoutPathExpansion(condition_key_, list); } else { condition.SetStringWithoutPathExpansion(condition_key_, value); diff --git a/components/url_matcher/url_matcher_helpers.cc b/components/url_matcher/url_matcher_helpers.cc index 61358e7..6eab51d 100644 --- a/components/url_matcher/url_matcher_helpers.cc +++ b/components/url_matcher/url_matcher_helpers.cc @@ -13,7 +13,7 @@ namespace url_matcher_helpers { // successful. bool GetAsStringVector(const base::Value* value, std::vector<std::string>* out) { - const ListValue* value_as_list = 0; + const base::ListValue* value_as_list = 0; if (!value->GetAsList(&value_as_list)) return false; diff --git a/components/user_prefs/pref_registry_syncable.cc b/components/user_prefs/pref_registry_syncable.cc index 4ffd639..b0e40a2 100644 --- a/components/user_prefs/pref_registry_syncable.cc +++ b/components/user_prefs/pref_registry_syncable.cc @@ -23,28 +23,28 @@ base::Value* CreateLocaleDefaultValue(base::Value::Type type, const std::string resource_string = l10n_util::GetStringUTF8(message_id); DCHECK(!resource_string.empty()); switch (type) { - case Value::TYPE_BOOLEAN: { + case base::Value::TYPE_BOOLEAN: { if ("true" == resource_string) - return Value::CreateBooleanValue(true); + return base::Value::CreateBooleanValue(true); if ("false" == resource_string) - return Value::CreateBooleanValue(false); + return base::Value::CreateBooleanValue(false); break; } - case Value::TYPE_INTEGER: { + case base::Value::TYPE_INTEGER: { int val; base::StringToInt(resource_string, &val); - return Value::CreateIntegerValue(val); + return base::Value::CreateIntegerValue(val); } - case Value::TYPE_DOUBLE: { + case base::Value::TYPE_DOUBLE: { double val; base::StringToDouble(resource_string, &val); - return Value::CreateDoubleValue(val); + return base::Value::CreateDoubleValue(val); } - case Value::TYPE_STRING: { - return Value::CreateStringValue(resource_string); + case base::Value::TYPE_STRING: { + return base::Value::CreateStringValue(resource_string); } default: { @@ -53,7 +53,7 @@ base::Value* CreateLocaleDefaultValue(base::Value::Type type, } } NOTREACHED(); - return Value::CreateNullValue(); + return base::Value::CreateNullValue(); } } // namespace @@ -78,7 +78,7 @@ void PrefRegistrySyncable::RegisterBooleanPref(const char* path, bool default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, - Value::CreateBooleanValue(default_value), + base::Value::CreateBooleanValue(default_value), sync_status); } @@ -86,7 +86,7 @@ void PrefRegistrySyncable::RegisterIntegerPref(const char* path, int default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, - Value::CreateIntegerValue(default_value), + base::Value::CreateIntegerValue(default_value), sync_status); } @@ -94,7 +94,7 @@ void PrefRegistrySyncable::RegisterDoublePref(const char* path, double default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, - Value::CreateDoubleValue(default_value), + base::Value::CreateDoubleValue(default_value), sync_status); } @@ -102,7 +102,7 @@ void PrefRegistrySyncable::RegisterStringPref(const char* path, const std::string& default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, - Value::CreateStringValue(default_value), + base::Value::CreateStringValue(default_value), sync_status); } @@ -111,29 +111,30 @@ void PrefRegistrySyncable::RegisterFilePathPref( const base::FilePath& default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, - Value::CreateStringValue(default_value.value()), + base::Value::CreateStringValue( + default_value.value()), sync_status); } void PrefRegistrySyncable::RegisterListPref(const char* path, PrefSyncStatus sync_status) { - RegisterSyncablePreference(path, new ListValue(), sync_status); + RegisterSyncablePreference(path, new base::ListValue(), sync_status); } void PrefRegistrySyncable::RegisterListPref(const char* path, - ListValue* default_value, + base::ListValue* default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, default_value, sync_status); } void PrefRegistrySyncable::RegisterDictionaryPref(const char* path, PrefSyncStatus sync_status) { - RegisterSyncablePreference(path, new DictionaryValue(), sync_status); + RegisterSyncablePreference(path, new base::DictionaryValue(), sync_status); } void PrefRegistrySyncable::RegisterDictionaryPref( const char* path, - DictionaryValue* default_value, + base::DictionaryValue* default_value, PrefSyncStatus sync_status) { RegisterSyncablePreference(path, default_value, sync_status); } @@ -144,7 +145,8 @@ void PrefRegistrySyncable::RegisterLocalizedBooleanPref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - CreateLocaleDefaultValue(Value::TYPE_BOOLEAN, locale_default_message_id), + CreateLocaleDefaultValue(base::Value::TYPE_BOOLEAN, + locale_default_message_id), sync_status); } @@ -154,7 +156,8 @@ void PrefRegistrySyncable::RegisterLocalizedIntegerPref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - CreateLocaleDefaultValue(Value::TYPE_INTEGER, locale_default_message_id), + CreateLocaleDefaultValue(base::Value::TYPE_INTEGER, + locale_default_message_id), sync_status); } @@ -164,7 +167,8 @@ void PrefRegistrySyncable::RegisterLocalizedDoublePref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - CreateLocaleDefaultValue(Value::TYPE_DOUBLE, locale_default_message_id), + CreateLocaleDefaultValue(base::Value::TYPE_DOUBLE, + locale_default_message_id), sync_status); } @@ -174,7 +178,8 @@ void PrefRegistrySyncable::RegisterLocalizedStringPref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - CreateLocaleDefaultValue(Value::TYPE_STRING, locale_default_message_id), + CreateLocaleDefaultValue(base::Value::TYPE_STRING, + locale_default_message_id), sync_status); } @@ -184,7 +189,7 @@ void PrefRegistrySyncable::RegisterInt64Pref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - Value::CreateStringValue(base::Int64ToString(default_value)), + base::Value::CreateStringValue(base::Int64ToString(default_value)), sync_status); } @@ -194,7 +199,7 @@ void PrefRegistrySyncable::RegisterUint64Pref( PrefSyncStatus sync_status) { RegisterSyncablePreference( path, - Value::CreateStringValue(base::Uint64ToString(default_value)), + base::Value::CreateStringValue(base::Uint64ToString(default_value)), sync_status); } diff --git a/components/wifi/fake_wifi_service.cc b/components/wifi/fake_wifi_service.cc index 9ca63ef..af78d72 100644 --- a/components/wifi/fake_wifi_service.cc +++ b/components/wifi/fake_wifi_service.cc @@ -88,7 +88,7 @@ class FakeWiFiService : public WiFiService { virtual void UnInitialize() OVERRIDE {} virtual void GetProperties(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) OVERRIDE { NetworkList::iterator network_properties = FindNetwork(network_guid); if (network_properties != networks_.end()) { @@ -99,7 +99,7 @@ class FakeWiFiService : public WiFiService { } virtual void GetManagedProperties(const std::string& network_guid, - DictionaryValue* managed_properties, + base::DictionaryValue* managed_properties, std::string* error) OVERRIDE { const std::string network_properties = "{" @@ -152,14 +152,14 @@ class FakeWiFiService : public WiFiService { " }" " }" "}"; - scoped_ptr<DictionaryValue> properties_value( - reinterpret_cast<DictionaryValue*>( + scoped_ptr<base::DictionaryValue> properties_value( + reinterpret_cast<base::DictionaryValue*>( base::JSONReader::Read(network_properties))); managed_properties->MergeDictionary(properties_value.get()); } virtual void GetState(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) OVERRIDE { NetworkList::iterator network_properties = FindNetwork(network_guid); if (network_properties == networks_.end()) { @@ -178,8 +178,8 @@ class FakeWiFiService : public WiFiService { " \"SignalStrength\": 80" " }" "}"; - scoped_ptr<DictionaryValue> properties_value( - reinterpret_cast<DictionaryValue*>( + scoped_ptr<base::DictionaryValue> properties_value( + reinterpret_cast<base::DictionaryValue*>( base::JSONReader::Read(network_state))); properties->MergeDictionary(properties_value.get()); } @@ -209,14 +209,14 @@ class FakeWiFiService : public WiFiService { } virtual void GetVisibleNetworks(const std::string& network_type, - ListValue* network_list) OVERRIDE { + base::ListValue* network_list) OVERRIDE { for (WiFiService::NetworkList::const_iterator it = networks_.begin(); it != networks_.end(); ++it) { if (network_type.empty() || network_type == onc::network_type::kAllTypes || it->type == network_type) { - scoped_ptr<DictionaryValue> network(it->ToValue(true)); + scoped_ptr<base::DictionaryValue> network(it->ToValue(true)); network_list->Append(network.release()); } } diff --git a/components/wifi/wifi_service.cc b/components/wifi/wifi_service.cc index 2ce8b47..e56fc81 100644 --- a/components/wifi/wifi_service.cc +++ b/components/wifi/wifi_service.cc @@ -54,7 +54,7 @@ scoped_ptr<base::DictionaryValue> WiFiService::NetworkProperties::ToValue( } else { // Add properites from json extra if present. if (!json_extra.empty()) { - Value* value_extra = base::JSONReader::Read(json_extra); + base::Value* value_extra = base::JSONReader::Read(json_extra); value->Set(type, value_extra); } } diff --git a/components/wifi/wifi_service.h b/components/wifi/wifi_service.h index 6a288af..b45ebfd 100644 --- a/components/wifi/wifi_service.h +++ b/components/wifi/wifi_service.h @@ -45,7 +45,7 @@ class WIFI_EXPORT WiFiService { // Get Properties of network identified by |network_guid|. Populates // |properties| on success, |error| on failure. virtual void GetProperties(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) = 0; // Gets the merged properties of the network with id |network_guid| from the @@ -53,7 +53,7 @@ class WIFI_EXPORT WiFiService { // the currently active settings. Populates |managed_properties| on success, // |error| on failure. virtual void GetManagedProperties(const std::string& network_guid, - DictionaryValue* managed_properties, + base::DictionaryValue* managed_properties, std::string* error) = 0; // Get the cached read-only properties of the network with id |network_guid|. @@ -62,7 +62,7 @@ class WIFI_EXPORT WiFiService { // returns a subset of the properties returned by |GetProperties|. Populates // |properties| on success, |error| on failure. virtual void GetState(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) = 0; // Set Properties of network identified by |network_guid|. Populates |error| @@ -83,7 +83,7 @@ class WIFI_EXPORT WiFiService { // Get list of visible networks of |network_type| (one of onc::network_type). // Populates |network_list| on success. virtual void GetVisibleNetworks(const std::string& network_type, - ListValue* network_list) = 0; + base::ListValue* network_list) = 0; // Request network scan. Send |NetworkListChanged| event on completion. virtual void RequestNetworkScan() = 0; diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc index 3f8935f..ac4d011 100644 --- a/components/wifi/wifi_service_win.cc +++ b/components/wifi/wifi_service_win.cc @@ -177,15 +177,15 @@ class WiFiServiceImpl : public WiFiService { virtual void UnInitialize() OVERRIDE; virtual void GetProperties(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) OVERRIDE; virtual void GetManagedProperties(const std::string& network_guid, - DictionaryValue* managed_properties, + base::DictionaryValue* managed_properties, std::string* error) OVERRIDE; virtual void GetState(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) OVERRIDE; virtual void SetProperties(const std::string& network_guid, @@ -198,7 +198,7 @@ class WiFiServiceImpl : public WiFiService { std::string* error) OVERRIDE; virtual void GetVisibleNetworks(const std::string& network_type, - ListValue* network_list) OVERRIDE; + base::ListValue* network_list) OVERRIDE; virtual void RequestNetworkScan() OVERRIDE; @@ -401,7 +401,7 @@ class WiFiServiceImpl : public WiFiService { GUID interface_guid_; // Temporary storage of network properties indexed by |network_guid|. Persist // only in memory. - DictionaryValue connect_properties_; + base::DictionaryValue connect_properties_; // Preserved WLAN profile xml. std::map<std::string, std::string> saved_profiles_xml_; // Observer to get notified when network(s) have changed (e.g. connect). @@ -457,7 +457,7 @@ void WiFiServiceImpl::UnInitialize() { } void WiFiServiceImpl::GetProperties(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) { DWORD error_code = EnsureInitialized(); if (error_code == ERROR_SUCCESS) { @@ -479,14 +479,15 @@ void WiFiServiceImpl::GetProperties(const std::string& network_guid, CheckError(error_code, kWiFiServiceError, error); } -void WiFiServiceImpl::GetManagedProperties(const std::string& network_guid, - DictionaryValue* managed_properties, - std::string* error) { +void WiFiServiceImpl::GetManagedProperties( + const std::string& network_guid, + base::DictionaryValue* managed_properties, + std::string* error) { CheckError(ERROR_CALL_NOT_IMPLEMENTED, kWiFiServiceError, error); } void WiFiServiceImpl::GetState(const std::string& network_guid, - DictionaryValue* properties, + base::DictionaryValue* properties, std::string* error) { CheckError(ERROR_CALL_NOT_IMPLEMENTED, kWiFiServiceError, error); } @@ -550,7 +551,7 @@ void WiFiServiceImpl::CreateNetwork( } void WiFiServiceImpl::GetVisibleNetworks(const std::string& network_type, - ListValue* network_list) { + base::ListValue* network_list) { if (!network_type.empty() && network_type != onc::network_type::kAllTypes && network_type != onc::network_type::kWiFi) { @@ -566,7 +567,7 @@ void WiFiServiceImpl::GetVisibleNetworks(const std::string& network_type, for (WiFiService::NetworkList::const_iterator it = networks.begin(); it != networks.end(); ++it) { - scoped_ptr<DictionaryValue> network(it->ToValue(true)); + scoped_ptr<base::DictionaryValue> network(it->ToValue(true)); network_list->Append(network.release()); } } @@ -1261,8 +1262,8 @@ WiFiService::Frequency WiFiServiceImpl::GetConnectedFrequency( WiFiService::Frequency WiFiServiceImpl::GetFrequencyToConnect( const std::string& network_guid) const { // Check whether desired frequency is set in |connect_properties_|. - const DictionaryValue* properties; - const DictionaryValue* wifi; + const base::DictionaryValue* properties; + const base::DictionaryValue* wifi; int frequency; if (connect_properties_.GetDictionaryWithoutPathExpansion( network_guid, &properties) && diff --git a/components/wifi/wifi_test.cc b/components/wifi/wifi_test.cc index ff27b0d..c8875ba 100644 --- a/components/wifi/wifi_test.cc +++ b/components/wifi/wifi_test.cc @@ -118,7 +118,7 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) { wifi_service->Initialize(NULL); if (parsed_command_line.HasSwitch("list")) { - ListValue network_list; + base::ListValue network_list; wifi_service->GetVisibleNetworks(std::string(), &network_list); VLOG(0) << network_list; return true; @@ -126,7 +126,7 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) { if (parsed_command_line.HasSwitch("get_properties")) { if (network_guid.length() > 0) { - DictionaryValue properties; + base::DictionaryValue properties; std::string error; wifi_service->GetProperties(network_guid, &properties, &error); VLOG(0) << error << ":\n" << properties; @@ -135,7 +135,7 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) { } // Optional properties (frequency, password) to use for connect or create. - scoped_ptr<DictionaryValue> properties(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> properties(new base::DictionaryValue()); if (!frequency.empty()) { int value = 0; |