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 | |
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
70 files changed, 328 insertions, 308 deletions
diff --git a/chromeos/dbus/nfc_device_client.cc b/chromeos/dbus/nfc_device_client.cc index b539ce4..e9833c9 100644 --- a/chromeos/dbus/nfc_device_client.cc +++ b/chromeos/dbus/nfc_device_client.cc @@ -111,7 +111,7 @@ class NfcDeviceClientImpl : public NfcDeviceClient, dbus::MessageWriter array_writer(NULL); dbus::MessageWriter dict_entry_writer(NULL); writer.OpenArray("{sv}", &array_writer); - for (DictionaryValue::Iterator iter(attributes); + for (base::DictionaryValue::Iterator iter(attributes); !iter.IsAtEnd(); iter.Advance()) { array_writer.OpenDictEntry(&dict_entry_writer); dict_entry_writer.AppendString(iter.key()); diff --git a/chromeos/dbus/nfc_tag_client.cc b/chromeos/dbus/nfc_tag_client.cc index 8de4c27..de7e1ef 100644 --- a/chromeos/dbus/nfc_tag_client.cc +++ b/chromeos/dbus/nfc_tag_client.cc @@ -102,7 +102,7 @@ class NfcTagClientImpl : public NfcTagClient, dbus::MessageWriter array_writer(NULL); dbus::MessageWriter dict_entry_writer(NULL); writer.OpenArray("{sv}", &array_writer); - for (DictionaryValue::Iterator iter(attributes); + for (base::DictionaryValue::Iterator iter(attributes); !iter.IsAtEnd(); iter.Advance()) { array_writer.OpenDictEntry(&dict_entry_writer); dict_entry_writer.AppendString(iter.key()); diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h index 33bc847..f0d622f 100644 --- a/chromeos/network/device_state.h +++ b/chromeos/network/device_state.h @@ -47,7 +47,7 @@ class CHROMEOS_EXPORT DeviceState : public ManagedState { const std::string& iccid() const { return iccid_; } const std::string& mdn() const { return mdn_; } const CellularScanResults& scan_results() const { return scan_results_; } - const DictionaryValue& properties() const { return properties_; } + const base::DictionaryValue& properties() const { return properties_; } // Ethernet specific accessors bool eap_authentication_completed() const { @@ -83,7 +83,7 @@ class CHROMEOS_EXPORT DeviceState : public ManagedState { // Keep all Device properties in a dictionary. Devices are limited and should // change rarely if ever, so the overhead for this is small. - DictionaryValue properties_; + base::DictionaryValue properties_; DISALLOW_COPY_AND_ASSIGN(DeviceState); }; diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc index 851914a..a217634 100644 --- a/chromeos/network/network_configuration_handler_unittest.cc +++ b/chromeos/network/network_configuration_handler_unittest.cc @@ -497,7 +497,7 @@ class NetworkConfigurationHandlerStubTest : public testing::Test { base::MessageLoopForUI message_loop_; std::string success_callback_name_; std::string get_properties_path_; - scoped_ptr<DictionaryValue> get_properties_; + scoped_ptr<base::DictionaryValue> get_properties_; std::string create_service_path_; }; diff --git a/chromeos/network/network_device_handler_impl.cc b/chromeos/network/network_device_handler_impl.cc index 206fddf..cf8f036 100644 --- a/chromeos/network/network_device_handler_impl.cc +++ b/chromeos/network/network_device_handler_impl.cc @@ -69,7 +69,7 @@ void RefreshIPConfigsCallback( const network_handler::ErrorCallback& error_callback, const std::string& device_path, const base::DictionaryValue& properties) { - const ListValue* ip_configs; + const base::ListValue* ip_configs; if (!properties.GetListWithoutPathExpansion( shill::kIPConfigsProperty, &ip_configs)) { NET_LOG_ERROR("RequestRefreshIPConfigs Failed", device_path); diff --git a/chromeos/network/network_state_unittest.cc b/chromeos/network/network_state_unittest.cc index 642d77f..a36c66d 100644 --- a/chromeos/network/network_state_unittest.cc +++ b/chromeos/network/network_state_unittest.cc @@ -37,7 +37,7 @@ class TestStringValue : public base::Value { return new TestStringValue(value_); } - virtual bool Equals(const Value* other) const OVERRIDE { + virtual bool Equals(const base::Value* other) const OVERRIDE { if (other->GetType() != GetType()) return false; std::string lhs, rhs; diff --git a/chromeos/network/network_util.cc b/chromeos/network/network_util.cc index 8b1ff44..1acf6e5 100644 --- a/chromeos/network/network_util.cc +++ b/chromeos/network/network_util.cc @@ -93,15 +93,17 @@ int32 NetmaskToPrefixLength(const std::string& netmask) { return prefix_length; } -bool ParseCellularScanResults( - const ListValue& list, std::vector<CellularScanResult>* scan_results) { +bool ParseCellularScanResults(const base::ListValue& list, + std::vector<CellularScanResult>* scan_results) { scan_results->clear(); scan_results->reserve(list.GetSize()); - for (ListValue::const_iterator it = list.begin(); it != list.end(); ++it) { + for (base::ListValue::const_iterator it = list.begin(); + it != list.end(); ++it) { if (!(*it)->IsType(base::Value::TYPE_DICTIONARY)) return false; CellularScanResult scan_result; - const DictionaryValue* dict = static_cast<const DictionaryValue*>(*it); + const base::DictionaryValue* dict = + static_cast<const base::DictionaryValue*>(*it); // If the network id property is not present then this network cannot be // connected to so don't include it in the results. if (!dict->GetStringWithoutPathExpansion(shill::kNetworkIdProperty, diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h index 8a18ab3..7c95238 100644 --- a/chromeos/network/network_util.h +++ b/chromeos/network/network_util.h @@ -77,7 +77,7 @@ CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); // CellularScanResult in |scan_results|. Returns false if parsing fails, // in which case the contents of |scan_results| will be undefined. CHROMEOS_EXPORT bool ParseCellularScanResults( - const ListValue& list, std::vector<CellularScanResult>* scan_results); + const base::ListValue& list, std::vector<CellularScanResult>* scan_results); } // namespace network_util } // namespace chromeos diff --git a/chromeos/network/network_util_unittest.cc b/chromeos/network/network_util_unittest.cc index f668cf3..9ccf8e6 100644 --- a/chromeos/network/network_util_unittest.cc +++ b/chromeos/network/network_util_unittest.cc @@ -104,7 +104,7 @@ TEST_F(NetworkUtilTest, PrefixLengthToNetmask) { } TEST_F(NetworkUtilTest, ParseScanResults) { - ListValue list; + base::ListValue list; std::vector<CellularScanResult> scan_results; // Empty list value. @@ -116,20 +116,20 @@ TEST_F(NetworkUtilTest, ParseScanResults) { // Scan result has no network id. list.Clear(); - DictionaryValue* dict_value = new DictionaryValue(); + base::DictionaryValue* dict_value = new base::DictionaryValue(); dict_value->SetString(shill::kStatusProperty, "available"); list.Append(dict_value); EXPECT_TRUE(ParseCellularScanResults(list, &scan_results)); EXPECT_TRUE(scan_results.empty()); // Mixed parse results. - dict_value = new DictionaryValue(); + dict_value = new base::DictionaryValue(); dict_value->SetString(shill::kNetworkIdProperty, "000001"); dict_value->SetString(shill::kStatusProperty, "unknown"); dict_value->SetString(shill::kTechnologyProperty, "GSM"); list.Append(dict_value); - dict_value = new DictionaryValue(); + dict_value = new base::DictionaryValue(); dict_value->SetString(shill::kNetworkIdProperty, "000002"); dict_value->SetString(shill::kStatusProperty, "available"); dict_value->SetString(shill::kLongNameProperty, "Long Name"); diff --git a/chromeos/network/onc/onc_signature.cc b/chromeos/network/onc/onc_signature.cc index b0e9656..44edc31 100644 --- a/chromeos/network/onc/onc_signature.cc +++ b/chromeos/network/onc/onc_signature.cc @@ -14,25 +14,25 @@ namespace onc { namespace { const OncValueSignature kBoolSignature = { - Value::TYPE_BOOLEAN, NULL + base::Value::TYPE_BOOLEAN, NULL }; const OncValueSignature kStringSignature = { - Value::TYPE_STRING, NULL + base::Value::TYPE_STRING, NULL }; const OncValueSignature kIntegerSignature = { - Value::TYPE_INTEGER, NULL + base::Value::TYPE_INTEGER, NULL }; const OncValueSignature kStringListSignature = { - Value::TYPE_LIST, NULL, &kStringSignature + base::Value::TYPE_LIST, NULL, &kStringSignature }; const OncValueSignature kIntegerListSignature = { - Value::TYPE_LIST, NULL, &kIntegerSignature + base::Value::TYPE_LIST, NULL, &kIntegerSignature }; const OncValueSignature kIPConfigListSignature = { - Value::TYPE_LIST, NULL, &kIPConfigSignature + base::Value::TYPE_LIST, NULL, &kIPConfigSignature }; const OncValueSignature kCellularApnListSignature = { - Value::TYPE_LIST, NULL, &kCellularApnSignature + base::Value::TYPE_LIST, NULL, &kCellularApnSignature }; const OncFieldSignature issuer_subject_pattern_fields[] = { @@ -310,88 +310,89 @@ const OncFieldSignature toplevel_configuration_fields[] = { } // namespace const OncValueSignature kRecommendedSignature = { - Value::TYPE_LIST, NULL, &kStringSignature + base::Value::TYPE_LIST, NULL, &kStringSignature }; const OncValueSignature kEAPSignature = { - Value::TYPE_DICTIONARY, eap_fields, NULL + base::Value::TYPE_DICTIONARY, eap_fields, NULL }; const OncValueSignature kIssuerSubjectPatternSignature = { - Value::TYPE_DICTIONARY, issuer_subject_pattern_fields, NULL + base::Value::TYPE_DICTIONARY, issuer_subject_pattern_fields, NULL }; const OncValueSignature kCertificatePatternSignature = { - Value::TYPE_DICTIONARY, certificate_pattern_fields, NULL + base::Value::TYPE_DICTIONARY, certificate_pattern_fields, NULL }; const OncValueSignature kIPsecSignature = { - Value::TYPE_DICTIONARY, ipsec_fields, NULL + base::Value::TYPE_DICTIONARY, ipsec_fields, NULL }; const OncValueSignature kL2TPSignature = { - Value::TYPE_DICTIONARY, l2tp_fields, NULL + base::Value::TYPE_DICTIONARY, l2tp_fields, NULL }; const OncValueSignature kOpenVPNSignature = { - Value::TYPE_DICTIONARY, openvpn_fields, NULL + base::Value::TYPE_DICTIONARY, openvpn_fields, NULL }; const OncValueSignature kVerifyX509Signature = { - Value::TYPE_DICTIONARY, verify_x509_fields, NULL + base::Value::TYPE_DICTIONARY, verify_x509_fields, NULL }; const OncValueSignature kVPNSignature = { - Value::TYPE_DICTIONARY, vpn_fields, NULL + base::Value::TYPE_DICTIONARY, vpn_fields, NULL }; const OncValueSignature kEthernetSignature = { - Value::TYPE_DICTIONARY, ethernet_fields, NULL + base::Value::TYPE_DICTIONARY, ethernet_fields, NULL }; const OncValueSignature kIPConfigSignature = { - Value::TYPE_DICTIONARY, ipconfig_fields, NULL + base::Value::TYPE_DICTIONARY, ipconfig_fields, NULL }; const OncValueSignature kProxyLocationSignature = { - Value::TYPE_DICTIONARY, proxy_location_fields, NULL + base::Value::TYPE_DICTIONARY, proxy_location_fields, NULL }; const OncValueSignature kProxyManualSignature = { - Value::TYPE_DICTIONARY, proxy_manual_fields, NULL + base::Value::TYPE_DICTIONARY, proxy_manual_fields, NULL }; const OncValueSignature kProxySettingsSignature = { - Value::TYPE_DICTIONARY, proxy_settings_fields, NULL + base::Value::TYPE_DICTIONARY, proxy_settings_fields, NULL }; const OncValueSignature kWiFiSignature = { - Value::TYPE_DICTIONARY, wifi_fields, NULL + base::Value::TYPE_DICTIONARY, wifi_fields, NULL }; const OncValueSignature kCertificateSignature = { - Value::TYPE_DICTIONARY, certificate_fields, NULL + base::Value::TYPE_DICTIONARY, certificate_fields, NULL }; const OncValueSignature kNetworkConfigurationSignature = { - Value::TYPE_DICTIONARY, network_configuration_fields, NULL + base::Value::TYPE_DICTIONARY, network_configuration_fields, NULL }; const OncValueSignature kGlobalNetworkConfigurationSignature = { - Value::TYPE_DICTIONARY, global_network_configuration_fields, NULL + base::Value::TYPE_DICTIONARY, global_network_configuration_fields, NULL }; const OncValueSignature kCertificateListSignature = { - Value::TYPE_LIST, NULL, &kCertificateSignature + base::Value::TYPE_LIST, NULL, &kCertificateSignature }; const OncValueSignature kNetworkConfigurationListSignature = { - Value::TYPE_LIST, NULL, &kNetworkConfigurationSignature + base::Value::TYPE_LIST, NULL, &kNetworkConfigurationSignature }; const OncValueSignature kToplevelConfigurationSignature = { - Value::TYPE_DICTIONARY, toplevel_configuration_fields, NULL + base::Value::TYPE_DICTIONARY, toplevel_configuration_fields, NULL }; // Derived "ONC with State" signatures. const OncValueSignature kNetworkWithStateSignature = { - Value::TYPE_DICTIONARY, network_with_state_fields, NULL, + base::Value::TYPE_DICTIONARY, network_with_state_fields, NULL, &kNetworkConfigurationSignature }; const OncValueSignature kWiFiWithStateSignature = { - Value::TYPE_DICTIONARY, wifi_with_state_fields, NULL, &kWiFiSignature + base::Value::TYPE_DICTIONARY, wifi_with_state_fields, NULL, &kWiFiSignature }; const OncValueSignature kCellularSignature = { - Value::TYPE_DICTIONARY, cellular_fields, NULL + base::Value::TYPE_DICTIONARY, cellular_fields, NULL }; const OncValueSignature kCellularWithStateSignature = { - Value::TYPE_DICTIONARY, cellular_with_state_fields, NULL, &kCellularSignature + base::Value::TYPE_DICTIONARY, cellular_with_state_fields, NULL, + &kCellularSignature }; const OncValueSignature kCellularProviderSignature = { - Value::TYPE_DICTIONARY, cellular_provider_fields, NULL + base::Value::TYPE_DICTIONARY, cellular_provider_fields, NULL }; const OncValueSignature kCellularApnSignature = { - Value::TYPE_DICTIONARY, cellular_apn_fields, NULL + base::Value::TYPE_DICTIONARY, cellular_apn_fields, NULL }; const OncFieldSignature* GetFieldSignature(const OncValueSignature& signature, diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc index 1c1c2e8..e52e731 100644 --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc @@ -316,7 +316,7 @@ void ShillToONCTranslator::TranslateAndAddListOfObjects( const base::ListValue& list) { const OncFieldSignature* field_signature = GetFieldSignature(*onc_signature_, onc_field_name); - if (field_signature->value_signature->onc_type != Value::TYPE_LIST) { + if (field_signature->value_signature->onc_type != base::Value::TYPE_LIST) { LOG(ERROR) << "ONC Field name: '" << onc_field_name << "' has type '" << field_signature->value_signature->onc_type << "', expected: base::Value::TYPE_LIST."; diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc index 80bf21e..7ece2f6 100644 --- a/chromeos/network/shill_property_handler.cc +++ b/chromeos/network/shill_property_handler.cc @@ -299,7 +299,7 @@ void ShillPropertyHandler::ManagerPropertyChanged(const std::string& key, UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist); } } else if (key == shill::kServiceCompleteListProperty) { - const ListValue* vlist = GetListValue(key, value); + const base::ListValue* vlist = GetListValue(key, value); if (vlist) { listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_FAVORITE, *vlist); UpdateProperties(ManagedState::MANAGED_TYPE_FAVORITE, *vlist); diff --git a/cloud_print/gcp20/prototype/cloud_print_requester.cc b/cloud_print/gcp20/prototype/cloud_print_requester.cc index ade85efc..d46fdf4 100644 --- a/cloud_print/gcp20/prototype/cloud_print_requester.cc +++ b/cloud_print/gcp20/prototype/cloud_print_requester.cc @@ -78,7 +78,7 @@ GURL CreateUpdateUrl(const std::string& device_id) { std::string LocalSettingsToJson(const LocalSettings& settings) { base::DictionaryValue dictionary; - scoped_ptr<base::DictionaryValue> current(new DictionaryValue); + scoped_ptr<base::DictionaryValue> current(new base::DictionaryValue); // TODO(maksymb): Formalize text as constants. current->SetBoolean("local_discovery", settings.local_discovery); diff --git a/cloud_print/gcp20/prototype/privet_http_server.cc b/cloud_print/gcp20/prototype/privet_http_server.cc index d589657..9aa2835 100644 --- a/cloud_print/gcp20/prototype/privet_http_server.cc +++ b/cloud_print/gcp20/prototype/privet_http_server.cc @@ -302,7 +302,7 @@ scoped_ptr<base::DictionaryValue> PrivetHttpServer::ProcessCreateJob( *status_code = net::HTTP_OK; switch (result) { case LocalPrintJob::CREATE_SUCCESS: - response.reset(new DictionaryValue); + response.reset(new base::DictionaryValue); response->SetString("job_id", job_id); response->SetInteger("expires_in", expires_in); return response.Pass(); @@ -354,7 +354,7 @@ scoped_ptr<base::DictionaryValue> PrivetHttpServer::ProcessSubmitDoc( // Create response *status_code = net::HTTP_OK; - scoped_ptr<base::DictionaryValue> response(new DictionaryValue); + scoped_ptr<base::DictionaryValue> response(new base::DictionaryValue); switch (status) { case LocalPrintJob::SAVE_SUCCESS: response->SetString("job_id", job_id); @@ -422,7 +422,7 @@ scoped_ptr<base::DictionaryValue> PrivetHttpServer::ProcessRegister( !user.empty(); RegistrationErrorStatus status = REG_ERROR_INVALID_PARAMS; - scoped_ptr<base::DictionaryValue> response(new DictionaryValue); + scoped_ptr<base::DictionaryValue> response(new base::DictionaryValue); if (params_present) { response->SetString("action", action); diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc index 1937ba2..01d315b 100644 --- a/cloud_print/service/service_state.cc +++ b/cloud_print/service/service_state.cc @@ -135,9 +135,9 @@ bool ServiceState::IsValid() const { } std::string ServiceState::ToString() { - scoped_ptr<base::DictionaryValue> services(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> services(new base::DictionaryValue()); - scoped_ptr<base::DictionaryValue> cloud_print(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> cloud_print(new base::DictionaryValue()); cloud_print->SetBoolean(kEnabledOptionName, true); SetNotEmptyJsonString(cloud_print.get(), kEmailOptionName, email_); 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; diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc index 8c625a3..8ec3ecf 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_android.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc @@ -68,7 +68,7 @@ void AccessibilityTreeFormatter::Initialize() { } void AccessibilityTreeFormatter::AddProperties( - const BrowserAccessibility& node, DictionaryValue* dict) { + const BrowserAccessibility& node, base::DictionaryValue* dict) { const BrowserAccessibilityAndroid* android_node = static_cast<const BrowserAccessibilityAndroid*>(&node); @@ -116,7 +116,7 @@ void AccessibilityTreeFormatter::AddProperties( } base::string16 AccessibilityTreeFormatter::ToString( - const DictionaryValue& dict, + const base::DictionaryValue& dict, const base::string16& indent) { base::string16 line; diff --git a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc index 0dc21ce..c930e0d 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc @@ -27,7 +27,7 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->SetString("description", atk_object_get_description(atk_object)); AtkStateSet* state_set = atk_object_ref_state_set(atk_object); - ListValue* states = new base::ListValue; + base::ListValue* states = new base::ListValue; for (int i = ATK_STATE_INVALID; i < ATK_STATE_LAST_DEFINED; i++) { AtkStateType state_type = static_cast<AtkStateType>(i); if (atk_state_set_contains_state(state_set, state_type)) diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc index d8307fb..5096aef 100644 --- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc +++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc @@ -275,7 +275,7 @@ class BrowserPluginHostTest : public ContentBrowserTest { bool IsAttributeNull(RenderViewHost* rvh, const std::string& attribute) { scoped_ptr<base::Value> value = content::ExecuteScriptAndGetValue(rvh, "document.getElementById('plugin').getAttribute('" + attribute + "');"); - return value->GetType() == Value::TYPE_NULL; + return value->GetType() == base::Value::TYPE_NULL; } // Removes all attributes in the comma-delimited string |attributes|. diff --git a/content/browser/devtools/devtools_protocol.cc b/content/browser/devtools/devtools_protocol.cc index e0e544e..f3c393d 100644 --- a/content/browser/devtools/devtools_protocol.cc +++ b/content/browser/devtools/devtools_protocol.cc @@ -275,11 +275,11 @@ base::DictionaryValue* DevToolsProtocol::ParseMessage( std::string* error_response) { int parse_error_code; std::string error_message; - scoped_ptr<Value> message( + scoped_ptr<base::Value> message( base::JSONReader::ReadAndReturnError( json, 0, &parse_error_code, &error_message)); - if (!message || !message->IsType(Value::TYPE_DICTIONARY)) { + if (!message || !message->IsType(base::Value::TYPE_DICTIONARY)) { scoped_refptr<Response> response = new Response(0, kErrorParseError, error_message); if (error_response) diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc index e9f6cf1..5b0d68c 100644 --- a/content/browser/devtools/devtools_tracing_handler.cc +++ b/content/browser/devtools/devtools_tracing_handler.cc @@ -69,10 +69,10 @@ void DevToolsTracingHandler::ReadRecordingResult( if (trace_data->data().size()) { scoped_ptr<base::Value> trace_value(base::JSONReader::Read( trace_data->data())); - DictionaryValue* dictionary = NULL; + base::DictionaryValue* dictionary = NULL; bool ok = trace_value->GetAsDictionary(&dictionary); DCHECK(ok); - ListValue* list = NULL; + base::ListValue* list = NULL; ok = dictionary->GetList("traceEvents", &list); DCHECK(ok); std::string buffer; diff --git a/content/browser/devtools/renderer_overrides_handler.cc b/content/browser/devtools/renderer_overrides_handler.cc index 4901f34..f8d0211 100644 --- a/content/browser/devtools/renderer_overrides_handler.cc +++ b/content/browser/devtools/renderer_overrides_handler.cc @@ -367,7 +367,7 @@ RendererOverridesHandler::PageGetNavigationHistory( result->SetInteger( devtools::Page::getNavigationHistory::kResponseCurrentIndex, controller.GetCurrentEntryIndex()); - ListValue* entries = new ListValue(); + base::ListValue* entries = new base::ListValue(); for (int i = 0; i != controller.GetEntryCount(); ++i) { const NavigationEntry* entry = controller.GetEntryAtIndex(i); base::DictionaryValue* entry_value = new base::DictionaryValue(); diff --git a/content/browser/devtools/renderer_overrides_handler_browsertest.cc b/content/browser/devtools/renderer_overrides_handler_browsertest.cc index 24dd962..3759fc0 100644 --- a/content/browser/devtools/renderer_overrides_handler_browsertest.cc +++ b/content/browser/devtools/renderer_overrides_handler_browsertest.cc @@ -18,14 +18,15 @@ class RendererOverridesHandlerTest : public ContentBrowserTest { protected: scoped_refptr<DevToolsProtocol::Response> SendCommand( const std::string& method, - DictionaryValue* params) { + base::DictionaryValue* params) { scoped_ptr<RendererOverridesHandler> handler(CreateHandler()); scoped_refptr<DevToolsProtocol::Command> command( DevToolsProtocol::CreateCommand(1, method, params)); return handler->HandleCommand(command); } - void SendAsyncCommand(const std::string& method, DictionaryValue* params) { + void SendAsyncCommand(const std::string& method, + base::DictionaryValue* params) { scoped_ptr<RendererOverridesHandler> handler(CreateHandler()); scoped_refptr<DevToolsProtocol::Command> command( DevToolsProtocol::CreateCommand(1, method, params)); @@ -84,7 +85,7 @@ class RendererOverridesHandlerTest : public ContentBrowserTest { }; IN_PROC_BROWSER_TEST_F(RendererOverridesHandlerTest, QueryUsageAndQuota) { - DictionaryValue* params = new DictionaryValue(); + base::DictionaryValue* params = new base::DictionaryValue(); params->SetString("securityOrigin", "http://example.com"); SendAsyncCommand("Page.queryUsageAndQuota", params); diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc index 5ff4373..d58b6ff 100644 --- a/content/browser/gpu/gpu_internals_ui.cc +++ b/content/browser/gpu/gpu_internals_ui.cc @@ -334,7 +334,7 @@ void GpuMessageHandler::OnGpuInfoUpdate() { scoped_ptr<base::DictionaryValue> gpu_info_val(GpuInfoAsDictionaryValue()); // Add in blacklisting features - base::DictionaryValue* feature_status = new DictionaryValue; + base::DictionaryValue* feature_status = new base::DictionaryValue; feature_status->Set("featureStatus", GetFeatureStatus()); feature_status->Set("problems", GetProblems()); feature_status->Set("workarounds", GetDriverBugWorkarounds()); diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc index 69dfa27..daa4174 100644 --- a/content/browser/indexed_db/indexed_db_context_impl.cc +++ b/content/browser/indexed_db/indexed_db_context_impl.cc @@ -162,19 +162,19 @@ static bool HostNameComparator(const GURL& i, const GURL& j) { return i.host() < j.host(); } -ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { +base::ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); std::vector<GURL> origins = GetAllOrigins(); std::sort(origins.begin(), origins.end(), HostNameComparator); - scoped_ptr<ListValue> list(new ListValue()); + scoped_ptr<base::ListValue> list(new base::ListValue()); for (std::vector<GURL>::const_iterator iter = origins.begin(); iter != origins.end(); ++iter) { const GURL& origin_url = *iter; - scoped_ptr<DictionaryValue> info(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> info(new base::DictionaryValue()); info->SetString("url", origin_url.spec()); info->SetString("size", ui::FormatBytes(GetOriginDiskUsage(origin_url))); info->SetDouble("last_modified", @@ -190,14 +190,14 @@ ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { std::vector<IndexedDBDatabase*> databases = factory_->GetOpenDatabasesForOrigin(origin_url); // TODO(jsbell): Sort by name? - scoped_ptr<ListValue> database_list(new ListValue()); + scoped_ptr<base::ListValue> database_list(new base::ListValue()); for (std::vector<IndexedDBDatabase*>::iterator it = databases.begin(); it != databases.end(); ++it) { const IndexedDBDatabase* db = *it; - scoped_ptr<DictionaryValue> db_info(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> db_info(new base::DictionaryValue()); db_info->SetString("name", db->name()); db_info->SetDouble("pending_opens", db->PendingOpenCount()); @@ -208,7 +208,7 @@ ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { db->ConnectionCount() - db->PendingUpgradeCount() - db->RunningUpgradeCount()); - scoped_ptr<ListValue> transaction_list(new ListValue()); + scoped_ptr<base::ListValue> transaction_list(new base::ListValue()); std::vector<const IndexedDBTransaction*> transactions = db->transaction_coordinator().GetTransactions(); for (std::vector<const IndexedDBTransaction*>::iterator trans_it = @@ -217,7 +217,8 @@ ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { ++trans_it) { const IndexedDBTransaction* transaction = *trans_it; - scoped_ptr<DictionaryValue> transaction_info(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> transaction_info( + new base::DictionaryValue()); const char* kModes[] = { "readonly", "readwrite", "versionchange" }; transaction_info->SetString("mode", kModes[transaction->mode()]); @@ -257,7 +258,7 @@ ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { transaction_info->SetDouble( "tasks_completed", transaction->diagnostics().tasks_completed); - scoped_ptr<ListValue> scope(new ListValue()); + scoped_ptr<base::ListValue> scope(new base::ListValue()); for (std::set<int64>::const_iterator scope_it = transaction->scope().begin(); scope_it != transaction->scope().end(); diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc index b5e888f..2b60c55 100644 --- a/content/browser/indexed_db/indexed_db_internals_ui.cc +++ b/content/browser/indexed_db/indexed_db_internals_ui.cc @@ -87,7 +87,7 @@ void IndexedDBInternalsUI::GetAllOriginsOnIndexedDBThread( const base::FilePath& context_path) { DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread()); - scoped_ptr<ListValue> info_list(static_cast<IndexedDBContextImpl*>( + scoped_ptr<base::ListValue> info_list(static_cast<IndexedDBContextImpl*>( context.get())->GetAllOriginsDetails()); BrowserThread::PostTask(BrowserThread::UI, @@ -98,7 +98,7 @@ void IndexedDBInternalsUI::GetAllOriginsOnIndexedDBThread( context_path)); } -void IndexedDBInternalsUI::OnOriginsReady(scoped_ptr<ListValue> origins, +void IndexedDBInternalsUI::OnOriginsReady(scoped_ptr<base::ListValue> origins, const base::FilePath& path) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); web_ui()->CallJavascriptFunction( diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc index 10504b3..5e3666c 100644 --- a/content/browser/media/webrtc_browsertest.cc +++ b/content/browser/media/webrtc_browsertest.cc @@ -134,8 +134,9 @@ class WebrtcBrowserTest: public ContentBrowserTest { double timestamp_ns = 0.0; double previous_timestamp_ns = 0.0; std::string samples_interarrival_ns; - for (ListValue::iterator it = values->begin(); it != values->end(); ++it) { - const DictionaryValue* dict; + for (base::ListValue::iterator it = values->begin(); + it != values->end(); ++it) { + const base::DictionaryValue* dict; EXPECT_TRUE((*it)->GetAsDictionary(&dict)); if (dict->GetInteger("dur", &duration_ns)) @@ -187,8 +188,9 @@ class WebrtcBrowserTest: public ContentBrowserTest { base::ListValue* values; ASSERT_TRUE(value->GetAsList(&values)); - for (ListValue::iterator it = values->begin(); it != values->end(); ++it) { - const DictionaryValue* dict; + for (base::ListValue::iterator it = values->begin(); + it != values->end(); ++it) { + const base::DictionaryValue* dict; std::string kind; std::string id; ASSERT_TRUE((*it)->GetAsDictionary(&dict)); diff --git a/content/browser/webui/generic_handler.cc b/content/browser/webui/generic_handler.cc index 56b9e07..058382f 100644 --- a/content/browser/webui/generic_handler.cc +++ b/content/browser/webui/generic_handler.cc @@ -25,7 +25,7 @@ void GenericHandler::RegisterMessages() { base::Bind(&GenericHandler::HandleNavigateToUrl, base::Unretained(this))); } -void GenericHandler::HandleNavigateToUrl(const ListValue* args) { +void GenericHandler::HandleNavigateToUrl(const base::ListValue* args) { std::string url_string; std::string target_string; double button; diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc index 4774e4f..73c4ebd 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -29,7 +29,7 @@ const WebUI::TypeID WebUI::kNoWebUI = NULL; // static base::string16 WebUI::GetJavascriptCall( const std::string& function_name, - const std::vector<const Value*>& arg_list) { + const std::vector<const base::Value*>& arg_list) { base::string16 parameters; std::string json; for (size_t i = 0; i < arg_list.size(); ++i) { @@ -69,7 +69,7 @@ bool WebUIImpl::OnMessageReceived(const IPC::Message& message) { void WebUIImpl::OnWebUISend(const GURL& source_url, const std::string& message, - const ListValue& args) { + const base::ListValue& args) { WebContentsDelegate* delegate = web_contents_->GetDelegate(); bool data_urls_allowed = delegate && delegate->CanLoadDataURLsInWebUI(); if (!ChildProcessSecurityPolicyImpl::GetInstance()-> @@ -149,18 +149,18 @@ void WebUIImpl::CallJavascriptFunction(const std::string& function_name) { } void WebUIImpl::CallJavascriptFunction(const std::string& function_name, - const Value& arg) { + const base::Value& arg) { DCHECK(IsStringASCII(function_name)); - std::vector<const Value*> args; + std::vector<const base::Value*> args; args.push_back(&arg); ExecuteJavascript(GetJavascriptCall(function_name, args)); } void WebUIImpl::CallJavascriptFunction( const std::string& function_name, - const Value& arg1, const Value& arg2) { + const base::Value& arg1, const base::Value& arg2) { DCHECK(IsStringASCII(function_name)); - std::vector<const Value*> args; + std::vector<const base::Value*> args; args.push_back(&arg1); args.push_back(&arg2); ExecuteJavascript(GetJavascriptCall(function_name, args)); @@ -168,9 +168,9 @@ void WebUIImpl::CallJavascriptFunction( void WebUIImpl::CallJavascriptFunction( const std::string& function_name, - const Value& arg1, const Value& arg2, const Value& arg3) { + const base::Value& arg1, const base::Value& arg2, const base::Value& arg3) { DCHECK(IsStringASCII(function_name)); - std::vector<const Value*> args; + std::vector<const base::Value*> args; args.push_back(&arg1); args.push_back(&arg2); args.push_back(&arg3); @@ -179,12 +179,12 @@ void WebUIImpl::CallJavascriptFunction( void WebUIImpl::CallJavascriptFunction( const std::string& function_name, - const Value& arg1, - const Value& arg2, - const Value& arg3, - const Value& arg4) { + const base::Value& arg1, + const base::Value& arg2, + const base::Value& arg3, + const base::Value& arg4) { DCHECK(IsStringASCII(function_name)); - std::vector<const Value*> args; + std::vector<const base::Value*> args; args.push_back(&arg1); args.push_back(&arg2); args.push_back(&arg3); @@ -194,7 +194,7 @@ void WebUIImpl::CallJavascriptFunction( void WebUIImpl::CallJavascriptFunction( const std::string& function_name, - const std::vector<const Value*>& args) { + const std::vector<const base::Value*>& args) { DCHECK(IsStringASCII(function_name)); ExecuteJavascript(GetJavascriptCall(function_name, args)); } diff --git a/content/browser/webui/web_ui_message_handler.cc b/content/browser/webui/web_ui_message_handler.cc index 57b2c46..44f065d 100644 --- a/content/browser/webui/web_ui_message_handler.cc +++ b/content/browser/webui/web_ui_message_handler.cc @@ -11,7 +11,7 @@ namespace content { -bool WebUIMessageHandler::ExtractIntegerValue(const ListValue* value, +bool WebUIMessageHandler::ExtractIntegerValue(const base::ListValue* value, int* out_int) { std::string string_value; if (value->GetString(0, &string_value)) @@ -25,7 +25,7 @@ bool WebUIMessageHandler::ExtractIntegerValue(const ListValue* value, return false; } -bool WebUIMessageHandler::ExtractDoubleValue(const ListValue* value, +bool WebUIMessageHandler::ExtractDoubleValue(const base::ListValue* value, double* out_value) { std::string string_value; if (value->GetString(0, &string_value)) @@ -36,7 +36,8 @@ bool WebUIMessageHandler::ExtractDoubleValue(const ListValue* value, return false; } -base::string16 WebUIMessageHandler::ExtractStringValue(const ListValue* value) { +base::string16 WebUIMessageHandler::ExtractStringValue( + const base::ListValue* value) { base::string16 string16_value; if (value->GetString(0, &string16_value)) return string16_value; diff --git a/content/browser/webui/web_ui_message_handler_unittest.cc b/content/browser/webui/web_ui_message_handler_unittest.cc index 33cdb61..fe09a7b 100644 --- a/content/browser/webui/web_ui_message_handler_unittest.cc +++ b/content/browser/webui/web_ui_message_handler_unittest.cc @@ -12,7 +12,7 @@ namespace content { TEST(WebUIMessageHandlerTest, ExtractIntegerValue) { - ListValue list; + base::ListValue list; int value, zero_value = 0, neg_value = -1234, pos_value = 1234; base::string16 zero_string(UTF8ToUTF16("0")); base::string16 neg_string(UTF8ToUTF16("-1234")); diff --git a/content/common/font_list_android.cc b/content/common/font_list_android.cc index b0a542d..71ff8b6 100644 --- a/content/common/font_list_android.cc +++ b/content/common/font_list_android.cc @@ -8,8 +8,8 @@ namespace content { -scoped_ptr<ListValue> GetFontList_SlowBlocking() { - return scoped_ptr<ListValue>(new ListValue); +scoped_ptr<base::ListValue> GetFontList_SlowBlocking() { + return scoped_ptr<base::ListValue>(new base::ListValue); } } // namespace content diff --git a/content/common/font_list_ozone.cc b/content/common/font_list_ozone.cc index b0a542d..71ff8b6 100644 --- a/content/common/font_list_ozone.cc +++ b/content/common/font_list_ozone.cc @@ -8,8 +8,8 @@ namespace content { -scoped_ptr<ListValue> GetFontList_SlowBlocking() { - return scoped_ptr<ListValue>(new ListValue); +scoped_ptr<base::ListValue> GetFontList_SlowBlocking() { + return scoped_ptr<base::ListValue>(new base::ListValue); } } // namespace content diff --git a/content/common/gpu/client/gl_helper_unittests.cc b/content/common/gpu/client/gl_helper_unittests.cc index 548faec..2ec61ac 100644 --- a/content/common/gpu/client/gl_helper_unittests.cc +++ b/content/common/gpu/client/gl_helper_unittests.cc @@ -113,8 +113,8 @@ class GLHelperTest : public testing::Test { run_loop.Run(); json_data.append("]"); - scoped_ptr<Value> trace_data(base::JSONReader::Read(json_data)); - ListValue* list; + scoped_ptr<base::Value> trace_data(base::JSONReader::Read(json_data)); + base::ListValue* list; CHECK(trace_data->GetAsList(&list)); for (size_t i = 0; i < list->GetSize(); i++) { base::Value *item = NULL; diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 5a87327..29252b3 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc @@ -82,7 +82,7 @@ class DOMOperationObserver : public NotificationObserver, bool ExecuteScriptHelper(RenderViewHost* render_view_host, const std::string& frame_xpath, const std::string& original_script, - scoped_ptr<Value>* result) WARN_UNUSED_RESULT; + scoped_ptr<base::Value>* result) WARN_UNUSED_RESULT; // Executes the passed |original_script| in the frame pointed to by // |frame_xpath|. If |result| is not NULL, stores the value that the evaluation @@ -90,7 +90,7 @@ bool ExecuteScriptHelper(RenderViewHost* render_view_host, bool ExecuteScriptHelper(RenderViewHost* render_view_host, const std::string& frame_xpath, const std::string& original_script, - scoped_ptr<Value>* result) { + scoped_ptr<base::Value>* result) { // TODO(jcampan): we should make the domAutomationController not require an // automation id. std::string script = @@ -415,7 +415,7 @@ bool ExecuteScriptInFrameAndExtractInt( const std::string& script, int* result) { DCHECK(result); - scoped_ptr<Value> value; + scoped_ptr<base::Value> value; if (!ExecuteScriptHelper(adapter.render_view_host(), frame_xpath, script, &value) || !value.get()) return false; @@ -429,7 +429,7 @@ bool ExecuteScriptInFrameAndExtractBool( const std::string& script, bool* result) { DCHECK(result); - scoped_ptr<Value> value; + scoped_ptr<base::Value> value; if (!ExecuteScriptHelper(adapter.render_view_host(), frame_xpath, script, &value) || !value.get()) return false; @@ -443,7 +443,7 @@ bool ExecuteScriptInFrameAndExtractString( const std::string& script, std::string* result) { DCHECK(result); - scoped_ptr<Value> value; + scoped_ptr<base::Value> value; if (!ExecuteScriptHelper(adapter.render_view_host(), frame_xpath, script, &value) || !value.get()) return false; diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.cc b/content/renderer/browser_plugin/browser_plugin_bindings.cc index 2e0ab77..509ace2 100644 --- a/content/renderer/browser_plugin/browser_plugin_bindings.cc +++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc @@ -249,7 +249,7 @@ class BrowserPluginBindingAttach: public BrowserPluginMethodBinding { if (!value) return false; - if (!value->IsType(Value::TYPE_DICTIONARY)) + if (!value->IsType(base::Value::TYPE_DICTIONARY)) return false; scoped_ptr<base::DictionaryValue> extra_params( diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc index b594ff8..b55191c 100644 --- a/content/renderer/media/peer_connection_tracker.cc +++ b/content/renderer/media/peer_connection_tracker.cc @@ -160,7 +160,7 @@ static base::DictionaryValue* GetDictValueStats( if (report.values.empty()) return NULL; - DictionaryValue* dict = new base::DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetDouble("timestamp", report.timestamp); base::ListValue* values = new base::ListValue(); diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc index 6028d5d..d5f3883 100644 --- a/content/renderer/v8_value_converter_impl.cc +++ b/content/renderer/v8_value_converter_impl.cc @@ -321,7 +321,7 @@ base::Value* V8ValueConverterImpl::FromV8Array( scope.reset(new v8::Context::Scope(val->CreationContext())); if (strategy_) { - Value* out = NULL; + base::Value* out = NULL; if (strategy_->FromV8Array(val, &out, isolate)) return out; } @@ -391,7 +391,7 @@ base::Value* V8ValueConverterImpl::FromV8Object( scope.reset(new v8::Context::Scope(val->CreationContext())); if (strategy_) { - Value* out = NULL; + base::Value* out = NULL; if (strategy_->FromV8Object(val, &out, isolate)) return out; } diff --git a/content/renderer/v8_value_converter_impl_unittest.cc b/content/renderer/v8_value_converter_impl_unittest.cc index 392dd0b..9853e51 100644 --- a/content/renderer/v8_value_converter_impl_unittest.cc +++ b/content/renderer/v8_value_converter_impl_unittest.cc @@ -578,7 +578,7 @@ TEST_F(V8ValueConverterImplTest, UndefinedValueBehavior) { base::test::ParseJson("{ \"bar\": null }").get(), actual_object.get())); // Everything is null because JSON stringification preserves array length. - scoped_ptr<Value> actual_array(converter.FromV8Value(array, context)); + scoped_ptr<base::Value> actual_array(converter.FromV8Value(array, context)); EXPECT_TRUE(base::Value::Equals( base::test::ParseJson("[ null, null, null ]").get(), actual_array.get())); } @@ -691,7 +691,7 @@ TEST_F(V8ValueConverterImplTest, MaxRecursionDepth) { // The leaf node shouldn't have any properties. base::DictionaryValue empty; - EXPECT_TRUE(Value::Equals(&empty, current)) << *current; + EXPECT_TRUE(base::Value::Equals(&empty, current)) << *current; } } // namespace content diff --git a/content/renderer/web_ui_extension.cc b/content/renderer/web_ui_extension.cc index f887e9d..b49241e 100644 --- a/content/renderer/web_ui_extension.cc +++ b/content/renderer/web_ui_extension.cc @@ -120,9 +120,9 @@ void WebUIExtensionWrapper::Send( // If they've provided an optional message parameter, convert that into a // Value to send to the browser process. - scoped_ptr<ListValue> content; + scoped_ptr<base::ListValue> content; if (args[1]->IsUndefined()) { - content.reset(new ListValue()); + content.reset(new base::ListValue()); } else { if (!args[1]->IsObject()) return; diff --git a/content/shell/browser/shell_net_log.cc b/content/shell/browser/shell_net_log.cc index 97276d6..42a9a4b 100644 --- a/content/shell/browser/shell_net_log.cc +++ b/content/shell/browser/shell_net_log.cc @@ -20,7 +20,7 @@ base::DictionaryValue* GetShellConstants() { base::DictionaryValue* constants_dict = net::NetLogLogger::GetConstants(); // Add a dictionary with client information - base::DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("name", "content_shell"); dict->SetString("command_line", |