diff options
61 files changed, 245 insertions, 221 deletions
diff --git a/chrome/browser/web_resource/json_asynchronous_unpacker.cc b/chrome/browser/web_resource/json_asynchronous_unpacker.cc index 9135cc5..b9b6fa5 100644 --- a/chrome/browser/web_resource/json_asynchronous_unpacker.cc +++ b/chrome/browser/web_resource/json_asynchronous_unpacker.cc @@ -66,7 +66,7 @@ class JSONAsynchronousUnpackerImpl } void OnUnpackWebResourceSucceeded( - const DictionaryValue& parsed_json) { + const base::DictionaryValue& parsed_json) { if (delegate_) delegate_->OnUnpackFinished(parsed_json); Cleanup(); diff --git a/chrome/browser/web_resource/json_asynchronous_unpacker.h b/chrome/browser/web_resource/json_asynchronous_unpacker.h index 4a58047..9ae22189 100644 --- a/chrome/browser/web_resource/json_asynchronous_unpacker.h +++ b/chrome/browser/web_resource/json_asynchronous_unpacker.h @@ -16,7 +16,7 @@ class JSONAsynchronousUnpackerDelegate { // This will be called when the response is parsed properly. |parsed_json| // contains the decoded information. - virtual void OnUnpackFinished(const DictionaryValue& parsed_json) = 0; + virtual void OnUnpackFinished(const base::DictionaryValue& parsed_json) = 0; // This will be called if there is an error while parsing the data. virtual void OnUnpackError(const std::string& error_message) = 0; diff --git a/chrome/browser/web_resource/notification_promo.cc b/chrome/browser/web_resource/notification_promo.cc index a474b7a..6ebfe0c 100644 --- a/chrome/browser/web_resource/notification_promo.cc +++ b/chrome/browser/web_resource/notification_promo.cc @@ -147,7 +147,7 @@ base::Value* DeepCopyAndResolveStrings( return copy; } - case Value::TYPE_DICTIONARY: { + case base::Value::TYPE_DICTIONARY: { const base::DictionaryValue* dict = static_cast<const base::DictionaryValue*>(node); base::DictionaryValue* copy = new base::DictionaryValue; @@ -161,7 +161,7 @@ base::Value* DeepCopyAndResolveStrings( return copy; } - case Value::TYPE_STRING: { + case base::Value::TYPE_STRING: { std::string value; bool rv = node->GetAsString(&value); DCHECK(rv); @@ -206,23 +206,23 @@ NotificationPromo::NotificationPromo() NotificationPromo::~NotificationPromo() {} -void NotificationPromo::InitFromJson(const DictionaryValue& json, +void NotificationPromo::InitFromJson(const base::DictionaryValue& json, PromoType promo_type) { promo_type_ = promo_type; - const ListValue* promo_list = NULL; + const base::ListValue* promo_list = NULL; DVLOG(1) << "InitFromJson " << PromoTypeToString(promo_type_); if (!json.GetList(PromoTypeToString(promo_type_), &promo_list)) return; // No support for multiple promos yet. Only consider the first one. - const DictionaryValue* promo = NULL; + const base::DictionaryValue* promo = NULL; if (!promo_list->GetDictionary(0, &promo)) return; // Date. - const ListValue* date_list = NULL; + const base::ListValue* date_list = NULL; if (promo->GetList("date", &date_list)) { - const DictionaryValue* date; + const base::DictionaryValue* date; if (date_list->GetDictionary(0, &date)) { std::string time_str; base::Time time; @@ -242,7 +242,7 @@ void NotificationPromo::InitFromJson(const DictionaryValue& json, } // Grouping. - const DictionaryValue* grouping = NULL; + const base::DictionaryValue* grouping = NULL; if (promo->GetDictionary("grouping", &grouping)) { grouping->GetInteger("buckets", &num_groups_); grouping->GetInteger("segment", &initial_segment_); @@ -258,11 +258,11 @@ void NotificationPromo::InitFromJson(const DictionaryValue& json, } // Strings. - const DictionaryValue* strings = NULL; + const base::DictionaryValue* strings = NULL; promo->GetDictionary("strings", &strings); // Payload. - const DictionaryValue* payload = NULL; + const base::DictionaryValue* payload = NULL; if (promo->GetDictionary("payload", &payload)) { base::Value* ppcopy = DeepCopyAndResolveStrings(payload, strings); DCHECK(ppcopy && ppcopy->IsType(base::Value::TYPE_DICTIONARY)); @@ -274,7 +274,7 @@ void NotificationPromo::InitFromJson(const DictionaryValue& json, // For compatibility with the legacy desktop version, // if no |payload.promo_message_short| is specified, // the first string in |strings| is used. - DictionaryValue::Iterator iter(*strings); + base::DictionaryValue::Iterator iter(*strings); iter.value().GetAsString(&promo_text_); } DVLOG(1) << "promo_text_=" << promo_text_; diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc index 5963568..95c9e76 100644 --- a/chrome/browser/web_resource/promo_resource_service.cc +++ b/chrome/browser/web_resource/promo_resource_service.cc @@ -163,7 +163,7 @@ void PromoResourceService::PromoResourceStateChange() { content::NotificationService::NoDetails()); } -void PromoResourceService::Unpack(const DictionaryValue& parsed_json) { +void PromoResourceService::Unpack(const base::DictionaryValue& parsed_json) { for (size_t i = 0; i < arraysize(kValidPromoTypes); ++i) { NotificationPromo notification_promo; notification_promo.InitFromJson(parsed_json, kValidPromoTypes[i]); diff --git a/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc b/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc index 0ee9a77..d8b3966 100644 --- a/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc +++ b/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc @@ -46,9 +46,9 @@ class NotificationPromoMobileNtpTest { const std::string& promo_action_type, const std::string& promo_action_arg0, const std::string& promo_action_arg1) { - Value* value(base::JSONReader::Read(json)); + base::Value* value(base::JSONReader::Read(json)); ASSERT_TRUE(value); - DictionaryValue* dict = NULL; + base::DictionaryValue* dict = NULL; value->GetAsDictionary(&dict); ASSERT_TRUE(dict); test_json_.reset(dict); @@ -122,7 +122,7 @@ class NotificationPromoMobileNtpTest { private: NotificationPromoMobileNtp mobile_promo_; bool received_notification_; - scoped_ptr<DictionaryValue> test_json_; + scoped_ptr<base::DictionaryValue> test_json_; std::string promo_text_; std::string promo_text_long_; diff --git a/chrome/browser/web_resource/promo_resource_service_unittest.cc b/chrome/browser/web_resource/promo_resource_service_unittest.cc index fa49283..7dcd592 100644 --- a/chrome/browser/web_resource/promo_resource_service_unittest.cc +++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc @@ -97,10 +97,10 @@ class NotificationPromoTest { std::string json_with_end_date( ReplaceStringPlaceholders(json, replacements, NULL)); - Value* value(base::JSONReader::Read(json_with_end_date)); + base::Value* value(base::JSONReader::Read(json_with_end_date)); ASSERT_TRUE(value); - DictionaryValue* dict = NULL; + base::DictionaryValue* dict = NULL; value->GetAsDictionary(&dict); ASSERT_TRUE(dict); test_json_.reset(dict); @@ -339,7 +339,7 @@ class NotificationPromoTest { private: NotificationPromo notification_promo_; bool received_notification_; - scoped_ptr<DictionaryValue> test_json_; + scoped_ptr<base::DictionaryValue> test_json_; NotificationPromo::PromoType promo_type_; std::string promo_text_; diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index c7282bf..646dd6c 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -44,7 +44,8 @@ WebResourceService::~WebResourceService() { EndFetch(); } -void WebResourceService::OnUnpackFinished(const DictionaryValue& parsed_json) { +void WebResourceService::OnUnpackFinished( + const base::DictionaryValue& parsed_json) { Unpack(parsed_json); EndFetch(); } diff --git a/chrome/browser/web_resource/web_resource_service.h b/chrome/browser/web_resource/web_resource_service.h index 7acc63a0..8dcbfa4 100644 --- a/chrome/browser/web_resource/web_resource_service.h +++ b/chrome/browser/web_resource/web_resource_service.h @@ -46,7 +46,8 @@ class WebResourceService void StartAfterDelay(); // JSONAsynchronousUnpackerDelegate methods. - virtual void OnUnpackFinished(const DictionaryValue& parsed_json) OVERRIDE; + virtual void OnUnpackFinished( + const base::DictionaryValue& parsed_json) OVERRIDE; virtual void OnUnpackError(const std::string& error_message) OVERRIDE; protected: diff --git a/chrome/browser/webdata/keyword_table.cc b/chrome/browser/webdata/keyword_table.cc index 0952ac4..989ced5 100644 --- a/chrome/browser/webdata/keyword_table.cc +++ b/chrome/browser/webdata/keyword_table.cc @@ -97,7 +97,7 @@ void BindURLToStatement(const TemplateURLData& data, // TODO(beaudoin): Check what it would take to use a new table to store // alternate_urls while keeping backups and table signature in a good state. // See: crbug.com/153520 - ListValue alternate_urls_value; + base::ListValue alternate_urls_value; for (size_t i = 0; i < data.alternate_urls.size(); ++i) alternate_urls_value.AppendString(data.alternate_urls[i]); std::string alternate_urls; @@ -542,8 +542,8 @@ bool KeywordTable::GetKeywordDataFromStatement(const sql::Statement& s, data->alternate_urls.clear(); base::JSONReader json_reader; - scoped_ptr<Value> value(json_reader.ReadToValue(s.ColumnString(17))); - ListValue* alternate_urls_value; + scoped_ptr<base::Value> value(json_reader.ReadToValue(s.ColumnString(17))); + base::ListValue* alternate_urls_value; if (value.get() && value->GetAsList(&alternate_urls_value)) { std::string alternate_url; for (size_t i = 0; i < alternate_urls_value->GetSize(); ++i) { diff --git a/chrome/common/extensions/api/commands/commands_handler.cc b/chrome/common/extensions/api/commands/commands_handler.cc index 71697f1..9232649 100644 --- a/chrome/common/extensions/api/commands/commands_handler.cc +++ b/chrome/common/extensions/api/commands/commands_handler.cc @@ -80,11 +80,11 @@ bool CommandsHandler::Parse(Extension* extension, base::string16* error) { int command_index = 0; int keybindings_found = 0; - for (DictionaryValue::Iterator iter(*dict); !iter.IsAtEnd(); + for (base::DictionaryValue::Iterator iter(*dict); !iter.IsAtEnd(); iter.Advance()) { ++command_index; - const DictionaryValue* command = NULL; + const base::DictionaryValue* command = NULL; if (!iter.value().GetAsDictionary(&command)) { *error = ErrorUtils::FormatErrorMessageUTF16( manifest_errors::kInvalidKeyBindingDictionary, diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc index badd2c8..f2b4540 100644 --- a/chrome/common/extensions/api/extension_action/action_info.cc +++ b/chrome/common/extensions/api/extension_action/action_info.cc @@ -89,7 +89,7 @@ scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension, // The |default_icon| value can be either dictionary {icon size -> icon path} // or non empty string value. if (dict->HasKey(keys::kPageActionDefaultIcon)) { - const DictionaryValue* icons_value = NULL; + const base::DictionaryValue* icons_value = NULL; std::string default_icon; if (dict->GetDictionary(keys::kPageActionDefaultIcon, &icons_value)) { if (!manifest_handler_helpers::LoadIconsFromDictionary( @@ -144,7 +144,7 @@ scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension, } if (popup_key) { - const DictionaryValue* popup = NULL; + const base::DictionaryValue* popup = NULL; std::string url_str; if (dict->GetString(popup_key, &url_str)) { diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc index a7b239d..6729874 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc @@ -132,7 +132,7 @@ namespace { FileBrowserHandler* LoadFileBrowserHandler( const std::string& extension_id, - const DictionaryValue* file_browser_handler, + const base::DictionaryValue* file_browser_handler, base::string16* error) { scoped_ptr<FileBrowserHandler> result(new FileBrowserHandler()); result->set_extension_id(extension_id); @@ -156,7 +156,7 @@ FileBrowserHandler* LoadFileBrowserHandler( result->set_title(title); // Initialize access permissions (optional). - const ListValue* access_list_value = NULL; + const base::ListValue* access_list_value = NULL; if (file_browser_handler->HasKey(keys::kFileAccessList)) { if (!file_browser_handler->GetList(keys::kFileAccessList, &access_list_value) || @@ -182,7 +182,7 @@ FileBrowserHandler* LoadFileBrowserHandler( // Initialize file filters (mandatory, unless "create" access is specified, // in which case is ignored). The list can be empty. if (!result->HasCreateAccessPermission()) { - const ListValue* file_filters = NULL; + const base::ListValue* file_filters = NULL; if (!file_browser_handler->HasKey(keys::kFileFilters) || !file_browser_handler->GetList(keys::kFileFilters, &file_filters)) { *error = ASCIIToUTF16(errors::kInvalidFileFiltersList); @@ -243,19 +243,20 @@ FileBrowserHandler* LoadFileBrowserHandler( // Loads FileBrowserHandlers from |extension_actions| into a list in |result|. bool LoadFileBrowserHandlers( const std::string& extension_id, - const ListValue* extension_actions, + const base::ListValue* extension_actions, FileBrowserHandler::List* result, base::string16* error) { - for (ListValue::const_iterator iter = extension_actions->begin(); + for (base::ListValue::const_iterator iter = extension_actions->begin(); iter != extension_actions->end(); ++iter) { - if (!(*iter)->IsType(Value::TYPE_DICTIONARY)) { + if (!(*iter)->IsType(base::Value::TYPE_DICTIONARY)) { *error = ASCIIToUTF16(errors::kInvalidFileBrowserHandler); return false; } scoped_ptr<FileBrowserHandler> action( LoadFileBrowserHandler( - extension_id, reinterpret_cast<DictionaryValue*>(*iter), error)); + extension_id, + reinterpret_cast<base::DictionaryValue*>(*iter), error)); if (!action.get()) return false; // Failed to parse file browser action definition. result->push_back(linked_ptr<FileBrowserHandler>(action.release())); @@ -267,7 +268,7 @@ bool LoadFileBrowserHandlers( bool FileBrowserHandlerParser::Parse(extensions::Extension* extension, base::string16* error) { - const ListValue* file_browser_handlers_value = NULL; + const base::ListValue* file_browser_handlers_value = NULL; if (!extension->manifest()->GetList(keys::kFileBrowserHandlers, &file_browser_handlers_value)) { *error = ASCIIToUTF16(errors::kInvalidFileBrowserHandler); diff --git a/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc b/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc index 1d327f9..ae383d8 100644 --- a/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc +++ b/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc @@ -83,7 +83,7 @@ class OAuth2ManifestTest : public ExtensionManifestTest { } private: - scoped_ptr<Value> parsed_manifest_; + scoped_ptr<base::Value> parsed_manifest_; }; TEST_F(OAuth2ManifestTest, OAuth2SectionParsing) { diff --git a/chrome/common/extensions/api/input_ime/input_components_handler.cc b/chrome/common/extensions/api/input_ime/input_components_handler.cc index cdf2f2a..fa869cc 100644 --- a/chrome/common/extensions/api/input_ime/input_components_handler.cc +++ b/chrome/common/extensions/api/input_ime/input_components_handler.cc @@ -148,7 +148,7 @@ bool InputComponentsHandler::Parse(Extension* extension, } if (module_value->HasKey(keys::kShortcutKey)) { - const DictionaryValue* shortcut_value = NULL; + const base::DictionaryValue* shortcut_value = NULL; if (!module_value->GetDictionary(keys::kShortcutKey, &shortcut_value)) { *error = ErrorUtils::FormatErrorMessageUTF16( diff --git a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc index 2dce164..00bef60 100644 --- a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc +++ b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc @@ -35,7 +35,7 @@ MediaGalleriesHandlerInfo::~MediaGalleriesHandlerInfo() { MediaGalleriesHandler* LoadMediaGalleriesHandler( const std::string& extension_id, - const DictionaryValue* media_galleries_handler, + const base::DictionaryValue* media_galleries_handler, base::string16* error) { scoped_ptr<MediaGalleriesHandler> result(new MediaGalleriesHandler()); result->set_extension_id(extension_id); @@ -84,13 +84,14 @@ bool LoadMediaGalleriesHandlers( for (base::ListValue::const_iterator iter = extension_actions->begin(); iter != extension_actions->end(); ++iter) { - if (!(*iter)->IsType(Value::TYPE_DICTIONARY)) { + if (!(*iter)->IsType(base::Value::TYPE_DICTIONARY)) { *error = ASCIIToUTF16(errors::kInvalidMediaGalleriesHandler); return false; } scoped_ptr<MediaGalleriesHandler> action( LoadMediaGalleriesHandler( - extension_id, reinterpret_cast<DictionaryValue*>(*iter), error)); + extension_id, + reinterpret_cast<base::DictionaryValue*>(*iter), error)); if (!action) return false; // Failed to parse media galleries action definition. result->push_back(linked_ptr<MediaGalleriesHandler>(action.release())); diff --git a/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc b/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc index 1299aad..aa1cd3b 100644 --- a/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc +++ b/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc @@ -89,7 +89,7 @@ UrlHandlersParser::~UrlHandlersParser() { } bool ParseUrlHandler(const std::string& handler_id, - const DictionaryValue& handler_info, + const base::DictionaryValue& handler_info, std::vector<UrlHandlerInfo>* url_handlers, base::string16* error) { DCHECK(error); @@ -102,7 +102,7 @@ bool ParseUrlHandler(const std::string& handler_id, return false; } - const ListValue* manif_patterns = NULL; + const base::ListValue* manif_patterns = NULL; if (!handler_info.GetList(mkeys::kMatches, &manif_patterns) || manif_patterns->GetSize() == 0) { *error = ErrorUtils::FormatErrorMessageUTF16( @@ -110,7 +110,7 @@ bool ParseUrlHandler(const std::string& handler_id, return false; } - for (ListValue::const_iterator it = manif_patterns->begin(); + for (base::ListValue::const_iterator it = manif_patterns->begin(); it != manif_patterns->end(); ++it) { std::string str_pattern; (*it)->GetAsString(&str_pattern); @@ -134,7 +134,7 @@ bool ParseUrlHandler(const std::string& handler_id, bool UrlHandlersParser::Parse(Extension* extension, base::string16* error) { scoped_ptr<UrlHandlers> info(new UrlHandlers); - const DictionaryValue* all_handlers = NULL; + const base::DictionaryValue* all_handlers = NULL; if (!extension->manifest()->GetDictionary( mkeys::kUrlHandlers, &all_handlers)) { *error = ASCIIToUTF16(merrors::kInvalidURLHandlers); @@ -143,10 +143,10 @@ bool UrlHandlersParser::Parse(Extension* extension, base::string16* error) { DCHECK(extension->is_platform_app()); - for (DictionaryValue::Iterator iter(*all_handlers); !iter.IsAtEnd(); + for (base::DictionaryValue::Iterator iter(*all_handlers); !iter.IsAtEnd(); iter.Advance()) { // A URL handler entry is a title and a list of URL patterns to handle. - const DictionaryValue* handler = NULL; + const base::DictionaryValue* handler = NULL; if (!iter.value().GetAsDictionary(&handler)) { *error = ASCIIToUTF16(merrors::kInvalidURLHandlerPatternElement); return false; diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc index 1211add..d946e19 100644 --- a/chrome/common/extensions/extension_l10n_util.cc +++ b/chrome/common/extensions/extension_l10n_util.cc @@ -79,7 +79,7 @@ bool LocalizeManifestListValue(const std::string& key, const extensions::MessageBundle& messages, base::DictionaryValue* manifest, std::string* error) { - ListValue* list = NULL; + base::ListValue* list = NULL; if (!manifest->GetList(key, &list)) return true; @@ -88,7 +88,7 @@ bool LocalizeManifestListValue(const std::string& key, std::string result; if (list->GetString(i, &result)) { if (messages.ReplaceMessages(&result, error)) - list->Set(i, new StringValue(result)); + list->Set(i, new base::StringValue(result)); else ret = false; } @@ -228,7 +228,8 @@ bool LocalizeManifest(const extensions::MessageBundle& messages, // Initialize description of commmands. base::DictionaryValue* commands_handler = NULL; if (manifest->GetDictionary(keys::kCommands, &commands_handler)) { - for (DictionaryValue::Iterator iter(*commands_handler); !iter.IsAtEnd(); + for (base::DictionaryValue::Iterator iter(*commands_handler); + !iter.IsAtEnd(); iter.Advance()) { key.assign(base::StringPrintf("commands.%s.description", iter.key().c_str())); @@ -240,8 +241,9 @@ bool LocalizeManifest(const extensions::MessageBundle& messages, // Initialize search_provider fields. base::DictionaryValue* search_provider = NULL; if (manifest->GetDictionary(keys::kSearchProvider, &search_provider)) { - for (DictionaryValue::Iterator iter(*search_provider); !iter.IsAtEnd(); - iter.Advance()) { + for (base::DictionaryValue::Iterator iter(*search_provider); + !iter.IsAtEnd(); + iter.Advance()) { key.assign(base::StringPrintf("%s.%s", keys::kSearchProvider, iter.key().c_str())); bool success = (key == keys::kSettingsOverrideAlternateUrls) ? @@ -418,7 +420,7 @@ bool ValidateExtensionLocales(const base::FilePath& extension_path, for (std::set<std::string>::const_iterator locale = valid_locales.begin(); locale != valid_locales.end(); ++locale) { std::string locale_error; - scoped_ptr<DictionaryValue> catalog( + scoped_ptr<base::DictionaryValue> catalog( LoadMessageFile(locale_path, *locale, &locale_error)); if (!locale_error.empty()) { diff --git a/chrome/common/extensions/extension_l10n_util_unittest.cc b/chrome/common/extensions/extension_l10n_util_unittest.cc index 9004b10..031a0f0 100644 --- a/chrome/common/extensions/extension_l10n_util_unittest.cc +++ b/chrome/common/extensions/extension_l10n_util_unittest.cc @@ -494,16 +494,16 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionCommandDescription) { base::DictionaryValue manifest; manifest.SetString(keys::kName, "__MSG_name__"); manifest.SetString(keys::kDescription, "__MSG_description__"); - base::DictionaryValue* commands = new DictionaryValue(); + base::DictionaryValue* commands = new base::DictionaryValue(); std::string commands_title(keys::kCommands); manifest.Set(commands_title, commands); - base::DictionaryValue* first_command = new DictionaryValue(); + base::DictionaryValue* first_command = new base::DictionaryValue(); commands->Set("first_command", first_command); first_command->SetString(keys::kDescription, "__MSG_first_command_description__"); - base::DictionaryValue* second_command = new DictionaryValue(); + base::DictionaryValue* second_command = new base::DictionaryValue(); commands->Set("second_command", second_command); second_command->SetString(keys::kDescription, "__MSG_second_command_description__"); diff --git a/chrome/common/extensions/manifest_handlers/app_launch_info.cc b/chrome/common/extensions/manifest_handlers/app_launch_info.cc index c5ea563..1a09122 100644 --- a/chrome/common/extensions/manifest_handlers/app_launch_info.cc +++ b/chrome/common/extensions/manifest_handlers/app_launch_info.cc @@ -28,7 +28,7 @@ bool ReadLaunchDimension(const extensions::Manifest* manifest, int* target, bool is_valid_container, base::string16* error) { - const Value* temp = NULL; + const base::Value* temp = NULL; if (manifest->Get(key, &temp)) { if (!is_valid_container) { *error = ErrorUtils::FormatErrorMessageUTF16( @@ -112,7 +112,7 @@ bool AppLaunchInfo::Parse(Extension* extension, base::string16* error) { } bool AppLaunchInfo::LoadLaunchURL(Extension* extension, base::string16* error) { - const Value* temp = NULL; + const base::Value* temp = NULL; // Launch URL can be either local (to chrome-extension:// root) or an absolute // web URL. @@ -226,7 +226,7 @@ bool AppLaunchInfo::LoadLaunchURL(Extension* extension, base::string16* error) { bool AppLaunchInfo::LoadLaunchContainer(Extension* extension, base::string16* error) { - const Value* tmp_launcher_container = NULL; + const base::Value* tmp_launcher_container = NULL; if (!extension->manifest()->Get(keys::kLaunchContainer, &tmp_launcher_container)) return true; diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc index 32d42f9..9147772 100644 --- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc +++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc @@ -251,7 +251,7 @@ bool LoadUserScriptFromDictionary(const base::DictionaryValue* content_script, if (js) { for (size_t script_index = 0; script_index < js->GetSize(); ++script_index) { - const Value* value; + const base::Value* value; std::string relative; if (!js->Get(script_index, &value) || !value->GetAsString(&relative)) { *error = ErrorUtils::FormatErrorMessageUTF16( @@ -270,7 +270,7 @@ bool LoadUserScriptFromDictionary(const base::DictionaryValue* content_script, if (css) { for (size_t script_index = 0; script_index < css->GetSize(); ++script_index) { - const Value* value; + const base::Value* value; std::string relative; if (!css->Get(script_index, &value) || !value->GetAsString(&relative)) { *error = ErrorUtils::FormatErrorMessageUTF16( diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc index 8448289..4ed189eb 100644 --- a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc +++ b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc @@ -117,7 +117,7 @@ TEST_F(PlatformAppsManifestTest, CertainApisRequirePlatformApps) { scoped_ptr<base::DictionaryValue> manifest( LoadManifest("init_valid_platform_app.json", &error)); - std::vector<linked_ptr<DictionaryValue> > manifests; + std::vector<linked_ptr<base::DictionaryValue> > manifests; // Create each manifest. for (size_t i = 0; i < arraysize(kPlatformAppExperimentalApis); ++i) { const char* api_name = kPlatformAppExperimentalApis[i]; diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc index 084b9ec..98b8b5a 100644 --- a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc +++ b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc @@ -29,6 +29,6 @@ TEST_F(ValidAppManifestTest, AllowUnrecognizedPermissions) { LoadManifest("valid_app.json", &error)); base::ListValue* permissions = NULL; ASSERT_TRUE(manifest->GetList("permissions", &permissions)); - permissions->Append(new StringValue("not-a-valid-permission")); + permissions->Append(new base::StringValue("not-a-valid-permission")); LoadAndExpectSuccess(Manifest(manifest.get(), "")); } diff --git a/chrome/common/extensions/permissions/settings_override_permission_unittest.cc b/chrome/common/extensions/permissions/settings_override_permission_unittest.cc index ba8fa22..d9e115e 100644 --- a/chrome/common/extensions/permissions/settings_override_permission_unittest.cc +++ b/chrome/common/extensions/permissions/settings_override_permission_unittest.cc @@ -37,12 +37,13 @@ class SettingsOverridePermissionTest : public ExtensionManifestTest { if (flags & kHomepage) settings_override->SetString("homepage", "http://www.google.com"); if (flags & kStartupPages) { - scoped_ptr<ListValue> startup_pages(new ListValue); + scoped_ptr<base::ListValue> startup_pages(new base::ListValue); startup_pages->AppendString("http://startup.com/startup.html"); settings_override->Set("startup_pages", startup_pages.release()); } if (flags & kSearchProvider) { - scoped_ptr<DictionaryValue> search_provider(new DictionaryValue); + scoped_ptr<base::DictionaryValue> search_provider( + new base::DictionaryValue); search_provider->SetString("search_url", "http://google.com/search.html"); search_provider->SetString("name", "test"); search_provider->SetString("keyword", "lock"); diff --git a/chrome/common/extensions/sync_type_unittest.cc b/chrome/common/extensions/sync_type_unittest.cc index 2ba640a..d457e09 100644 --- a/chrome/common/extensions/sync_type_unittest.cc +++ b/chrome/common/extensions/sync_type_unittest.cc @@ -62,8 +62,8 @@ class ExtensionSyncTypeTest : public testing::Test { } } if (has_plugin_permission) { - ListValue* plugins = new ListValue(); - plugins->Set(0, new StringValue("plugin")); + base::ListValue* plugins = new base::ListValue(); + plugins->Set(0, new base::StringValue("plugin")); source.Set(keys::kPermissions, plugins); } diff --git a/chrome/common/importer/firefox_importer_utils.cc b/chrome/common/importer/firefox_importer_utils.cc index 4f6a201..cd7bf17 100644 --- a/chrome/common/importer/firefox_importer_utils.cc +++ b/chrome/common/importer/firefox_importer_utils.cc @@ -23,7 +23,7 @@ namespace { // Retrieves the file system path of the profile name. -base::FilePath GetProfilePath(const DictionaryValue& root, +base::FilePath GetProfilePath(const base::DictionaryValue& root, const std::string& profile_name) { base::string16 path16; std::string is_relative; @@ -47,7 +47,7 @@ base::FilePath GetProfilePath(const DictionaryValue& root, } // Checks if the named profile is the default profile. -bool IsDefaultProfile(const DictionaryValue& root, +bool IsDefaultProfile(const base::DictionaryValue& root, const std::string& profile_name) { std::string is_default; root.GetStringASCII(profile_name + ".Default", &is_default); @@ -66,7 +66,7 @@ base::FilePath GetFirefoxProfilePath() { } base::FilePath GetFirefoxProfilePathFromDictionary( - const DictionaryValue& root) { + const base::DictionaryValue& root) { std::vector<std::string> profiles; for (int i = 0; ; ++i) { std::string current_profile = base::StringPrintf("Profile%d", i); diff --git a/chrome/common/importer/firefox_importer_utils_unittest.cc b/chrome/common/importer/firefox_importer_utils_unittest.cc index 06fd329..7d3468d 100644 --- a/chrome/common/importer/firefox_importer_utils_unittest.cc +++ b/chrome/common/importer/firefox_importer_utils_unittest.cc @@ -120,18 +120,18 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxImporterName) { } TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) { - DictionaryValue no_profiles; + base::DictionaryValue no_profiles; EXPECT_EQ("", GetFirefoxProfilePathFromDictionary(no_profiles).MaybeAsASCII()); - DictionaryValue single_profile; + base::DictionaryValue single_profile; single_profile.SetString("Profile0.Path", "first"); single_profile.SetString("Profile0.IsRelative", "0"); single_profile.SetString("Profile0.Default", "1"); EXPECT_EQ("first", GetFirefoxProfilePathFromDictionary(single_profile).MaybeAsASCII()); - DictionaryValue no_default; + base::DictionaryValue no_default; no_default.SetString("Profile0.Path", "first"); no_default.SetString("Profile0.IsRelative", "0"); no_default.SetString("Profile1.Path", "second"); @@ -139,7 +139,7 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) { EXPECT_EQ("first", GetFirefoxProfilePathFromDictionary(no_default).MaybeAsASCII()); - DictionaryValue default_first; + base::DictionaryValue default_first; default_first.SetString("Profile0.Path", "first"); default_first.SetString("Profile0.IsRelative", "0"); default_first.SetString("Profile0.Default", "1"); @@ -148,7 +148,7 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) { EXPECT_EQ("first", GetFirefoxProfilePathFromDictionary(default_first).MaybeAsASCII()); - DictionaryValue default_second; + base::DictionaryValue default_second; default_second.SetString("Profile0.Path", "first"); default_second.SetString("Profile0.IsRelative", "0"); default_second.SetString("Profile1.Path", "second"); diff --git a/chrome/common/importer/profile_import_process_messages.h b/chrome/common/importer/profile_import_process_messages.h index c2fdffb..dc09e4d3 100644 --- a/chrome/common/importer/profile_import_process_messages.h +++ b/chrome/common/importer/profile_import_process_messages.h @@ -262,7 +262,7 @@ struct ParamTraits<importer::ImporterIE7PasswordInfo> { IPC_MESSAGE_CONTROL3(ProfileImportProcessMsg_StartImport, importer::SourceProfile, int /* Bitmask of items to import. */, - DictionaryValue /* Localized strings. */) + base::DictionaryValue /* Localized strings. */) IPC_MESSAGE_CONTROL0(ProfileImportProcessMsg_CancelImport) diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc index 28b5011..ba8edfc 100644 --- a/chrome/installer/util/master_preferences_unittest.cc +++ b/chrome/installer/util/master_preferences_unittest.cc @@ -215,7 +215,7 @@ TEST(MasterPrefsExtension, ValidateExtensionJSON) { .AppendASCII("good").AppendASCII("Preferences"); installer::MasterPreferences prefs(prefs_path); - DictionaryValue* extensions = NULL; + base::DictionaryValue* extensions = NULL; EXPECT_TRUE(prefs.GetExtensionsBlock(&extensions)); int location = 0; EXPECT_TRUE(extensions->GetInteger( diff --git a/chrome/installer/util/uninstall_metrics.cc b/chrome/installer/util/uninstall_metrics.cc index 5544953..58badf6 100644 --- a/chrome/installer/util/uninstall_metrics.cc +++ b/chrome/installer/util/uninstall_metrics.cc @@ -23,11 +23,13 @@ namespace { // Returns true if at least one uninstall metric was found in // uninstall_metrics_dict, false otherwise. bool BuildUninstallMetricsString( - const DictionaryValue* uninstall_metrics_dict, base::string16* metrics) { + const base::DictionaryValue* uninstall_metrics_dict, + base::string16* metrics) { DCHECK(NULL != metrics); bool has_values = false; - for (DictionaryValue::Iterator iter(*uninstall_metrics_dict); !iter.IsAtEnd(); + for (base::DictionaryValue::Iterator iter(*uninstall_metrics_dict); + !iter.IsAtEnd(); iter.Advance()) { has_values = true; metrics->append(L"&"); @@ -44,7 +46,7 @@ bool BuildUninstallMetricsString( } // namespace -bool ExtractUninstallMetrics(const DictionaryValue& root, +bool ExtractUninstallMetrics(const base::DictionaryValue& root, base::string16* uninstall_metrics_string) { // Make sure that the user wants us reporting metrics. If not, don't // add our uninstall metrics. @@ -55,7 +57,7 @@ bool ExtractUninstallMetrics(const DictionaryValue& root, return false; } - const DictionaryValue* uninstall_metrics_dict = NULL; + const base::DictionaryValue* uninstall_metrics_dict = NULL; if (!root.HasKey(installer::kUninstallMetricsName) || !root.GetDictionary(installer::kUninstallMetricsName, &uninstall_metrics_dict)) { @@ -75,16 +77,17 @@ bool ExtractUninstallMetricsFromFile(const base::FilePath& file_path, JSONFileValueSerializer json_serializer(file_path); std::string json_error_string; - scoped_ptr<Value> root(json_serializer.Deserialize(NULL, NULL)); + scoped_ptr<base::Value> root(json_serializer.Deserialize(NULL, NULL)); if (!root.get()) return false; // Preferences should always have a dictionary root. - if (!root->IsType(Value::TYPE_DICTIONARY)) + if (!root->IsType(base::Value::TYPE_DICTIONARY)) return false; - return ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()), - uninstall_metrics_string); + return ExtractUninstallMetrics( + *static_cast<base::DictionaryValue*>(root.get()), + uninstall_metrics_string); } } // namespace installer diff --git a/chrome/installer/util/uninstall_metrics_unittest.cc b/chrome/installer/util/uninstall_metrics_unittest.cc index fb6ee9d..621b0db 100644 --- a/chrome/installer/util/uninstall_metrics_unittest.cc +++ b/chrome/installer/util/uninstall_metrics_unittest.cc @@ -46,12 +46,13 @@ TEST(UninstallMetricsTest, TestExtractUninstallMetrics) { JSONStringValueSerializer json_deserializer(pref_string); std::string error_message; - scoped_ptr<Value> root(json_deserializer.Deserialize(NULL, &error_message)); + scoped_ptr<base::Value> root( + json_deserializer.Deserialize(NULL, &error_message)); ASSERT_TRUE(root.get()); base::string16 uninstall_metrics_string; EXPECT_TRUE( - ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()), + ExtractUninstallMetrics(*static_cast<base::DictionaryValue*>(root.get()), &uninstall_metrics_string)); EXPECT_EQ(expected_url_string, uninstall_metrics_string); } diff --git a/chrome/renderer/chrome_mock_render_thread.cc b/chrome/renderer/chrome_mock_render_thread.cc index d0e13e1..633c22e 100644 --- a/chrome/renderer/chrome_mock_render_thread.cc +++ b/chrome/renderer/chrome_mock_render_thread.cc @@ -183,7 +183,7 @@ void ChromeMockRenderThread::OnUpdatePrintSettings( } // Just return the default settings. - const ListValue* page_range_array; + const base::ListValue* page_range_array; printing::PageRanges new_ranges; if (job_settings.GetList(printing::kSettingPageRange, &page_range_array)) { for (size_t index = 0; index < page_range_array->GetSize(); ++index) { diff --git a/chrome/renderer/extensions/api_activity_logger.cc b/chrome/renderer/extensions/api_activity_logger.cc index 2ab900d..4bd1b98 100644 --- a/chrome/renderer/extensions/api_activity_logger.cc +++ b/chrome/renderer/extensions/api_activity_logger.cc @@ -58,7 +58,7 @@ void APIActivityLogger::LogInternal( ActivityLogConverterStrategy strategy; converter->SetFunctionAllowed(true); converter->SetStrategy(&strategy); - scoped_ptr<ListValue> arg_list(new ListValue()); + scoped_ptr<base::ListValue> arg_list(new base::ListValue()); for (size_t i = 0; i < arg_array->Length(); ++i) { arg_list->Set(i, converter->FromV8Value(arg_array->Get(i), diff --git a/chrome/renderer/extensions/dom_activity_logger.cc b/chrome/renderer/extensions/dom_activity_logger.cc index 3f00e08..5ff2471 100644 --- a/chrome/renderer/extensions/dom_activity_logger.cc +++ b/chrome/renderer/extensions/dom_activity_logger.cc @@ -36,7 +36,7 @@ void DOMActivityLogger::log( ActivityLogConverterStrategy strategy; converter->SetFunctionAllowed(true); converter->SetStrategy(&strategy); - scoped_ptr<ListValue> argv_list_value(new ListValue()); + scoped_ptr<base::ListValue> argv_list_value(new base::ListValue()); for (int i =0; i < argc; i++) { argv_list_value->Set( i, diff --git a/chrome/renderer/extensions/extension_helper.cc b/chrome/renderer/extensions/extension_helper.cc index eb47593..31a9a56 100644 --- a/chrome/renderer/extensions/extension_helper.cc +++ b/chrome/renderer/extensions/extension_helper.cc @@ -304,7 +304,7 @@ void ExtensionHelper::OnExecuteCode( WebView* webview = render_view()->GetWebView(); WebFrame* main_frame = webview->mainFrame(); if (!main_frame) { - ListValue val; + base::ListValue val; Send(new ExtensionHostMsg_ExecuteCodeFinished(routing_id(), params.request_id, "No main frame", diff --git a/chrome/renderer/extensions/send_request_natives.cc b/chrome/renderer/extensions/send_request_natives.cc index 51c7855..ab5b202 100644 --- a/chrome/renderer/extensions/send_request_natives.cc +++ b/chrome/renderer/extensions/send_request_natives.cc @@ -53,16 +53,16 @@ void SendRequestNatives::StartRequest( if (!preserve_null_in_objects) converter->SetStripNullFromObjects(true); - scoped_ptr<Value> value_args( + scoped_ptr<base::Value> value_args( converter->FromV8Value(args[1], context()->v8_context())); - if (!value_args.get() || !value_args->IsType(Value::TYPE_LIST)) { + if (!value_args.get() || !value_args->IsType(base::Value::TYPE_LIST)) { NOTREACHED() << "Unable to convert args passed to StartRequest"; return; } request_sender_->StartRequest( context(), name, request_id, has_callback, for_io_thread, - static_cast<ListValue*>(value_args.get())); + static_cast<base::ListValue*>(value_args.get())); } void SendRequestNatives::GetGlobal( diff --git a/chrome/renderer/extensions/set_icon_natives.cc b/chrome/renderer/extensions/set_icon_natives.cc index e80c4a4..b7f4e30 100644 --- a/chrome/renderer/extensions/set_icon_natives.cc +++ b/chrome/renderer/extensions/set_icon_natives.cc @@ -35,7 +35,7 @@ SetIconNatives::SetIconNatives(Dispatcher* dispatcher, bool SetIconNatives::ConvertImageDataToBitmapValue( const v8::Local<v8::Object> image_data, - Value** bitmap_value) { + base::Value** bitmap_value) { v8::Isolate* isolate = context()->v8_context()->GetIsolate(); v8::Local<v8::Object> data = image_data->Get(v8::String::NewFromUtf8(isolate, "data"))->ToObject(); @@ -117,7 +117,7 @@ bool SetIconNatives::ConvertImageDataSetToBitmapValueSet( v8::Local<v8::Object> image_data = image_data_set ->Get(v8::String::NewFromUtf8(args.GetIsolate(), kImageSizeKeys[i])) ->ToObject(); - Value* image_data_bitmap = NULL; + base::Value* image_data_bitmap = NULL; if (!ConvertImageDataToBitmapValue(image_data, &image_data_bitmap)) return false; bitmap_set_value->Set(kImageSizeKeys[i], image_data_bitmap); @@ -145,7 +145,7 @@ void SetIconNatives::SetIconCommon( args.GetIsolate(), "tabId"))->Int32Value()); } - ListValue list_value; + base::ListValue list_value; list_value.Append(dict); std::string name = *v8::String::Utf8Value(args[0]); diff --git a/chrome/renderer/extensions/set_icon_natives.h b/chrome/renderer/extensions/set_icon_natives.h index 3d9ed18..b325206 100644 --- a/chrome/renderer/extensions/set_icon_natives.h +++ b/chrome/renderer/extensions/set_icon_natives.h @@ -26,7 +26,7 @@ class SetIconNatives : public ChromeV8Extension { private: bool ConvertImageDataToBitmapValue(const v8::Local<v8::Object> image_data, - Value** bitmap_value); + base::Value** bitmap_value); bool ConvertImageDataSetToBitmapValueSet( const v8::FunctionCallbackInfo<v8::Value>& args, base::DictionaryValue* bitmap_value); diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc index ff93456..688512e 100644 --- a/chrome/renderer/printing/print_web_view_helper.cc +++ b/chrome/renderer/printing/print_web_view_helper.cc @@ -798,7 +798,7 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) { } void PrintWebViewHelper::OnPrintForPrintPreview( - const DictionaryValue& job_settings) { + const base::DictionaryValue& job_settings) { DCHECK(is_preview_enabled_); // If still not finished with earlier print request simply ignore. if (prep_frame_view_) diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc index 54fb72a7e..f202cf7 100644 --- a/chrome/service/cloud_print/cloud_print_connector.cc +++ b/chrome/service/cloud_print/cloud_print_connector.cc @@ -180,7 +180,7 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandleRawData( CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandleJSONData( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { if (!IsRunning()) // Orphant response. Connector has been stopped already. return CloudPrintURLFetcher::STOP_PROCESSING; @@ -204,7 +204,7 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandlePrinterListResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { DCHECK(succeeded); if (!succeeded) @@ -233,11 +233,11 @@ CloudPrintConnector::HandlePrinterListResponse( } // Go through the list of the cloud printers and init print job handlers. - ListValue* printer_list = NULL; + base::ListValue* printer_list = NULL; // There may be no "printers" value in the JSON if (json_data->GetList(kPrinterListValue, &printer_list) && printer_list) { for (size_t index = 0; index < printer_list->GetSize(); index++) { - DictionaryValue* printer_data = NULL; + base::DictionaryValue* printer_data = NULL; if (printer_list->GetDictionary(index, &printer_data)) { std::string printer_name; printer_data->GetString(kNameValue, &printer_name); @@ -285,7 +285,7 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandlePrinterListResponseSettingsUpdate( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { DCHECK(succeeded); if (!succeeded) @@ -299,7 +299,7 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandlePrinterDeleteResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handler printer delete response" << ", succeeded: " << succeeded @@ -312,16 +312,16 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandleRegisterPrinterResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handler printer register response" << ", succeeded: " << succeeded << ", url: " << url; if (succeeded) { - ListValue* printer_list = NULL; + base::ListValue* printer_list = NULL; // There should be a "printers" value in the JSON if (json_data->GetList(kPrinterListValue, &printer_list)) { - DictionaryValue* printer_data = NULL; + base::DictionaryValue* printer_data = NULL; if (printer_list->GetDictionary(0, &printer_data)) InitJobHandlerForPrinter(printer_data); } @@ -386,7 +386,7 @@ bool CloudPrintConnector::RemovePrinterFromList( } void CloudPrintConnector::InitJobHandlerForPrinter( - DictionaryValue* printer_data) { + base::DictionaryValue* printer_data) { DCHECK(printer_data); PrinterJobHandler::PrinterInfoFromCloud printer_info_cloud; printer_data->GetString(kIdValue, &printer_info_cloud.printer_id); @@ -410,7 +410,7 @@ void CloudPrintConnector::InitJobHandlerForPrinter( } printer_data->GetString(kPrinterCapsHashValue, &printer_info_cloud.caps_hash); - ListValue* tags_list = NULL; + base::ListValue* tags_list = NULL; if (printer_data->GetList(kTagsValue, &tags_list) && tags_list) { for (size_t index = 0; index < tags_list->GetSize(); index++) { std::string tag; @@ -441,13 +441,13 @@ void CloudPrintConnector::InitJobHandlerForPrinter( } void CloudPrintConnector::UpdateSettingsFromPrintersList( - DictionaryValue* json_data) { - ListValue* printer_list = NULL; + base::DictionaryValue* json_data) { + base::ListValue* printer_list = NULL; int min_xmpp_timeout = std::numeric_limits<int>::max(); // There may be no "printers" value in the JSON if (json_data->GetList(kPrinterListValue, &printer_list) && printer_list) { for (size_t index = 0; index < printer_list->GetSize(); index++) { - DictionaryValue* printer_data = NULL; + base::DictionaryValue* printer_data = NULL; if (printer_list->GetDictionary(index, &printer_data)) { int xmpp_timeout = 0; if (printer_data->GetInteger(kLocalSettingsPendingXmppValue, diff --git a/chrome/service/cloud_print/cloud_print_connector.h b/chrome/service/cloud_print/cloud_print_connector.h index ec95679..3ff77e7 100644 --- a/chrome/service/cloud_print/cloud_print_connector.h +++ b/chrome/service/cloud_print/cloud_print_connector.h @@ -62,7 +62,7 @@ class CloudPrintConnector (CloudPrintConnector::*ResponseHandler)( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded); enum PendingTaskType { @@ -107,25 +107,25 @@ class CloudPrintConnector CloudPrintURLFetcher::ResponseAction HandlePrinterListResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded); CloudPrintURLFetcher::ResponseAction HandlePrinterListResponseSettingsUpdate( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded); CloudPrintURLFetcher::ResponseAction HandlePrinterDeleteResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded); CloudPrintURLFetcher::ResponseAction HandleRegisterPrinterResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded); // End response handlers @@ -147,9 +147,9 @@ class CloudPrintConnector bool RemovePrinterFromList(const std::string& printer_name, printing::PrinterList* printer_list); - void InitJobHandlerForPrinter(DictionaryValue* printer_data); + void InitJobHandlerForPrinter(base::DictionaryValue* printer_data); - void UpdateSettingsFromPrintersList(DictionaryValue* json_data); + void UpdateSettingsFromPrintersList(base::DictionaryValue* json_data); void AddPendingAvailableTask(); void AddPendingDeleteTask(const std::string& id); diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.cc b/chrome/service/cloud_print/cloud_print_url_fetcher.cc index 3e00472..757b158 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher.cc +++ b/chrome/service/cloud_print/cloud_print_url_fetcher.cc @@ -200,7 +200,7 @@ void CloudPrintURLFetcher::OnURLFetchComplete( // response, we will retry (to handle the case where we got redirected // to a non-cloudprint-server URL eg. for authentication). bool succeeded = false; - scoped_ptr<DictionaryValue> response_dict = + scoped_ptr<base::DictionaryValue> response_dict = ParseResponseJSON(data, &succeeded); if (response_dict) { diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc index bc6f0c9..3f1a116 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc +++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc @@ -162,7 +162,7 @@ class CloudPrintURLFetcherBasicTest : public CloudPrintURLFetcherTest { virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) OVERRIDE; void SetHandleRawResponse(bool handle_raw_response) { @@ -282,7 +282,7 @@ CloudPrintURLFetcher::ResponseAction CloudPrintURLFetcherBasicTest::HandleJSONData( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { // We should never get here if we returned true in one of the above methods. EXPECT_FALSE(handle_raw_response_); diff --git a/chrome/service/cloud_print/job_status_updater.cc b/chrome/service/cloud_print/job_status_updater.cc index 0c255fb..dcdca08 100644 --- a/chrome/service/cloud_print/job_status_updater.cc +++ b/chrome/service/cloud_print/job_status_updater.cc @@ -97,7 +97,7 @@ void JobStatusUpdater::Stop() { CloudPrintURLFetcher::ResponseAction JobStatusUpdater::HandleJSONData( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { if (IsTerminalJobState(last_job_details_.status)) { base::MessageLoop::current()->PostTask( diff --git a/chrome/service/cloud_print/print_system_cups.cc b/chrome/service/cloud_print/print_system_cups.cc index bc7b10d..f54d150 100644 --- a/chrome/service/cloud_print/print_system_cups.cc +++ b/chrome/service/cloud_print/print_system_cups.cc @@ -75,7 +75,7 @@ struct PrintServerInfoCUPS { class PrintSystemCUPS : public PrintSystem { public: - explicit PrintSystemCUPS(const DictionaryValue* print_system_settings); + explicit PrintSystemCUPS(const base::DictionaryValue* print_system_settings); // PrintSystem implementation. virtual PrintSystemResult Init() OVERRIDE; @@ -139,7 +139,7 @@ class PrintSystemCUPS : public PrintSystem { const char* name, const char* filename, const char* title, int num_options, cups_option_t* options); - void InitPrintBackends(const DictionaryValue* print_system_settings); + void InitPrintBackends(const base::DictionaryValue* print_system_settings); void AddPrintServer(const std::string& url); void UpdatePrinters(); @@ -408,7 +408,8 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler { DISALLOW_COPY_AND_ASSIGN(JobSpoolerCUPS); }; -PrintSystemCUPS::PrintSystemCUPS(const DictionaryValue* print_system_settings) +PrintSystemCUPS::PrintSystemCUPS( + const base::DictionaryValue* print_system_settings) : update_timeout_(base::TimeDelta::FromMinutes( kCheckForPrinterUpdatesMinutes)), initialized_(false), @@ -439,8 +440,8 @@ PrintSystemCUPS::PrintSystemCUPS(const DictionaryValue* print_system_settings) } void PrintSystemCUPS::InitPrintBackends( - const DictionaryValue* print_system_settings) { - const ListValue* url_list; + const base::DictionaryValue* print_system_settings) { + const base::ListValue* url_list; if (print_system_settings && print_system_settings->GetList(kCUPSPrintServerURLs, &url_list)) { for (size_t i = 0; i < url_list->GetSize(); i++) { @@ -460,7 +461,7 @@ void PrintSystemCUPS::AddPrintServer(const std::string& url) { LOG(WARNING) << "No print server specified. Using default print server."; // Get Print backend for the specific print server. - DictionaryValue backend_settings; + base::DictionaryValue backend_settings; backend_settings.SetString(kCUPSPrintServerURL, url); // Make CUPS requests non-blocking. @@ -541,11 +542,14 @@ bool PrintSystemCUPS::IsValidPrinter(const std::string& printer_name) { return GetPrinterInfo(printer_name, NULL); } -bool PrintSystemCUPS::ValidatePrintTicket(const std::string& printer_name, - const std::string& print_ticket_data) { +bool PrintSystemCUPS::ValidatePrintTicket( + const std::string& printer_name, + const std::string& print_ticket_data) { DCHECK(initialized_); - scoped_ptr<Value> ticket_value(base::JSONReader::Read(print_ticket_data)); - return ticket_value != NULL && ticket_value->IsType(Value::TYPE_DICTIONARY); + scoped_ptr<base::Value> ticket_value( + base::JSONReader::Read(print_ticket_data)); + return ticket_value != NULL && + ticket_value->IsType(base::Value::TYPE_DICTIONARY); } // Print ticket on linux is a JSON string containing only one dictionary. @@ -553,14 +557,16 @@ bool PrintSystemCUPS::ParsePrintTicket( const std::string& print_ticket, std::map<std::string, std::string>* options) { DCHECK(options); - scoped_ptr<Value> ticket_value(base::JSONReader::Read(print_ticket)); - if (ticket_value == NULL || !ticket_value->IsType(Value::TYPE_DICTIONARY)) + scoped_ptr<base::Value> ticket_value(base::JSONReader::Read(print_ticket)); + if (ticket_value == NULL || + !ticket_value->IsType(base::Value::TYPE_DICTIONARY)) { return false; + } options->clear(); - DictionaryValue* ticket_dict = - static_cast<DictionaryValue*>(ticket_value.get()); - for (DictionaryValue::Iterator it(*ticket_dict); !it.IsAtEnd(); + base::DictionaryValue* ticket_dict = + static_cast<base::DictionaryValue*>(ticket_value.get()); + for (base::DictionaryValue::Iterator it(*ticket_dict); !it.IsAtEnd(); it.Advance()) { std::string value; if (it.value().GetAsString(&value)) @@ -724,7 +730,7 @@ std::string PrintSystemCUPS::GetSupportedMimeTypes() { } scoped_refptr<PrintSystem> PrintSystem::CreateInstance( - const DictionaryValue* print_system_settings) { + const base::DictionaryValue* print_system_settings) { return new PrintSystemCUPS(print_system_settings); } diff --git a/chrome/service/cloud_print/printer_job_handler.cc b/chrome/service/cloud_print/printer_job_handler.cc index 3919843..b99c75b 100644 --- a/chrome/service/cloud_print/printer_job_handler.cc +++ b/chrome/service/cloud_print/printer_job_handler.cc @@ -157,7 +157,7 @@ CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandleRawData( CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandleJSONData( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { DCHECK(next_json_data_handler_); return (this->*next_json_data_handler_)(source, url, json_data, succeeded); @@ -282,7 +282,7 @@ CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandlePrinterUpdateResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handling printer update response" << ", printer id: " << printer_info_cloud_.printer_id; @@ -298,7 +298,7 @@ CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandleJobMetadataResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handling job metadata response" << ", printer id: " << printer_info_cloud_.printer_id; @@ -401,7 +401,7 @@ CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandleInProgressStatusUpdateResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handling success status update response" << ", printer id: " << printer_info_cloud_.printer_id; @@ -414,7 +414,7 @@ CloudPrintURLFetcher::ResponseAction PrinterJobHandler::HandleFailureStatusUpdateResponse( const net::URLFetcher* source, const GURL& url, - DictionaryValue* json_data, + base::DictionaryValue* json_data, bool succeeded) { VLOG(1) << "CP_CONNECTOR: Handling failure status update response" << ", printer id: " << printer_info_cloud_.printer_id; diff --git a/chrome/service/cloud_print/printer_job_queue_handler.cc b/chrome/service/cloud_print/printer_job_queue_handler.cc index c794c71..8c5b2e8 100644 --- a/chrome/service/cloud_print/printer_job_queue_handler.cc +++ b/chrome/service/cloud_print/printer_job_queue_handler.cc @@ -51,7 +51,7 @@ PrinterJobQueueHandler::PrinterJobQueueHandler() PrinterJobQueueHandler::~PrinterJobQueueHandler() {} void PrinterJobQueueHandler::ConstructJobDetailsFromJson( - const DictionaryValue* job_data, + const base::DictionaryValue* job_data, JobDetails* job_details) { job_details->Clear(); @@ -62,7 +62,7 @@ void PrinterJobQueueHandler::ConstructJobDetailsFromJson( job_data->GetString(kFileUrlValue, &job_details->print_data_url_); // Get tags for print job. - const ListValue* tags = NULL; + const base::ListValue* tags = NULL; if (job_data->GetList(kTagsValue, &tags)) { for (size_t i = 0; i < tags->GetSize(); i++) { std::string value; @@ -98,20 +98,21 @@ base::TimeDelta PrinterJobQueueHandler::ComputeBackoffTime( return scheduled_retry - now; } -void PrinterJobQueueHandler::GetJobsFromQueue(const DictionaryValue* json_data, - std::vector<JobDetails>* jobs) { +void PrinterJobQueueHandler::GetJobsFromQueue( + const base::DictionaryValue* json_data, + std::vector<JobDetails>* jobs) { std::vector<JobDetails> jobs_with_timeouts; jobs->clear(); - const ListValue* job_list = NULL; + const base::ListValue* job_list = NULL; if (!json_data->GetList(kJobListValue, &job_list)) { return; } size_t list_size = job_list->GetSize(); for (size_t cur_job = 0; cur_job < list_size; cur_job++) { - const DictionaryValue* job_data = NULL; + const base::DictionaryValue* job_data = NULL; if (job_list->GetDictionary(cur_job, &job_data)) { JobDetails job_details_current; ConstructJobDetailsFromJson(job_data, &job_details_current); diff --git a/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc b/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc index b29f5a4..f099359 100644 --- a/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc +++ b/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc @@ -51,8 +51,8 @@ class TimeProviderMock : public PrinterJobQueueHandler::TimeProvider { class PrinterJobQueueHandlerTest : public ::testing::Test { protected: - Value* data_; - DictionaryValue* json_data_; + base::Value* data_; + base::DictionaryValue* json_data_; virtual void SetUp() { base::JSONReader json_reader; data_ = json_reader.Read(kJobListResponse); diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index bf1ad34..7346e77 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -292,30 +292,31 @@ bool BrowserProxy::GetInitialLoadTimes(base::TimeDelta timeout, return false; } std::string error; - scoped_ptr<Value> values(base::JSONReader::ReadAndReturnError( + scoped_ptr<base::Value> values(base::JSONReader::ReadAndReturnError( json_response, base::JSON_ALLOW_TRAILING_COMMAS, NULL, &error)); - if (!error.empty() || values->GetType() != Value::TYPE_DICTIONARY) + if (!error.empty() || values->GetType() != base::Value::TYPE_DICTIONARY) return false; - DictionaryValue* values_dict = static_cast<DictionaryValue*>(values.get()); + base::DictionaryValue* values_dict = + static_cast<base::DictionaryValue*>(values.get()); - Value* tabs_value; + base::Value* tabs_value; if (!values_dict->Get("tabs", &tabs_value) || - tabs_value->GetType() != Value::TYPE_LIST) + tabs_value->GetType() != base::Value::TYPE_LIST) return false; - ListValue* tabs_list = static_cast<ListValue*>(tabs_value); + base::ListValue* tabs_list = static_cast<base::ListValue*>(tabs_value); for (size_t i = 0; i < tabs_list->GetSize(); i++) { float stop_ms = 0; float start_ms = 0; - Value* tab_value; - DictionaryValue* tab_dict; + base::Value* tab_value; + base::DictionaryValue* tab_dict; if (!tabs_list->Get(i, &tab_value) || - tab_value->GetType() != Value::TYPE_DICTIONARY) + tab_value->GetType() != base::Value::TYPE_DICTIONARY) return false; - tab_dict = static_cast<DictionaryValue*>(tab_value); + tab_dict = static_cast<base::DictionaryValue*>(tab_value); double temp; if (!tab_dict->GetDouble("load_start_ms", &temp)) diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 50d4223..0360360 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -169,13 +169,13 @@ bool TabProxy::NavigateToURLAsync(const GURL& url) { bool TabProxy::ExecuteAndExtractString(const std::wstring& frame_xpath, const std::wstring& jscript, std::wstring* string_value) { - scoped_ptr<Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); + scoped_ptr<base::Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); if (root == NULL) return false; - DCHECK(root->IsType(Value::TYPE_LIST)); - Value* value = NULL; - bool succeeded = static_cast<ListValue*>(root.get())->Get(0, &value); + DCHECK(root->IsType(base::Value::TYPE_LIST)); + base::Value* value = NULL; + bool succeeded = static_cast<base::ListValue*>(root.get())->Get(0, &value); if (succeeded) { base::string16 read_value; succeeded = value->GetAsString(&read_value); @@ -190,14 +190,14 @@ bool TabProxy::ExecuteAndExtractString(const std::wstring& frame_xpath, bool TabProxy::ExecuteAndExtractBool(const std::wstring& frame_xpath, const std::wstring& jscript, bool* bool_value) { - scoped_ptr<Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); + scoped_ptr<base::Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); if (root == NULL) return false; bool read_value = false; - DCHECK(root->IsType(Value::TYPE_LIST)); - Value* value = NULL; - bool succeeded = static_cast<ListValue*>(root.get())->Get(0, &value); + DCHECK(root->IsType(base::Value::TYPE_LIST)); + base::Value* value = NULL; + bool succeeded = static_cast<base::ListValue*>(root.get())->Get(0, &value); if (succeeded) { succeeded = value->GetAsBoolean(&read_value); if (succeeded) { @@ -210,14 +210,14 @@ bool TabProxy::ExecuteAndExtractBool(const std::wstring& frame_xpath, bool TabProxy::ExecuteAndExtractInt(const std::wstring& frame_xpath, const std::wstring& jscript, int* int_value) { - scoped_ptr<Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); + scoped_ptr<base::Value> root(ExecuteAndExtractValue(frame_xpath, jscript)); if (root == NULL) return false; int read_value = 0; - DCHECK(root->IsType(Value::TYPE_LIST)); - Value* value = NULL; - bool succeeded = static_cast<ListValue*>(root.get())->Get(0, &value); + DCHECK(root->IsType(base::Value::TYPE_LIST)); + base::Value* value = NULL; + bool succeeded = static_cast<base::ListValue*>(root.get())->Get(0, &value); if (succeeded) { succeeded = value->GetAsInteger(&read_value); if (succeeded) { @@ -227,8 +227,8 @@ bool TabProxy::ExecuteAndExtractInt(const std::wstring& frame_xpath, return succeeded; } -Value* TabProxy::ExecuteAndExtractValue(const std::wstring& frame_xpath, - const std::wstring& jscript) { +base::Value* TabProxy::ExecuteAndExtractValue(const std::wstring& frame_xpath, + const std::wstring& jscript) { if (!is_valid()) return NULL; diff --git a/chrome/test/chromedriver/chrome/performance_logger_unittest.cc b/chrome/test/chromedriver/chrome/performance_logger_unittest.cc index 03498c8..fcddf3a 100644 --- a/chrome/test/chromedriver/chrome/performance_logger_unittest.cc +++ b/chrome/test/chromedriver/chrome/performance_logger_unittest.cc @@ -100,23 +100,23 @@ void FakeLog::AddEntryTimestamped(const base::Time& timestamp, entries_.push_back(new LogEntry(timestamp, level, source, message)); } -scoped_ptr<DictionaryValue> ParseDictionary(const std::string& json) { +scoped_ptr<base::DictionaryValue> ParseDictionary(const std::string& json) { std::string error; - scoped_ptr<Value> value(base::JSONReader::ReadAndReturnError( + scoped_ptr<base::Value> value(base::JSONReader::ReadAndReturnError( json, base::JSON_PARSE_RFC, NULL, &error)); if (value == NULL) { SCOPED_TRACE(json.c_str()); SCOPED_TRACE(error.c_str()); ADD_FAILURE(); - return scoped_ptr<DictionaryValue>(); + return scoped_ptr<base::DictionaryValue>(); } - DictionaryValue* dict = NULL; + base::DictionaryValue* dict = NULL; if (!value->GetAsDictionary(&dict)) { SCOPED_TRACE("JSON object is not a dictionary"); ADD_FAILURE(); - return scoped_ptr<DictionaryValue>(); + return scoped_ptr<base::DictionaryValue>(); } - return scoped_ptr<DictionaryValue>(dict->DeepCopy()); + return scoped_ptr<base::DictionaryValue>(dict->DeepCopy()); } void ValidateLogEntry(const LogEntry *entry, @@ -132,7 +132,7 @@ void ValidateLogEntry(const LogEntry *entry, std::string method; EXPECT_TRUE(message->GetString("message.method", &method)); EXPECT_EQ(expected_method, method); - DictionaryValue* params; + base::DictionaryValue* params; EXPECT_TRUE(message->GetDictionary("message.params", ¶ms)); EXPECT_EQ(0u, params->size()); } diff --git a/chrome/test/chromedriver/element_commands.cc b/chrome/test/chromedriver/element_commands.cc index dfe87db..7595a05 100644 --- a/chrome/test/chromedriver/element_commands.cc +++ b/chrome/test/chromedriver/element_commands.cc @@ -31,7 +31,7 @@ Status SendKeysToElement( Session* session, WebView* web_view, const std::string& element_id, - const ListValue* key_list) { + const base::ListValue* key_list) { bool is_displayed = false; bool is_focused = false; base::TimeTicks start_time = base::TimeTicks::Now(); diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc index 8e0ef6b..a80aa46 100644 --- a/chrome/test/chromedriver/session_commands.cc +++ b/chrome/test/chromedriver/session_commands.cc @@ -197,7 +197,8 @@ Status ExecuteGetCurrentWindowHandle( if (status.IsError()) return status; - value->reset(new StringValue(WebViewIdToWindowHandle(web_view->GetId()))); + value->reset( + new base::StringValue(WebViewIdToWindowHandle(web_view->GetId()))); return Status(kOk); } diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc index d33a15f..988cdd7 100644 --- a/chrome/test/nacl/nacl_browsertest_util.cc +++ b/chrome/test/nacl/nacl_browsertest_util.cc @@ -23,7 +23,7 @@ typedef TestMessageHandler::MessageResponse MessageResponse; MessageResponse StructuredMessageHandler::HandleMessage( const std::string& json) { - scoped_ptr<Value> value; + scoped_ptr<base::Value> value; base::JSONReader reader(base::JSON_ALLOW_TRAILING_COMMAS); // Automation messages are stringified before they are sent because the // automation channel cannot handle arbitrary objects. This means we @@ -42,7 +42,7 @@ MessageResponse StructuredMessageHandler::HandleMessage( return InternalError("Could not parse message JSON: " + temp + " because " + reader.GetErrorMessage()); - DictionaryValue* msg; + base::DictionaryValue* msg; if (!value->GetAsDictionary(&msg)) return InternalError("Message was not an object: " + temp); @@ -77,7 +77,7 @@ void LoadTestMessageHandler::Log(const std::string& type, MessageResponse LoadTestMessageHandler::HandleStructuredMessage( const std::string& type, - DictionaryValue* msg) { + base::DictionaryValue* msg) { if (type == "Log") { std::string message; if (!msg->GetString("message", &message)) @@ -133,7 +133,7 @@ void NaClIntegrationMessageHandler::Log(const std::string& message) { MessageResponse NaClIntegrationMessageHandler::HandleStructuredMessage( const std::string& type, - DictionaryValue* msg) { + base::DictionaryValue* msg) { if (type == "TestLog") { std::string message; if (!msg->GetString("message", &message)) diff --git a/chrome/test/perf/dom_checker_uitest.cc b/chrome/test/perf/dom_checker_uitest.cc index 9fa3f4d..dcd5e32 100644 --- a/chrome/test/perf/dom_checker_uitest.cc +++ b/chrome/test/perf/dom_checker_uitest.cc @@ -178,24 +178,24 @@ class DomCheckerTest : public UITest { std::string json = WideToUTF8(json_wide); JSONStringValueSerializer deserializer(json); - scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); + scoped_ptr<base::Value> value(deserializer.Deserialize(NULL, NULL)); EXPECT_TRUE(value.get()); if (!value.get()) return false; - EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); - if (!value->IsType(Value::TYPE_LIST)) + EXPECT_TRUE(value->IsType(base::Value::TYPE_LIST)); + if (!value->IsType(base::Value::TYPE_LIST)) return false; - ListValue* list_value = static_cast<ListValue*>(value.get()); + base::ListValue* list_value = static_cast<base::ListValue*>(value.get()); // The parsed JSON object will be an array of strings, each of which is a // test failure. Add those strings to the results set. - ListValue::const_iterator it = list_value->begin(); + base::ListValue::const_iterator it = list_value->begin(); for (; it != list_value->end(); ++it) { - EXPECT_TRUE((*it)->IsType(Value::TYPE_STRING)); - if ((*it)->IsType(Value::TYPE_STRING)) { + EXPECT_TRUE((*it)->IsType(base::Value::TYPE_STRING)); + if ((*it)->IsType(base::Value::TYPE_STRING)) { std::string test_name; succeeded = (*it)->GetAsString(&test_name); EXPECT_TRUE(succeeded); diff --git a/chrome/test/perf/perf_ui_test_suite.cc b/chrome/test/perf/perf_ui_test_suite.cc index 1f37d02..e35812d 100644 --- a/chrome/test/perf/perf_ui_test_suite.cc +++ b/chrome/test/perf/perf_ui_test_suite.cc @@ -139,8 +139,9 @@ void PerfUITestSuite::BuildCachedThemePakIn( std::string error; JSONFileValueSerializer serializer( extension_base.AppendASCII("manifest.json")); - scoped_ptr<DictionaryValue> valid_value(static_cast<DictionaryValue*>( - serializer.Deserialize(&error_code, &error))); + scoped_ptr<base::DictionaryValue> valid_value( + static_cast<base::DictionaryValue*>( + serializer.Deserialize(&error_code, &error))); if (error_code != 0 || !valid_value) LOG(FATAL) << "Error parsing theme manifest: " << error; diff --git a/chrome/test/perf/rendering/throughput_tests.cc b/chrome/test/perf/rendering/throughput_tests.cc index abcbe93..08da527 100644 --- a/chrome/test/perf/rendering/throughput_tests.cc +++ b/chrome/test/perf/rendering/throughput_tests.cc @@ -85,13 +85,13 @@ class ThroughputTest : public BrowserPerfTest { scoped_ptr<base::Value> root; root.reset(base::JSONReader::Read(json)); - ListValue* root_list = NULL; + base::ListValue* root_list = NULL; if (!root.get() || !root->GetAsList(&root_list)) { LOG(ERROR) << "JSON missing root list element"; return false; } - DictionaryValue* item = NULL; + base::DictionaryValue* item = NULL; if (!root_list->GetDictionary(index, &item)) { LOG(ERROR) << "index " << index << " not found in JSON"; return false; @@ -123,10 +123,10 @@ class ThroughputTest : public BrowserPerfTest { if (item->GetInteger("run_time", &num)) run_time_ms_ = num * 1000; - DictionaryValue* pixel = NULL; + base::DictionaryValue* pixel = NULL; if (item->GetDictionary("wait_pixel", &pixel)) { int x, y, r, g, b; - ListValue* color; + base::ListValue* color; if (pixel->GetInteger("x", &x) && pixel->GetInteger("y", &y) && pixel->GetString("op", &str) && diff --git a/chrome/test/ui/javascript_test_util.cc b/chrome/test/ui/javascript_test_util.cc index c0ded05..e643a5d 100644 --- a/chrome/test/ui/javascript_test_util.cc +++ b/chrome/test/ui/javascript_test_util.cc @@ -16,7 +16,7 @@ bool JsonDictionaryToMap(const std::string& json, std::map<std::string, std::string>* results) { DCHECK(results != NULL); JSONStringValueSerializer deserializer(json); - scoped_ptr<Value> root(deserializer.Deserialize(NULL, NULL)); + scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, NULL)); // Note that we don't use ASSERT_TRUE here (and in some other places) as it // doesn't work inside a function with a return type other than void. @@ -24,13 +24,13 @@ bool JsonDictionaryToMap(const std::string& json, if (!root.get()) return false; - EXPECT_TRUE(root->IsType(Value::TYPE_DICTIONARY)); - if (!root->IsType(Value::TYPE_DICTIONARY)) + EXPECT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY)); + if (!root->IsType(base::Value::TYPE_DICTIONARY)) return false; - DictionaryValue* dict = static_cast<DictionaryValue*>(root.get()); + base::DictionaryValue* dict = static_cast<base::DictionaryValue*>(root.get()); - for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { + for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { double double_result; std::string result; if (it.value().GetAsString(&result)) { diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index e202ea8..c244eea 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -529,26 +529,28 @@ bool UITest::GetBrowserProcessCount(int* count) { return true; } -static DictionaryValue* LoadDictionaryValueFromPath( +static base::DictionaryValue* LoadDictionaryValueFromPath( const base::FilePath& path) { if (path.empty()) return NULL; JSONFileValueSerializer serializer(path); - scoped_ptr<Value> root_value(serializer.Deserialize(NULL, NULL)); - if (!root_value.get() || root_value->GetType() != Value::TYPE_DICTIONARY) + scoped_ptr<base::Value> root_value(serializer.Deserialize(NULL, NULL)); + if (!root_value.get() || + root_value->GetType() != base::Value::TYPE_DICTIONARY) { return NULL; + } - return static_cast<DictionaryValue*>(root_value.release()); + return static_cast<base::DictionaryValue*>(root_value.release()); } -DictionaryValue* UITest::GetLocalState() { +base::DictionaryValue* UITest::GetLocalState() { base::FilePath local_state_path; PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); return LoadDictionaryValueFromPath(local_state_path); } -DictionaryValue* UITest::GetDefaultProfilePreferences() { +base::DictionaryValue* UITest::GetDefaultProfilePreferences() { base::FilePath path; PathService::Get(chrome::DIR_USER_DATA, &path); path = path.AppendASCII(TestingProfile::kTestUserProfileDir); @@ -669,7 +671,7 @@ void UITest::TerminateBrowser() { launcher_->TerminateBrowser(); // Make sure the UMA metrics say we didn't crash. - scoped_ptr<DictionaryValue> local_prefs(GetLocalState()); + scoped_ptr<base::DictionaryValue> local_prefs(GetLocalState()); bool exited_cleanly; ASSERT_TRUE(local_prefs.get()); ASSERT_TRUE(local_prefs->GetBoolean(prefs::kStabilityExitedCleanly, @@ -683,7 +685,8 @@ void UITest::TerminateBrowser() { ASSERT_TRUE(session_end_completed); // Make sure session restore says we didn't crash. - scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences()); + scoped_ptr<base::DictionaryValue> profile_prefs( + GetDefaultProfilePreferences()); ASSERT_TRUE(profile_prefs.get()); std::string exit_type; ASSERT_TRUE(profile_prefs->GetString(prefs::kSessionExitedCleanly, diff --git a/chrome/tools/profile_reset/jtl_compiler.cc b/chrome/tools/profile_reset/jtl_compiler.cc index 00ed0c4..df6a9ee 100644 --- a/chrome/tools/profile_reset/jtl_compiler.cc +++ b/chrome/tools/profile_reset/jtl_compiler.cc @@ -92,7 +92,7 @@ class InstructionSet { JtlCompiler::CompileError::ErrorCode TranscodeInstruction( const std::string& name, - const ListValue& arguments, + const base::ListValue& arguments, bool ends_sentence, const jtl::Hasher& hasher, ByteCodeWriter* target) const { @@ -224,7 +224,7 @@ bool JtlCompiler::Compile(const std::string& source_code, JtlParser parser(compacted_source_code, newline_indices); while (!parser.HasFinished()) { std::string operation_name; - ListValue arguments; + base::ListValue arguments; bool ends_sentence = false; if (!parser.ParseNextOperation( &operation_name, &arguments, &ends_sentence)) { diff --git a/chrome/tools/profile_reset/jtl_parser.cc b/chrome/tools/profile_reset/jtl_parser.cc index 9c9bdbb..c1d9c15 100644 --- a/chrome/tools/profile_reset/jtl_parser.cc +++ b/chrome/tools/profile_reset/jtl_parser.cc @@ -147,7 +147,7 @@ bool JtlParser::ParseNextOperation(std::string* name, new base::FundamentalValue(boolean_value == kTrueKeyword)); } else { // |string_value| might be empty for an empty string - argument_list->Append(new StringValue(string_value)); + argument_list->Append(new base::StringValue(string_value)); } } return true; diff --git a/chrome/utility/importer/external_process_importer_bridge.cc b/chrome/utility/importer/external_process_importer_bridge.cc index 813bdd8..c399d52 100644 --- a/chrome/utility/importer/external_process_importer_bridge.cc +++ b/chrome/utility/importer/external_process_importer_bridge.cc @@ -29,7 +29,7 @@ const int kNumFaviconsToSend = 100; } ExternalProcessImporterBridge::ExternalProcessImporterBridge( - const DictionaryValue& localized_strings, + const base::DictionaryValue& localized_strings, IPC::Sender* sender, base::TaskRunner* task_runner) : sender_(sender), |