summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/api/extension_action/action_info.cc4
-rw-r--r--chrome/common/extensions/api/extension_action/browser_action_handler.cc2
-rw-r--r--chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc2
-rw-r--r--chrome/common/extensions/api/extension_action/page_action_handler.cc4
-rw-r--r--chrome/common/extensions/api/extension_action/script_badge_handler.cc2
-rw-r--r--chrome/common/extensions/api/extension_api.cc69
-rw-r--r--chrome/common/extensions/api/extension_api.h4
-rw-r--r--chrome/common/extensions/api/extension_api_unittest.cc6
-rw-r--r--chrome/common/extensions/api/file_handlers/file_handlers_parser.cc12
-rw-r--r--chrome/common/extensions/api/identity/oauth2_manifest_handler.cc4
-rw-r--r--chrome/common/extensions/api/input_ime/input_components_handler.cc6
-rw-r--r--chrome/common/extensions/api/omnibox/omnibox_handler.cc2
-rw-r--r--chrome/common/extensions/api/plugins/plugins_handler.cc4
-rw-r--r--chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc8
-rw-r--r--chrome/common/extensions/api/spellcheck/spellcheck_handler.cc2
-rw-r--r--chrome/common/extensions/api/system_indicator/system_indicator_handler.cc2
-rw-r--r--chrome/common/extensions/background_info.cc12
-rw-r--r--chrome/common/extensions/command.cc14
-rw-r--r--chrome/common/extensions/command_unittest.cc10
-rw-r--r--chrome/common/extensions/extension.cc14
-rw-r--r--chrome/common/extensions/extension.h1
-rw-r--r--chrome/common/extensions/extension_builder.cc2
-rw-r--r--chrome/common/extensions/extension_file_util.cc13
-rw-r--r--chrome/common/extensions/extension_l10n_util.cc37
-rw-r--r--chrome/common/extensions/extension_l10n_util_unittest.cc50
-rw-r--r--chrome/common/extensions/extension_messages.cc2
-rw-r--r--chrome/common/extensions/extension_messages.h24
-rw-r--r--chrome/common/extensions/extension_test_util.cc6
-rw-r--r--chrome/common/extensions/features/api_feature.cc2
-rw-r--r--chrome/common/extensions/features/api_feature.h2
-rw-r--r--chrome/common/extensions/features/base_feature_provider.cc35
-rw-r--r--chrome/common/extensions/features/base_feature_provider.h3
-rw-r--r--chrome/common/extensions/features/complex_feature_unittest.cc4
-rw-r--r--chrome/common/extensions/features/manifest_feature.cc2
-rw-r--r--chrome/common/extensions/features/manifest_feature.h2
-rw-r--r--chrome/common/extensions/features/permission_feature.cc2
-rw-r--r--chrome/common/extensions/features/permission_feature.h2
-rw-r--r--chrome/common/extensions/features/simple_feature.cc14
-rw-r--r--chrome/common/extensions/features/simple_feature.h2
-rw-r--r--chrome/common/extensions/features/simple_feature_unittest.cc2
-rw-r--r--chrome/common/extensions/manifest.h2
-rw-r--r--chrome/common/extensions/manifest_handlers/app_isolation_info.cc2
-rw-r--r--chrome/common/extensions/manifest_handlers/content_scripts_handler.cc18
-rw-r--r--chrome/common/extensions/manifest_handlers/icons_handler.cc2
-rw-r--r--chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc4
-rw-r--r--chrome/common/extensions/manifest_handlers/requirements_handler.cc13
-rw-r--r--chrome/common/extensions/manifest_handlers/shared_module_info.cc9
-rw-r--r--chrome/common/extensions/manifest_handlers/theme_handler.cc52
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifest_test.cc16
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifest_test.h12
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_manifest_version_unittest.cc8
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc5
-rw-r--r--chrome/common/extensions/manifest_url_handler.cc4
-rw-r--r--chrome/common/extensions/message_bundle.cc18
-rw-r--r--chrome/common/extensions/message_bundle_unittest.cc55
-rw-r--r--chrome/common/extensions/mime_types_handler.cc2
-rw-r--r--chrome/common/extensions/permissions/api_permission_set.cc6
-rw-r--r--chrome/common/extensions/permissions/permission_set_unittest.cc72
-rw-r--r--chrome/common/extensions/permissions/permissions_data.cc2
-rw-r--r--chrome/common/extensions/permissions/set_disjunction_permission.h2
-rw-r--r--chrome/common/extensions/sync_type_unittest.cc10
-rw-r--r--chrome/common/extensions/unpacker.cc16
-rw-r--r--chrome/common/extensions/value_builder.cc12
-rw-r--r--chrome/common/extensions/web_accessible_resources_handler.cc2
64 files changed, 373 insertions, 361 deletions
diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc
index fe44e9e..5714e68 100644
--- a/chrome/common/extensions/api/extension_action/action_info.cc
+++ b/chrome/common/extensions/api/extension_action/action_info.cc
@@ -60,10 +60,10 @@ scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension,
if (extension->manifest_version() == 1) {
// kPageActionIcons is obsolete, and used by very few extensions. Continue
// loading it, but only take the first icon as the default_icon path.
- const ListValue* icons = NULL;
+ const base::ListValue* icons = NULL;
if (dict->HasKey(keys::kPageActionIcons) &&
dict->GetList(keys::kPageActionIcons, &icons)) {
- for (ListValue::const_iterator iter = icons->begin();
+ for (base::ListValue::const_iterator iter = icons->begin();
iter != icons->end(); ++iter) {
std::string path;
if (!(*iter)->GetAsString(&path) ||
diff --git a/chrome/common/extensions/api/extension_action/browser_action_handler.cc b/chrome/common/extensions/api/extension_action/browser_action_handler.cc
index 3722483..0376745 100644
--- a/chrome/common/extensions/api/extension_action/browser_action_handler.cc
+++ b/chrome/common/extensions/api/extension_action/browser_action_handler.cc
@@ -25,7 +25,7 @@ BrowserActionHandler::~BrowserActionHandler() {
bool BrowserActionHandler::Parse(Extension* extension,
string16* error) {
- const DictionaryValue* dict = NULL;
+ const base::DictionaryValue* dict = NULL;
if (!extension->manifest()->GetDictionary(
extension_manifest_keys::kBrowserAction, &dict)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidBrowserAction);
diff --git a/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc b/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc
index b23228a..14a1b97 100644
--- a/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc
+++ b/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc
@@ -93,7 +93,7 @@ TEST_F(BrowserActionManifestTest,
TEST_F(BrowserActionManifestTest,
BrowserActionManifestIcons_InvalidDefaultIcon) {
- scoped_ptr<DictionaryValue> manifest_value = DictionaryBuilder()
+ scoped_ptr<base::DictionaryValue> manifest_value = DictionaryBuilder()
.Set("name", "Invalid default icon").Set("version", "1.0.0")
.Set("manifest_version", 2)
.Set("browser_action",
diff --git a/chrome/common/extensions/api/extension_action/page_action_handler.cc b/chrome/common/extensions/api/extension_action/page_action_handler.cc
index ffb9efd..f7b4b9c 100644
--- a/chrome/common/extensions/api/extension_action/page_action_handler.cc
+++ b/chrome/common/extensions/api/extension_action/page_action_handler.cc
@@ -25,10 +25,10 @@ PageActionHandler::~PageActionHandler() {
bool PageActionHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<ActionInfo> page_action_info;
- const DictionaryValue* page_action_value = NULL;
+ const base::DictionaryValue* page_action_value = NULL;
if (extension->manifest()->HasKey(keys::kPageActions)) {
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!extension->manifest()->GetList(keys::kPageActions, &list_value)) {
*error = ASCIIToUTF16(errors::kInvalidPageActionsList);
return false;
diff --git a/chrome/common/extensions/api/extension_action/script_badge_handler.cc b/chrome/common/extensions/api/extension_action/script_badge_handler.cc
index 408b1ad..e58f89a 100644
--- a/chrome/common/extensions/api/extension_action/script_badge_handler.cc
+++ b/chrome/common/extensions/api/extension_action/script_badge_handler.cc
@@ -49,7 +49,7 @@ bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) {
errors::kScriptBadgeRequiresFlag));
}
- const DictionaryValue* dict = NULL;
+ const base::DictionaryValue* dict = NULL;
if (!extension->manifest()->GetDictionary(keys::kScriptBadge, &dict)) {
*error = ASCIIToUTF16(errors::kInvalidScriptBadge);
return false;
diff --git a/chrome/common/extensions/api/extension_api.cc b/chrome/common/extensions/api/extension_api.cc
index 78899fc..9553f9c 100644
--- a/chrome/common/extensions/api/extension_api.cc
+++ b/chrome/common/extensions/api/extension_api.cc
@@ -27,10 +27,6 @@
#include "grit/extensions_api_resources.h"
#include "ui/base/resource/resource_bundle.h"
-using base::DictionaryValue;
-using base::ListValue;
-using base::Value;
-
namespace extensions {
using api::GeneratedSchemas;
@@ -47,10 +43,10 @@ base::StringPiece ReadFromResource(int resource_id) {
resource_id);
}
-scoped_ptr<ListValue> LoadSchemaList(const std::string& name,
- const base::StringPiece& schema) {
+scoped_ptr<base::ListValue> LoadSchemaList(const std::string& name,
+ const base::StringPiece& schema) {
std::string error_message;
- scoped_ptr<Value> result(
+ scoped_ptr<base::Value> result(
base::JSONReader::ReadAndReturnError(
schema,
base::JSON_PARSE_RFC | base::JSON_DETACHABLE_CHILDREN, // options
@@ -65,15 +61,16 @@ scoped_ptr<ListValue> LoadSchemaList(const std::string& name,
error_message.c_str());
CHECK(result.get()) << error_message << " for schema " << schema;
- CHECK(result->IsType(Value::TYPE_LIST)) << " for schema " << schema;
- return scoped_ptr<ListValue>(static_cast<ListValue*>(result.release()));
+ CHECK(result->IsType(base::Value::TYPE_LIST)) << " for schema " << schema;
+ return scoped_ptr<base::ListValue>(static_cast<base::ListValue*>(
+ result.release()));
}
-const DictionaryValue* FindListItem(const ListValue* list,
- const std::string& property_name,
- const std::string& property_value) {
+const base::DictionaryValue* FindListItem(const base::ListValue* list,
+ const std::string& property_name,
+ const std::string& property_value) {
for (size_t i = 0; i < list->GetSize(); ++i) {
- const DictionaryValue* item = NULL;
+ const base::DictionaryValue* item = NULL;
CHECK(list->GetDictionary(i, &item))
<< property_value << "/" << property_name;
std::string value;
@@ -84,11 +81,12 @@ const DictionaryValue* FindListItem(const ListValue* list,
return NULL;
}
-const DictionaryValue* GetSchemaChild(const DictionaryValue* schema_node,
- const std::string& child_name) {
- const DictionaryValue* child_node = NULL;
+const base::DictionaryValue* GetSchemaChild(
+ const base::DictionaryValue* schema_node,
+ const std::string& child_name) {
+ const base::DictionaryValue* child_node = NULL;
for (size_t i = 0; i < arraysize(kChildKinds); ++i) {
- const ListValue* list_node = NULL;
+ const base::ListValue* list_node = NULL;
if (!schema_node->GetList(kChildKinds[i], &list_node))
continue;
child_node = FindListItem(list_node, "name", child_name);
@@ -112,7 +110,7 @@ base::LazyInstance<Static> g_lazy_instance = LAZY_INSTANCE_INITIALIZER;
// with key |key| in |schema| will be updated to |schema_namespace| + "." +
// |schema[key]|.
void MaybePrefixFieldWithNamespace(const std::string& schema_namespace,
- DictionaryValue* schema,
+ base::DictionaryValue* schema,
const std::string& key) {
if (!schema->HasKey(key))
return;
@@ -126,17 +124,17 @@ void MaybePrefixFieldWithNamespace(const std::string& schema_namespace,
// Modify all "$ref" keys anywhere in |schema| to be prefxied by
// |schema_namespace| if they do not already specify a namespace.
void PrefixRefsWithNamespace(const std::string& schema_namespace,
- Value* value) {
- ListValue* list = NULL;
- DictionaryValue* dict = NULL;
+ base::Value* value) {
+ base::ListValue* list = NULL;
+ base::DictionaryValue* dict = NULL;
if (value->GetAsList(&list)) {
- for (ListValue::iterator i = list->begin(); i != list->end(); ++i) {
+ for (base::ListValue::iterator i = list->begin(); i != list->end(); ++i) {
PrefixRefsWithNamespace(schema_namespace, *i);
}
} else if (value->GetAsDictionary(&dict)) {
MaybePrefixFieldWithNamespace(schema_namespace, dict, "$ref");
- for (DictionaryValue::Iterator i(*dict); !i.IsAtEnd(); i.Advance()) {
- Value* value = NULL;
+ for (base::DictionaryValue::Iterator i(*dict); !i.IsAtEnd(); i.Advance()) {
+ base::Value* value = NULL;
CHECK(dict->GetWithoutPathExpansion(i.key(), &value));
PrefixRefsWithNamespace(schema_namespace, value);
}
@@ -146,15 +144,15 @@ void PrefixRefsWithNamespace(const std::string& schema_namespace,
// Modify all objects in the "types" section of the schema to be prefixed by
// |schema_namespace| if they do not already specify a namespace.
void PrefixTypesWithNamespace(const std::string& schema_namespace,
- DictionaryValue* schema) {
+ base::DictionaryValue* schema) {
if (!schema->HasKey("types"))
return;
// Add the namespace to all of the types defined in this schema
- ListValue *types = NULL;
+ base::ListValue *types = NULL;
CHECK(schema->GetList("types", &types));
for (size_t i = 0; i < types->GetSize(); ++i) {
- DictionaryValue *type = NULL;
+ base::DictionaryValue *type = NULL;
CHECK(types->GetDictionary(i, &type));
MaybePrefixFieldWithNamespace(schema_namespace, type, "id");
MaybePrefixFieldWithNamespace(schema_namespace, type, "customBindings");
@@ -163,7 +161,7 @@ void PrefixTypesWithNamespace(const std::string& schema_namespace,
// Modify the schema so that all types are fully qualified.
void PrefixWithNamespace(const std::string& schema_namespace,
- DictionaryValue* schema) {
+ base::DictionaryValue* schema) {
PrefixTypesWithNamespace(schema_namespace, schema);
PrefixRefsWithNamespace(schema_namespace, schema);
}
@@ -200,16 +198,16 @@ void ExtensionAPI::SplitDependencyName(const std::string& full_name,
void ExtensionAPI::LoadSchema(const std::string& name,
const base::StringPiece& schema) {
- scoped_ptr<ListValue> schema_list(LoadSchemaList(name, schema));
+ scoped_ptr<base::ListValue> schema_list(LoadSchemaList(name, schema));
std::string schema_namespace;
while (!schema_list->empty()) {
- DictionaryValue* schema = NULL;
+ base::DictionaryValue* schema = NULL;
{
- Value* value = NULL;
+ base::Value* value = NULL;
schema_list->Remove(schema_list->GetSize() - 1, &value);
- CHECK(value->IsType(Value::TYPE_DICTIONARY));
- schema = static_cast<DictionaryValue*>(value);
+ CHECK(value->IsType(base::Value::TYPE_DICTIONARY));
+ schema = static_cast<base::DictionaryValue*>(value);
}
CHECK(schema->GetString("namespace", &schema_namespace));
@@ -343,11 +341,12 @@ bool ExtensionAPI::IsPrivileged(const std::string& full_name) {
feature->GetContexts()->count(Feature::BLESSED_EXTENSION_CONTEXT);
}
-const DictionaryValue* ExtensionAPI::GetSchema(const std::string& full_name) {
+const base::DictionaryValue* ExtensionAPI::GetSchema(
+ const std::string& full_name) {
std::string child_name;
std::string api_name = GetAPINameFromFullName(full_name, &child_name);
- const DictionaryValue* result = NULL;
+ const base::DictionaryValue* result = NULL;
SchemaMap::iterator maybe_schema = schemas_.find(api_name);
if (maybe_schema != schemas_.end()) {
result = maybe_schema->second.get();
diff --git a/chrome/common/extensions/api/extension_api.h b/chrome/common/extensions/api/extension_api.h
index 8fb4f3f..2d5845b 100644
--- a/chrome/common/extensions/api/extension_api.h
+++ b/chrome/common/extensions/api/extension_api.h
@@ -21,7 +21,6 @@
namespace base {
class DictionaryValue;
-class ListValue;
class Value;
}
@@ -125,7 +124,8 @@ class ExtensionAPI {
UnloadedSchemaMap unloaded_schemas_;
// Schemas for each namespace.
- typedef std::map<std::string, linked_ptr<const DictionaryValue> > SchemaMap;
+ typedef std::map<std::string, linked_ptr<const base::DictionaryValue> >
+ SchemaMap;
SchemaMap schemas_;
// FeatureProviders used for resolving dependencies.
diff --git a/chrome/common/extensions/api/extension_api_unittest.cc b/chrome/common/extensions/api/extension_api_unittest.cc
index 2efd202..a900ab2 100644
--- a/chrome/common/extensions/api/extension_api_unittest.cc
+++ b/chrome/common/extensions/api/extension_api_unittest.cc
@@ -130,7 +130,7 @@ TEST(ExtensionAPITest, IsPrivilegedFeatures) {
ASSERT_TRUE(file_util::ReadFileToString(
api_features_path, &api_features_str)) << "privileged_api_features.json";
- scoped_ptr<base::DictionaryValue> value(static_cast<DictionaryValue*>(
+ scoped_ptr<base::DictionaryValue> value(static_cast<base::DictionaryValue*>(
base::JSONReader::Read(api_features_str)));
BaseFeatureProvider api_feature_provider(*value, CreateAPIFeature);
@@ -226,7 +226,7 @@ TEST(ExtensionAPITest, APIFeatures) {
ASSERT_TRUE(file_util::ReadFileToString(
api_features_path, &api_features_str)) << "api_features.json";
- scoped_ptr<base::DictionaryValue> value(static_cast<DictionaryValue*>(
+ scoped_ptr<base::DictionaryValue> value(static_cast<base::DictionaryValue*>(
base::JSONReader::Read(api_features_str)));
BaseFeatureProvider api_feature_provider(*value, CreateAPIFeature);
@@ -278,7 +278,7 @@ TEST(ExtensionAPITest, IsAnyFeatureAvailableToContext) {
ASSERT_TRUE(file_util::ReadFileToString(
api_features_path, &api_features_str)) << "api_features.json";
- scoped_ptr<base::DictionaryValue> value(static_cast<DictionaryValue*>(
+ scoped_ptr<base::DictionaryValue> value(static_cast<base::DictionaryValue*>(
base::JSONReader::Read(api_features_str)));
BaseFeatureProvider api_feature_provider(*value, CreateAPIFeature);
diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
index 884872d..78469f6 100644
--- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
+++ b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
@@ -37,7 +37,7 @@ FileHandlersParser::~FileHandlersParser() {
}
bool LoadFileHandler(const std::string& handler_id,
- const DictionaryValue& handler_info,
+ const base::DictionaryValue& handler_info,
std::vector<FileHandlerInfo>* file_handlers,
string16* error) {
DCHECK(error);
@@ -45,7 +45,7 @@ bool LoadFileHandler(const std::string& handler_id,
handler.id = handler_id;
- const ListValue* mime_types = NULL;
+ const base::ListValue* mime_types = NULL;
if (handler_info.HasKey(keys::kFileHandlerTypes) &&
!handler_info.GetList(keys::kFileHandlerTypes, &mime_types)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
@@ -53,7 +53,7 @@ bool LoadFileHandler(const std::string& handler_id,
return false;
}
- const ListValue* file_extensions = NULL;
+ const base::ListValue* file_extensions = NULL;
if (handler_info.HasKey(keys::kFileHandlerExtensions) &&
!handler_info.GetList(keys::kFileHandlerExtensions, &file_extensions)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
@@ -109,7 +109,7 @@ bool LoadFileHandler(const std::string& handler_id,
bool FileHandlersParser::Parse(Extension* extension, string16* error) {
scoped_ptr<FileHandlers> info(new FileHandlers);
- const DictionaryValue* all_handlers = NULL;
+ const base::DictionaryValue* all_handlers = NULL;
if (!extension->manifest()->GetDictionary(keys::kFileHandlers,
&all_handlers)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidFileHandlers);
@@ -118,10 +118,10 @@ bool FileHandlersParser::Parse(Extension* extension, 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 file handler entry is a title and a list of MIME types to handle.
- const DictionaryValue* handler = NULL;
+ const base::DictionaryValue* handler = NULL;
if (iter.value().GetAsDictionary(&handler)) {
if (!LoadFileHandler(iter.key(), *handler, &info->file_handlers, error))
return false;
diff --git a/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc b/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc
index dc97082..5bb617d 100644
--- a/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc
+++ b/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc
@@ -47,7 +47,7 @@ OAuth2ManifestHandler::~OAuth2ManifestHandler() {
bool OAuth2ManifestHandler::Parse(Extension* extension,
string16* error) {
scoped_ptr<OAuth2Info> info(new OAuth2Info);
- const DictionaryValue* dict = NULL;
+ const base::DictionaryValue* dict = NULL;
if (!extension->manifest()->GetDictionary(keys::kOAuth2, &dict) ||
!dict->GetString(kClientId, &info->client_id) ||
info->client_id.empty()) {
@@ -55,7 +55,7 @@ bool OAuth2ManifestHandler::Parse(Extension* extension,
return false;
}
- const ListValue* list = NULL;
+ const base::ListValue* list = NULL;
if (!dict->GetList(kScopes, &list)) {
*error = ASCIIToUTF16(errors::kInvalidOAuth2Scopes);
return false;
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 e9eac97..274bf44 100644
--- a/chrome/common/extensions/api/input_ime/input_components_handler.cc
+++ b/chrome/common/extensions/api/input_ime/input_components_handler.cc
@@ -49,13 +49,13 @@ InputComponentsHandler::~InputComponentsHandler() {
bool InputComponentsHandler::Parse(Extension* extension,
string16* error) {
scoped_ptr<InputComponents> info(new InputComponents);
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!extension->manifest()->GetList(keys::kInputComponents, &list_value)) {
*error = ASCIIToUTF16(errors::kInvalidInputComponents);
return false;
}
for (size_t i = 0; i < list_value->GetSize(); ++i) {
- const DictionaryValue* module_value = NULL;
+ const base::DictionaryValue* module_value = NULL;
std::string name_str;
InputComponentType type;
std::string id_str;
@@ -117,7 +117,7 @@ bool InputComponentsHandler::Parse(Extension* extension,
}
// Get input_components[i].layouts.
- const ListValue* layouts_value = NULL;
+ const base::ListValue* layouts_value = NULL;
if (module_value->GetList(keys::kLayouts, &layouts_value)) {
for (size_t j = 0; j < layouts_value->GetSize(); ++j) {
std::string layout_name_str;
diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.cc b/chrome/common/extensions/api/omnibox/omnibox_handler.cc
index 49a2bfc..7b95ac2 100644
--- a/chrome/common/extensions/api/omnibox/omnibox_handler.cc
+++ b/chrome/common/extensions/api/omnibox/omnibox_handler.cc
@@ -36,7 +36,7 @@ OmniboxHandler::~OmniboxHandler() {
bool OmniboxHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<OmniboxInfo> info(new OmniboxInfo);
- const DictionaryValue* dict = NULL;
+ const base::DictionaryValue* dict = NULL;
if (!extension->manifest()->GetDictionary(extension_manifest_keys::kOmnibox,
&dict) ||
!dict->GetString(kKeyword, &info->keyword) ||
diff --git a/chrome/common/extensions/api/plugins/plugins_handler.cc b/chrome/common/extensions/api/plugins/plugins_handler.cc
index 0621fa2..b918c5e 100644
--- a/chrome/common/extensions/api/plugins/plugins_handler.cc
+++ b/chrome/common/extensions/api/plugins/plugins_handler.cc
@@ -67,7 +67,7 @@ const std::vector<std::string> PluginsHandler::Keys() const {
}
bool PluginsHandler::Parse(Extension* extension, string16* error) {
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!extension->manifest()->GetList(keys::kPlugins, &list_value)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidPlugins);
return false;
@@ -76,7 +76,7 @@ bool PluginsHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<PluginManifestData> plugins_data(new PluginManifestData);
for (size_t i = 0; i < list_value->GetSize(); ++i) {
- const DictionaryValue* plugin_value = NULL;
+ const base::DictionaryValue* plugin_value = NULL;
if (!list_value->GetDictionary(i, &plugin_value)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidPlugins);
return false;
diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
index c01ef25..87f6226 100644
--- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
+++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
@@ -48,7 +48,7 @@ TtsEngineManifestHandler::~TtsEngineManifestHandler() {
bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<TtsVoices> info(new TtsVoices);
- const DictionaryValue* tts_dict = NULL;
+ const base::DictionaryValue* tts_dict = NULL;
if (!extension->manifest()->GetDictionary(keys::kTtsEngine, &tts_dict)) {
*error = ASCIIToUTF16(errors::kInvalidTts);
return false;
@@ -57,14 +57,14 @@ bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) {
if (!tts_dict->HasKey(keys::kTtsVoices))
return true;
- const ListValue* tts_voices = NULL;
+ const base::ListValue* tts_voices = NULL;
if (!tts_dict->GetList(keys::kTtsVoices, &tts_voices)) {
*error = ASCIIToUTF16(errors::kInvalidTtsVoices);
return false;
}
for (size_t i = 0; i < tts_voices->GetSize(); i++) {
- const DictionaryValue* one_tts_voice = NULL;
+ const base::DictionaryValue* one_tts_voice = NULL;
if (!tts_voices->GetDictionary(i, &one_tts_voice)) {
*error = ASCIIToUTF16(errors::kInvalidTtsVoices);
return false;
@@ -96,7 +96,7 @@ bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) {
}
}
if (one_tts_voice->HasKey(keys::kTtsVoicesEventTypes)) {
- const ListValue* event_types_list;
+ const base::ListValue* event_types_list;
if (!one_tts_voice->GetList(
keys::kTtsVoicesEventTypes,
&event_types_list)) {
diff --git a/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc b/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc
index d910b29..039cd2b 100644
--- a/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc
+++ b/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc
@@ -25,7 +25,7 @@ SpellcheckHandler::~SpellcheckHandler() {
}
bool SpellcheckHandler::Parse(Extension* extension, string16* error) {
- const DictionaryValue* spellcheck_value = NULL;
+ const base::DictionaryValue* spellcheck_value = NULL;
if (!extension->manifest()->GetDictionary(keys::kSpellcheck,
&spellcheck_value)) {
*error = ASCIIToUTF16(errors::kInvalidSpellcheck);
diff --git a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
index ceee099..792a2c4 100644
--- a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
+++ b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
@@ -22,7 +22,7 @@ SystemIndicatorHandler::~SystemIndicatorHandler() {
}
bool SystemIndicatorHandler::Parse(Extension* extension, string16* error) {
- const DictionaryValue* system_indicator_value = NULL;
+ const base::DictionaryValue* system_indicator_value = NULL;
if (!extension->manifest()->GetDictionary(
extension_manifest_keys::kSystemIndicator, &system_indicator_value)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidSystemIndicator);
diff --git a/chrome/common/extensions/background_info.cc b/chrome/common/extensions/background_info.cc
index d1ee95c..c82b3a1 100644
--- a/chrome/common/extensions/background_info.cc
+++ b/chrome/common/extensions/background_info.cc
@@ -102,17 +102,17 @@ bool BackgroundInfo::Parse(const Extension* extension, string16* error) {
bool BackgroundInfo::LoadBackgroundScripts(const Extension* extension,
const std::string& key,
string16* error) {
- const Value* background_scripts_value = NULL;
+ const base::Value* background_scripts_value = NULL;
if (!extension->manifest()->Get(key, &background_scripts_value))
return true;
CHECK(background_scripts_value);
- if (background_scripts_value->GetType() != Value::TYPE_LIST) {
+ if (background_scripts_value->GetType() != base::Value::TYPE_LIST) {
*error = ASCIIToUTF16(errors::kInvalidBackgroundScripts);
return false;
}
- const ListValue* background_scripts = NULL;
+ const base::ListValue* background_scripts = NULL;
background_scripts_value->GetAsList(&background_scripts);
for (size_t i = 0; i < background_scripts->GetSize(); ++i) {
std::string script;
@@ -194,7 +194,7 @@ bool BackgroundInfo::LoadBackgroundPersistent(const Extension* extension,
return true;
}
- const Value* background_persistent = NULL;
+ const base::Value* background_persistent = NULL;
if (!extension->manifest()->Get(keys::kBackgroundPersistent,
&background_persistent))
return true;
@@ -214,12 +214,12 @@ bool BackgroundInfo::LoadBackgroundPersistent(const Extension* extension,
bool BackgroundInfo::LoadAllowJSAccess(const Extension* extension,
string16* error) {
- const Value* allow_js_access = NULL;
+ const base::Value* allow_js_access = NULL;
if (!extension->manifest()->Get(keys::kBackgroundAllowJsAccess,
&allow_js_access))
return true;
- if (!allow_js_access->IsType(Value::TYPE_BOOLEAN) ||
+ if (!allow_js_access->IsType(base::Value::TYPE_BOOLEAN) ||
!allow_js_access->GetAsBoolean(&allow_js_access_)) {
*error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccess);
return false;
diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
index fb8524d..5eb0ecf 100644
--- a/chrome/common/extensions/command.cc
+++ b/chrome/common/extensions/command.cc
@@ -320,7 +320,7 @@ std::string Command::AcceleratorToString(const ui::Accelerator& accelerator) {
return shortcut;
}
-bool Command::Parse(const DictionaryValue* command,
+bool Command::Parse(const base::DictionaryValue* command,
const std::string& command_name,
int index,
string16* error) {
@@ -344,10 +344,10 @@ bool Command::Parse(const DictionaryValue* command,
SuggestionMap suggestions;
// First try to parse the |suggested_key| as a dictionary.
- const DictionaryValue* suggested_key_dict;
+ const base::DictionaryValue* suggested_key_dict;
if (command->GetDictionary(keys::kSuggestedKey, &suggested_key_dict)) {
- for (DictionaryValue::Iterator iter(*suggested_key_dict); !iter.IsAtEnd();
- iter.Advance()) {
+ for (base::DictionaryValue::Iterator iter(*suggested_key_dict);
+ !iter.IsAtEnd(); iter.Advance()) {
// For each item in the dictionary, extract the platforms specified.
std::string suggested_key_string;
if (iter.value().GetAsString(&suggested_key_string) &&
@@ -441,9 +441,9 @@ bool Command::Parse(const DictionaryValue* command,
return true;
}
-DictionaryValue* Command::ToValue(const Extension* extension,
- bool active) const {
- DictionaryValue* extension_data = new DictionaryValue();
+base::DictionaryValue* Command::ToValue(const Extension* extension,
+ bool active) const {
+ base::DictionaryValue* extension_data = new base::DictionaryValue();
string16 command_description;
if (command_name() == values::kBrowserActionCommandEvent ||
diff --git a/chrome/common/extensions/command_unittest.cc b/chrome/common/extensions/command_unittest.cc
index 847add8..56b9686 100644
--- a/chrome/common/extensions/command_unittest.cc
+++ b/chrome/common/extensions/command_unittest.cc
@@ -104,7 +104,7 @@ TEST(CommandTest, ExtensionCommandParsing) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTests); ++i) {
// First parse the command as a simple string.
- scoped_ptr<DictionaryValue> input(new DictionaryValue);
+ scoped_ptr<base::DictionaryValue> input(new base::DictionaryValue);
input->SetString("suggested_key", kTests[i].key);
input->SetString("description", kTests[i].description);
@@ -128,8 +128,8 @@ TEST(CommandTest, ExtensionCommandParsing) {
// Now parse the command as a dictionary of multiple values.
if (kTests[i].key[0] != '\0') {
- input.reset(new DictionaryValue);
- DictionaryValue* key_dict = new DictionaryValue();
+ input.reset(new base::DictionaryValue);
+ base::DictionaryValue* key_dict = new base::DictionaryValue();
key_dict->SetString("default", kTests[i].key);
key_dict->SetString("windows", kTests[i].key);
key_dict->SetString("mac", kTests[i].key);
@@ -155,8 +155,8 @@ TEST(CommandTest, ExtensionCommandParsingFallback) {
// Test that platform specific keys are honored on each platform, despite
// fallback being given.
- scoped_ptr<DictionaryValue> input(new DictionaryValue);
- DictionaryValue* key_dict = new DictionaryValue();
+ scoped_ptr<base::DictionaryValue> input(new base::DictionaryValue);
+ base::DictionaryValue* key_dict = new base::DictionaryValue();
key_dict->SetString("default", "Ctrl+Shift+D");
key_dict->SetString("windows", "Ctrl+Shift+W");
key_dict->SetString("mac", "Ctrl+Shift+M");
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 1bdd380..7dbf7f7 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -125,7 +125,7 @@ const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI |
// static
scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
Manifest::Location location,
- const DictionaryValue& value,
+ const base::DictionaryValue& value,
int flags,
std::string* utf8_error) {
return Extension::Create(path,
@@ -140,15 +140,15 @@ scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
// with string16. See http://crbug.com/71980.
scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
Manifest::Location location,
- const DictionaryValue& value,
+ const base::DictionaryValue& value,
int flags,
const std::string& explicit_id,
std::string* utf8_error) {
DCHECK(utf8_error);
string16 error;
scoped_ptr<extensions::Manifest> manifest(
- new extensions::Manifest(location,
- scoped_ptr<DictionaryValue>(value.DeepCopy())));
+ new extensions::Manifest(
+ location, scoped_ptr<base::DictionaryValue>(value.DeepCopy())));
if (!InitExtensionID(manifest.get(), path, explicit_id, flags, &error)) {
*utf8_error = UTF16ToUTF8(error);
@@ -662,11 +662,11 @@ bool Extension::LoadExtent(const char* key,
const char* list_error,
const char* value_error,
string16* error) {
- const Value* temp_pattern_value = NULL;
+ const base::Value* temp_pattern_value = NULL;
if (!manifest_->Get(key, &temp_pattern_value))
return true;
- const ListValue* pattern_list = NULL;
+ const base::ListValue* pattern_list = NULL;
if (!temp_pattern_value->GetAsList(&pattern_list)) {
*error = ASCIIToUTF16(list_error);
return false;
@@ -812,7 +812,7 @@ bool Extension::CheckMinimumChromeVersion(string16* error) const {
return true;
}
-ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
+ExtensionInfo::ExtensionInfo(const base::DictionaryValue* manifest,
const std::string& id,
const base::FilePath& path,
Manifest::Location location)
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 61f0013..c000c80 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -37,7 +37,6 @@ class SkBitmap;
namespace base {
class DictionaryValue;
-class ListValue;
class Version;
}
diff --git a/chrome/common/extensions/extension_builder.cc b/chrome/common/extensions/extension_builder.cc
index 31b3f27..22739aa 100644
--- a/chrome/common/extensions/extension_builder.cc
+++ b/chrome/common/extensions/extension_builder.cc
@@ -38,7 +38,7 @@ ExtensionBuilder& ExtensionBuilder::SetLocation(Manifest::Location location) {
}
ExtensionBuilder& ExtensionBuilder::SetManifest(
- scoped_ptr<DictionaryValue> manifest) {
+ scoped_ptr<base::DictionaryValue> manifest) {
manifest_ = manifest.Pass();
return *this;
}
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index a0b4243..ce529b5 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -140,7 +140,8 @@ scoped_refptr<Extension> LoadExtension(const base::FilePath& extension_path,
Manifest::Location location,
int flags,
std::string* error) {
- scoped_ptr<DictionaryValue> manifest(LoadManifest(extension_path, error));
+ scoped_ptr<base::DictionaryValue> manifest(
+ LoadManifest(extension_path, error));
if (!manifest.get())
return NULL;
if (!extension_l10n_util::LocalizeExtension(extension_path, manifest.get(),
@@ -165,8 +166,8 @@ scoped_refptr<Extension> LoadExtension(const base::FilePath& extension_path,
return extension;
}
-DictionaryValue* LoadManifest(const base::FilePath& extension_path,
- std::string* error) {
+base::DictionaryValue* LoadManifest(const base::FilePath& extension_path,
+ std::string* error) {
base::FilePath manifest_path =
extension_path.Append(extensions::kManifestFilename);
if (!file_util::PathExists(manifest_path)) {
@@ -175,7 +176,7 @@ DictionaryValue* LoadManifest(const base::FilePath& extension_path,
}
JSONFileValueSerializer serializer(manifest_path);
- scoped_ptr<Value> root(serializer.Deserialize(NULL, error));
+ scoped_ptr<base::Value> root(serializer.Deserialize(NULL, error));
if (!root.get()) {
if (error->empty()) {
// If |error| is empty, than the file could not be read.
@@ -191,12 +192,12 @@ DictionaryValue* LoadManifest(const base::FilePath& extension_path,
return NULL;
}
- if (!root->IsType(Value::TYPE_DICTIONARY)) {
+ if (!root->IsType(base::Value::TYPE_DICTIONARY)) {
*error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_INVALID);
return NULL;
}
- return static_cast<DictionaryValue*>(root.release());
+ return static_cast<base::DictionaryValue*>(root.release());
}
std::vector<base::FilePath> FindPrivateKeyFiles(
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index 3e1ab3e..c31adb0 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -38,7 +38,7 @@ void SetProcessLocale(const std::string& locale) {
GetProcessLocale() = locale;
}
-std::string GetDefaultLocaleFromManifest(const DictionaryValue& manifest,
+std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest,
std::string* error) {
std::string default_locale;
if (manifest.GetString(keys::kDefaultLocale, &default_locale))
@@ -49,7 +49,7 @@ std::string GetDefaultLocaleFromManifest(const DictionaryValue& manifest,
}
-bool ShouldRelocalizeManifest(const DictionaryValue* manifest) {
+bool ShouldRelocalizeManifest(const base::DictionaryValue* manifest) {
if (!manifest)
return false;
@@ -64,7 +64,7 @@ bool ShouldRelocalizeManifest(const DictionaryValue* manifest) {
// Localizes manifest value for a given key.
static bool LocalizeManifestValue(const std::string& key,
const extensions::MessageBundle& messages,
- DictionaryValue* manifest,
+ base::DictionaryValue* manifest,
std::string* error) {
std::string result;
if (!manifest->GetString(key, &result))
@@ -78,7 +78,7 @@ static bool LocalizeManifestValue(const std::string& key,
}
bool LocalizeManifest(const extensions::MessageBundle& messages,
- DictionaryValue* manifest,
+ base::DictionaryValue* manifest,
std::string* error) {
// Initialize name.
std::string result;
@@ -112,11 +112,11 @@ bool LocalizeManifest(const extensions::MessageBundle& messages,
if (!LocalizeManifestValue(keys::kOmniboxKeyword, messages, manifest, error))
return false;
- ListValue* file_handlers = NULL;
+ base::ListValue* file_handlers = NULL;
if (manifest->GetList(keys::kFileBrowserHandlers, &file_handlers)) {
key.assign(keys::kFileBrowserHandlers);
for (size_t i = 0; i < file_handlers->GetSize(); i++) {
- DictionaryValue* handler = NULL;
+ base::DictionaryValue* handler = NULL;
if (!file_handlers->GetDictionary(i, &handler)) {
*error = errors::kInvalidFileBrowserHandler;
return false;
@@ -127,12 +127,12 @@ bool LocalizeManifest(const extensions::MessageBundle& messages,
}
}
- ListValue* media_galleries_handlers = NULL;
+ base::ListValue* media_galleries_handlers = NULL;
if (manifest->GetList(keys::kMediaGalleriesHandlers,
&media_galleries_handlers)) {
key.assign(keys::kMediaGalleriesHandlers);
for (size_t i = 0; i < media_galleries_handlers->GetSize(); i++) {
- DictionaryValue* handler = NULL;
+ base::DictionaryValue* handler = NULL;
if (!media_galleries_handlers->GetDictionary(i, &handler)) {
*error = errors::kInvalidMediaGalleriesHandler;
return false;
@@ -144,10 +144,10 @@ bool LocalizeManifest(const extensions::MessageBundle& messages,
}
// Initialize all input_components
- ListValue* input_components = NULL;
+ base::ListValue* input_components = NULL;
if (manifest->GetList(keys::kInputComponents, &input_components)) {
for (size_t i = 0; i < input_components->GetSize(); ++i) {
- DictionaryValue* module = NULL;
+ base::DictionaryValue* module = NULL;
if (!input_components->GetDictionary(i, &module)) {
*error = errors::kInvalidInputComponents;
return false;
@@ -174,7 +174,7 @@ bool LocalizeManifest(const extensions::MessageBundle& messages,
}
bool LocalizeExtension(const base::FilePath& extension_path,
- DictionaryValue* manifest,
+ base::DictionaryValue* manifest,
std::string* error) {
DCHECK(manifest);
@@ -289,14 +289,15 @@ bool GetValidLocales(const base::FilePath& locale_path,
// Loads contents of the messages file for given locale. If file is not found,
// or there was parsing error we return NULL and set |error|.
// Caller owns the returned object.
-static DictionaryValue* LoadMessageFile(const base::FilePath& locale_path,
- const std::string& locale,
- std::string* error) {
+static base::DictionaryValue* LoadMessageFile(
+ const base::FilePath& locale_path,
+ const std::string& locale,
+ std::string* error) {
std::string extension_locale = locale;
base::FilePath file = locale_path.AppendASCII(extension_locale)
.Append(extensions::kMessagesFilename);
JSONFileValueSerializer messages_serializer(file);
- Value *dictionary = messages_serializer.Deserialize(NULL, error);
+ base::Value *dictionary = messages_serializer.Deserialize(NULL, error);
if (!dictionary && error->empty()) {
// JSONFileValueSerializer just returns NULL if file cannot be found. It
// doesn't set the error, so we have to do it.
@@ -304,7 +305,7 @@ static DictionaryValue* LoadMessageFile(const base::FilePath& locale_path,
extension_locale.c_str());
}
- return static_cast<DictionaryValue*>(dictionary);
+ return static_cast<base::DictionaryValue*>(dictionary);
}
extensions::MessageBundle* LoadMessageCatalogs(
@@ -317,12 +318,12 @@ extensions::MessageBundle* LoadMessageCatalogs(
GetAllFallbackLocales(application_locale, default_locale,
&all_fallback_locales);
- std::vector<linked_ptr<DictionaryValue> > catalogs;
+ std::vector<linked_ptr<base::DictionaryValue> > catalogs;
for (size_t i = 0; i < all_fallback_locales.size(); ++i) {
// Skip all parent locales that are not supplied.
if (valid_locales.find(all_fallback_locales[i]) == valid_locales.end())
continue;
- linked_ptr<DictionaryValue> catalog(
+ linked_ptr<base::DictionaryValue> catalog(
LoadMessageFile(locale_path, all_fallback_locales[i], error));
if (!catalog.get()) {
// If locale is valid, but messages.json is corrupted or missing, return
diff --git a/chrome/common/extensions/extension_l10n_util_unittest.cc b/chrome/common/extensions/extension_l10n_util_unittest.cc
index 4b94fa0..e5194ffa 100644
--- a/chrome/common/extensions/extension_l10n_util_unittest.cc
+++ b/chrome/common/extensions/extension_l10n_util_unittest.cc
@@ -219,37 +219,37 @@ TEST(ExtensionL10nUtil, LoadMessageCatalogsDuplicateKeys) {
// Caller owns the returned object.
MessageBundle* CreateManifestBundle() {
- linked_ptr<DictionaryValue> catalog(new DictionaryValue);
+ linked_ptr<base::DictionaryValue> catalog(new base::DictionaryValue);
- DictionaryValue* name_tree = new DictionaryValue();
+ base::DictionaryValue* name_tree = new base::DictionaryValue();
name_tree->SetString("message", "name");
catalog->Set("name", name_tree);
- DictionaryValue* description_tree = new DictionaryValue();
+ base::DictionaryValue* description_tree = new base::DictionaryValue();
description_tree->SetString("message", "description");
catalog->Set("description", description_tree);
- DictionaryValue* action_title_tree = new DictionaryValue();
+ base::DictionaryValue* action_title_tree = new base::DictionaryValue();
action_title_tree->SetString("message", "action title");
catalog->Set("title", action_title_tree);
- DictionaryValue* omnibox_keyword_tree = new DictionaryValue();
+ base::DictionaryValue* omnibox_keyword_tree = new base::DictionaryValue();
omnibox_keyword_tree->SetString("message", "omnibox keyword");
catalog->Set("omnibox_keyword", omnibox_keyword_tree);
- DictionaryValue* file_handler_title_tree = new DictionaryValue();
+ base::DictionaryValue* file_handler_title_tree = new base::DictionaryValue();
file_handler_title_tree->SetString("message", "file handler title");
catalog->Set("file_handler_title", file_handler_title_tree);
- DictionaryValue* launch_local_path_tree = new DictionaryValue();
+ base::DictionaryValue* launch_local_path_tree = new base::DictionaryValue();
launch_local_path_tree->SetString("message", "main.html");
catalog->Set("launch_local_path", launch_local_path_tree);
- DictionaryValue* launch_web_url_tree = new DictionaryValue();
+ base::DictionaryValue* launch_web_url_tree = new base::DictionaryValue();
launch_web_url_tree->SetString("message", "http://www.google.com/");
catalog->Set("launch_web_url", launch_web_url_tree);
- std::vector<linked_ptr<DictionaryValue> > catalogs;
+ std::vector<linked_ptr<base::DictionaryValue> > catalogs;
catalogs.push_back(catalog);
std::string error;
@@ -261,7 +261,7 @@ MessageBundle* CreateManifestBundle() {
}
TEST(ExtensionL10nUtil, LocalizeEmptyManifest) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
std::string error;
scoped_ptr<MessageBundle> messages(CreateManifestBundle());
@@ -271,7 +271,7 @@ TEST(ExtensionL10nUtil, LocalizeEmptyManifest) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithoutNameMsgAndEmptyDescription) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "no __MSG");
std::string error;
scoped_ptr<MessageBundle> messages(CreateManifestBundle());
@@ -289,7 +289,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithoutNameMsgAndEmptyDescription) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithNameMsgAndEmptyDescription) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "__MSG_name__");
std::string error;
scoped_ptr<MessageBundle> messages(CreateManifestBundle());
@@ -307,7 +307,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithNameMsgAndEmptyDescription) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithLocalLaunchURL) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "name");
manifest.SetString(keys::kLaunchLocalPath, "__MSG_launch_local_path__");
std::string error;
@@ -324,7 +324,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithLocalLaunchURL) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithHostedLaunchURL) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "name");
manifest.SetString(keys::kLaunchWebURL, "__MSG_launch_web_url__");
std::string error;
@@ -341,7 +341,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithHostedLaunchURL) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithBadNameMsg) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "__MSG_name_is_bad__");
manifest.SetString(keys::kDescription, "__MSG_description__");
std::string error;
@@ -361,7 +361,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithBadNameMsg) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionDefaultTitleMsgs) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "__MSG_name__");
manifest.SetString(keys::kDescription, "__MSG_description__");
std::string action_title(keys::kBrowserAction);
@@ -389,7 +389,7 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionDefaultTitleMsgs) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionOmniboxMsgs) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "__MSG_name__");
manifest.SetString(keys::kDescription, "__MSG_description__");
manifest.SetString(keys::kOmniboxKeyword, "__MSG_omnibox_keyword__");
@@ -414,12 +414,12 @@ TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionOmniboxMsgs) {
}
TEST(ExtensionL10nUtil, LocalizeManifestWithNameDescriptionFileHandlerTitle) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "__MSG_name__");
manifest.SetString(keys::kDescription, "__MSG_description__");
- ListValue* handlers = new ListValue();
+ base::ListValue* handlers = new base::ListValue();
manifest.Set(keys::kFileBrowserHandlers, handlers);
- DictionaryValue* handler = new DictionaryValue();
+ base::DictionaryValue* handler = new base::DictionaryValue();
handlers->Append(handler);
handler->SetString(keys::kPageActionDefaultTitle,
"__MSG_file_handler_title__");
@@ -450,20 +450,20 @@ TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithNullManifest) {
// Try with default and current locales missing.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestEmptyManifest) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
EXPECT_FALSE(extension_l10n_util::ShouldRelocalizeManifest(&manifest));
}
// Try with missing current_locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithDefaultLocale) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kDefaultLocale, "en_US");
EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(&manifest));
}
// Try with missing default_locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithCurrentLocale) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kCurrentLocale,
extension_l10n_util::CurrentLocaleOrDefault());
EXPECT_FALSE(extension_l10n_util::ShouldRelocalizeManifest(&manifest));
@@ -471,7 +471,7 @@ TEST(ExtensionL10nUtil, ShouldRelocalizeManifestWithCurrentLocale) {
// Try with all data present, but with same current_locale as system locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocale) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kDefaultLocale, "en_US");
manifest.SetString(keys::kCurrentLocale,
extension_l10n_util::CurrentLocaleOrDefault());
@@ -480,7 +480,7 @@ TEST(ExtensionL10nUtil, ShouldRelocalizeManifestSameCurrentLocale) {
// Try with all data present, but with different current_locale.
TEST(ExtensionL10nUtil, ShouldRelocalizeManifestDifferentCurrentLocale) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kDefaultLocale, "en_US");
manifest.SetString(keys::kCurrentLocale, "sr");
EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(&manifest));
diff --git a/chrome/common/extensions/extension_messages.cc b/chrome/common/extensions/extension_messages.cc
index e32b48d..097a090 100644
--- a/chrome/common/extensions/extension_messages.cc
+++ b/chrome/common/extensions/extension_messages.cc
@@ -197,7 +197,7 @@ void ParamTraits<ExtensionMsg_Loaded_Params>::Write(Message* m,
bool ParamTraits<ExtensionMsg_Loaded_Params>::Read(const Message* m,
PickleIterator* iter,
param_type* p) {
- p->manifest.reset(new DictionaryValue());
+ p->manifest.reset(new base::DictionaryValue());
return ReadParam(m, iter, &p->location) &&
ReadParam(m, iter, &p->path) &&
ReadParam(m, iter, p->manifest.get()) &&
diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h
index 4ed96ff..708f0f6 100644
--- a/chrome/common/extensions/extension_messages.h
+++ b/chrome/common/extensions/extension_messages.h
@@ -37,7 +37,7 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_APIActionOrEvent_Params)
IPC_STRUCT_MEMBER(std::string, api_call)
// List of arguments.
- IPC_STRUCT_MEMBER(ListValue, arguments)
+ IPC_STRUCT_MEMBER(base::ListValue, arguments)
// Extra logging information.
IPC_STRUCT_MEMBER(std::string, extra)
@@ -55,7 +55,7 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_DOMAction_Params)
IPC_STRUCT_MEMBER(std::string, api_call)
// List of arguments.
- IPC_STRUCT_MEMBER(ListValue, arguments)
+ IPC_STRUCT_MEMBER(base::ListValue, arguments)
// Type of DOM API call.
IPC_STRUCT_MEMBER(int, call_type)
@@ -67,7 +67,7 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params)
IPC_STRUCT_MEMBER(std::string, name)
// List of message arguments.
- IPC_STRUCT_MEMBER(ListValue, arguments)
+ IPC_STRUCT_MEMBER(base::ListValue, arguments)
// Extension ID this request was sent from. This can be empty, in the case
// where we expose APIs to normal web pages using the extension function
@@ -206,7 +206,7 @@ struct ExtensionMsg_Loaded_Params {
std::string* error) const;
// The subset of the extension manifest data we send to renderers.
- linked_ptr<DictionaryValue> manifest;
+ linked_ptr<base::DictionaryValue> manifest;
// The location the extension was installed from.
extensions::Manifest::Location location;
@@ -287,7 +287,7 @@ struct ParamTraits<ExtensionMsg_Loaded_Params> {
IPC_MESSAGE_ROUTED4(ExtensionMsg_Response,
int /* request_id */,
bool /* success */,
- ListValue /* response wrapper (see comment above) */,
+ base::ListValue /* response wrapper (see comment above) */,
std::string /* error */)
// This message is optionally routed. If used as a control message, it will
@@ -302,7 +302,7 @@ IPC_MESSAGE_ROUTED5(ExtensionMsg_MessageInvoke,
std::string /* extension_id */,
std::string /* module_name */,
std::string /* function_name */,
- ListValue /* args */,
+ base::ListValue /* args */,
bool /* delivered as part of a user gesture */)
// Tell the renderer process all known extension function names.
@@ -420,13 +420,13 @@ IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse,
IPC_MESSAGE_ROUTED4(ExtensionMsg_DispatchOnConnect,
int /* target_port_id */,
std::string /* channel_name */,
- DictionaryValue /* source_tab */,
+ base::DictionaryValue /* source_tab */,
ExtensionMsg_ExternalConnectionInfo)
// Deliver a message sent with ExtensionHostMsg_PostMessage.
IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
int /* target_port_id */,
- ListValue /* message arguments, a 0-or-1 length list */)
+ base::ListValue /* message args, a 0-or-1 length list */)
// Dispatch the Port.onDisconnect event for message channels.
IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect,
@@ -493,7 +493,7 @@ IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RemoveLazyListener,
IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddFilteredListener,
std::string /* extension_id */,
std::string /* name */,
- DictionaryValue /* filter */,
+ base::DictionaryValue /* filter */,
bool /* lazy */)
// Notify the browser that the given extension is no longer interested in
@@ -501,7 +501,7 @@ IPC_MESSAGE_CONTROL4(ExtensionHostMsg_AddFilteredListener,
IPC_MESSAGE_CONTROL4(ExtensionHostMsg_RemoveFilteredListener,
std::string /* extension_id */,
std::string /* name */,
- DictionaryValue /* filter */,
+ base::DictionaryValue /* filter */,
bool /* lazy */)
// Notify the browser that an event has finished being dispatched.
@@ -536,7 +536,7 @@ IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab,
// by ViewHostMsg_OpenChannelTo*.
IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage,
int /* port_id */,
- ListValue /* message arguments, a 0-or-1 length list */)
+ base::ListValue /* message args, a 0-or-1 length list */)
// Send a message to an extension process. The handle is the value returned
// by ViewHostMsg_OpenChannelTo*.
@@ -556,7 +556,7 @@ IPC_MESSAGE_ROUTED5(
std::string /* error; empty implies success */,
int32 /* page_id the code executed on. May be -1 if unsuccessful */,
GURL /* URL of the code executed on. May be empty if unsuccessful. */,
- ListValue /* result of the script */)
+ base::ListValue /* result of the script */)
// Sent from the renderer to the browser to notify that content scripts are
// running in the renderer that the IPC originated from.
diff --git a/chrome/common/extensions/extension_test_util.cc b/chrome/common/extensions/extension_test_util.cc
index 20182ca..b0e13e3 100644
--- a/chrome/common/extensions/extension_test_util.cc
+++ b/chrome/common/extensions/extension_test_util.cc
@@ -19,7 +19,7 @@ using extensions::Manifest;
namespace extension_test_util {
scoped_refptr<Extension> CreateExtensionWithID(std::string id) {
- DictionaryValue values;
+ base::DictionaryValue values;
values.SetString(extension_manifest_keys::kName, "test");
values.SetString(extension_manifest_keys::kVersion, "0.1");
std::string error;
@@ -40,10 +40,10 @@ scoped_refptr<Extension> LoadManifestUnchecked(const std::string& dir,
.AppendASCII(test_file);
JSONFileValueSerializer serializer(path);
- scoped_ptr<Value> result(serializer.Deserialize(NULL, error));
+ scoped_ptr<base::Value> result(serializer.Deserialize(NULL, error));
if (!result)
return NULL;
- const DictionaryValue* dict;
+ const base::DictionaryValue* dict;
CHECK(result->GetAsDictionary(&dict));
scoped_refptr<Extension> extension = Extension::Create(
diff --git a/chrome/common/extensions/features/api_feature.cc b/chrome/common/extensions/features/api_feature.cc
index f6d826e..d53d105 100644
--- a/chrome/common/extensions/features/api_feature.cc
+++ b/chrome/common/extensions/features/api_feature.cc
@@ -16,7 +16,7 @@ bool APIFeature::IsInternal() const {
return internal_;
}
-std::string APIFeature::Parse(const DictionaryValue* value) {
+std::string APIFeature::Parse(const base::DictionaryValue* value) {
std::string error = SimpleFeature::Parse(value);
if (!error.empty())
return error;
diff --git a/chrome/common/extensions/features/api_feature.h b/chrome/common/extensions/features/api_feature.h
index edd58d1..92e060e 100644
--- a/chrome/common/extensions/features/api_feature.h
+++ b/chrome/common/extensions/features/api_feature.h
@@ -16,7 +16,7 @@ class APIFeature : public SimpleFeature {
virtual bool IsInternal() const OVERRIDE;
- virtual std::string Parse(const DictionaryValue* value) OVERRIDE;
+ virtual std::string Parse(const base::DictionaryValue* value) OVERRIDE;
private:
bool internal_;
diff --git a/chrome/common/extensions/features/base_feature_provider.cc b/chrome/common/extensions/features/base_feature_provider.cc
index 4d4d06d..c32ba5e 100644
--- a/chrome/common/extensions/features/base_feature_provider.cc
+++ b/chrome/common/extensions/features/base_feature_provider.cc
@@ -61,18 +61,18 @@ class LazyFeatureProvider : public FeatureProvider {
resource_id_).as_string();
int error_code = 0;
std::string error_message;
- scoped_ptr<Value> value(base::JSONReader::ReadAndReturnError(
+ scoped_ptr<base::Value> value(base::JSONReader::ReadAndReturnError(
features_file, base::JSON_PARSE_RFC,
&error_code, &error_message));
DCHECK(value) << "Could not load features: " << name_ << " "
<< error_message;
- scoped_ptr<DictionaryValue> value_as_dict;
+ scoped_ptr<base::DictionaryValue> value_as_dict;
if (value) {
- CHECK(value->IsType(Value::TYPE_DICTIONARY)) << name_;
- value_as_dict.reset(static_cast<DictionaryValue*>(value.release()));
+ CHECK(value->IsType(base::Value::TYPE_DICTIONARY)) << name_;
+ value_as_dict.reset(static_cast<base::DictionaryValue*>(value.release()));
} else {
// http://crbug.com/176381
- value_as_dict.reset(new DictionaryValue());
+ value_as_dict.reset(new base::DictionaryValue());
}
return make_scoped_ptr(new BaseFeatureProvider(*value_as_dict, factory_));
}
@@ -113,7 +113,7 @@ struct Static {
base::LazyInstance<Static> g_static = LAZY_INSTANCE_INITIALIZER;
-bool ParseFeature(const DictionaryValue* value,
+bool ParseFeature(const base::DictionaryValue* value,
const std::string& name,
SimpleFeature* feature) {
feature->set_name(name);
@@ -125,12 +125,13 @@ bool ParseFeature(const DictionaryValue* value,
} // namespace
-BaseFeatureProvider::BaseFeatureProvider(const DictionaryValue& root,
+BaseFeatureProvider::BaseFeatureProvider(const base::DictionaryValue& root,
FeatureFactory factory)
: factory_(factory ? factory :
static_cast<FeatureFactory>(&CreateFeature<SimpleFeature>)) {
- for (DictionaryValue::Iterator iter(root); !iter.IsAtEnd(); iter.Advance()) {
- if (iter.value().GetType() == Value::TYPE_DICTIONARY) {
+ for (base::DictionaryValue::Iterator iter(root); !iter.IsAtEnd();
+ iter.Advance()) {
+ if (iter.value().GetType() == base::Value::TYPE_DICTIONARY) {
linked_ptr<SimpleFeature> feature((*factory_)());
std::vector<std::string> split;
@@ -140,12 +141,13 @@ BaseFeatureProvider::BaseFeatureProvider(const DictionaryValue& root,
// If one of the features has "noparent" set, stop pushing features on
// the stack. The features will then be parsed in order, starting with
// the farthest parent that is either top level or has "noparent" set.
- std::stack<std::pair<std::string, const DictionaryValue*> > parse_stack;
+ std::stack<std::pair<std::string, const base::DictionaryValue*> >
+ parse_stack;
while (!split.empty()) {
std::string parent_name = JoinString(split, '.');
split.pop_back();
if (root.HasKey(parent_name)) {
- const DictionaryValue* parent = NULL;
+ const base::DictionaryValue* parent = NULL;
CHECK(root.GetDictionaryWithoutPathExpansion(parent_name, &parent));
parse_stack.push(std::make_pair(parent_name, parent));
bool no_parent = false;
@@ -172,24 +174,25 @@ BaseFeatureProvider::BaseFeatureProvider(const DictionaryValue& root,
continue;
features_[iter.key()] = feature;
- } else if (iter.value().GetType() == Value::TYPE_LIST) {
+ } else if (iter.value().GetType() == base::Value::TYPE_LIST) {
// This is a complex feature.
- const ListValue* list = static_cast<const ListValue*>(&iter.value());
+ const base::ListValue* list =
+ static_cast<const base::ListValue*>(&iter.value());
CHECK_GT(list->GetSize(), 0UL);
scoped_ptr<ComplexFeature::FeatureList> features(
new ComplexFeature::FeatureList());
// Parse and add all SimpleFeatures from the list.
- for (ListValue::const_iterator list_iter = list->begin();
+ for (base::ListValue::const_iterator list_iter = list->begin();
list_iter != list->end(); ++list_iter) {
- if ((*list_iter)->GetType() != Value::TYPE_DICTIONARY) {
+ if ((*list_iter)->GetType() != base::Value::TYPE_DICTIONARY) {
LOG(ERROR) << iter.key() << ": Feature rules must be dictionaries.";
continue;
}
scoped_ptr<SimpleFeature> feature((*factory_)());
- if (!ParseFeature(static_cast<const DictionaryValue*>(*list_iter),
+ if (!ParseFeature(static_cast<const base::DictionaryValue*>(*list_iter),
iter.key(),
feature.get()))
continue;
diff --git a/chrome/common/extensions/features/base_feature_provider.h b/chrome/common/extensions/features/base_feature_provider.h
index 6a80e10..c014852 100644
--- a/chrome/common/extensions/features/base_feature_provider.h
+++ b/chrome/common/extensions/features/base_feature_provider.h
@@ -23,7 +23,8 @@ class BaseFeatureProvider : public FeatureProvider {
// Creates a new BaseFeatureProvider. Pass null to |factory| to have the
// provider create plain old Feature instances.
- BaseFeatureProvider(const DictionaryValue& root, FeatureFactory factory);
+ BaseFeatureProvider(const base::DictionaryValue& root,
+ FeatureFactory factory);
virtual ~BaseFeatureProvider();
// Gets a feature provider for a specific feature type, like "permission".
diff --git a/chrome/common/extensions/features/complex_feature_unittest.cc b/chrome/common/extensions/features/complex_feature_unittest.cc
index 7e89ba3..be8fd34 100644
--- a/chrome/common/extensions/features/complex_feature_unittest.cc
+++ b/chrome/common/extensions/features/complex_feature_unittest.cc
@@ -36,7 +36,7 @@ TEST_F(ExtensionComplexFeatureTest, MultipleRulesWhitelist) {
// Rule: "extension", whitelist "foo".
scoped_ptr<SimpleFeature> simple_feature(new SimpleFeature());
- scoped_ptr<DictionaryValue> rule(
+ scoped_ptr<base::DictionaryValue> rule(
DictionaryBuilder()
.Set("whitelist", ListBuilder().Append(kIdFoo))
.Set("extension_types", ListBuilder().Append("extension")).Build());
@@ -89,7 +89,7 @@ TEST_F(ExtensionComplexFeatureTest, MultipleRulesChannels) {
// Rule: "extension", channel trunk.
scoped_ptr<SimpleFeature> simple_feature(new SimpleFeature());
- scoped_ptr<DictionaryValue> rule(
+ scoped_ptr<base::DictionaryValue> rule(
DictionaryBuilder()
.Set("channel", "trunk")
.Set("extension_types", ListBuilder().Append("extension")).Build());
diff --git a/chrome/common/extensions/features/manifest_feature.cc b/chrome/common/extensions/features/manifest_feature.cc
index 5196b52..8d622a2 100644
--- a/chrome/common/extensions/features/manifest_feature.cc
+++ b/chrome/common/extensions/features/manifest_feature.cc
@@ -34,7 +34,7 @@ Feature::Availability ManifestFeature::IsAvailableToContext(
return CreateAvailability(IS_AVAILABLE);
}
-std::string ManifestFeature::Parse(const DictionaryValue* value) {
+std::string ManifestFeature::Parse(const base::DictionaryValue* value) {
std::string error = SimpleFeature::Parse(value);
if (!error.empty())
return error;
diff --git a/chrome/common/extensions/features/manifest_feature.h b/chrome/common/extensions/features/manifest_feature.h
index 6fa75bc..1363557 100644
--- a/chrome/common/extensions/features/manifest_feature.h
+++ b/chrome/common/extensions/features/manifest_feature.h
@@ -20,7 +20,7 @@ class ManifestFeature : public SimpleFeature {
const GURL& url,
Feature::Platform platform) const OVERRIDE;
- virtual std::string Parse(const DictionaryValue* value) OVERRIDE;
+ virtual std::string Parse(const base::DictionaryValue* value) OVERRIDE;
};
} // extensions
diff --git a/chrome/common/extensions/features/permission_feature.cc b/chrome/common/extensions/features/permission_feature.cc
index 2b649b1..90e53a8 100644
--- a/chrome/common/extensions/features/permission_feature.cc
+++ b/chrome/common/extensions/features/permission_feature.cc
@@ -33,7 +33,7 @@ Feature::Availability PermissionFeature::IsAvailableToContext(
return CreateAvailability(IS_AVAILABLE);
}
-std::string PermissionFeature::Parse(const DictionaryValue* value) {
+std::string PermissionFeature::Parse(const base::DictionaryValue* value) {
std::string error = SimpleFeature::Parse(value);
if (!error.empty())
return error;
diff --git a/chrome/common/extensions/features/permission_feature.h b/chrome/common/extensions/features/permission_feature.h
index 47892ae..1e24aaa 100644
--- a/chrome/common/extensions/features/permission_feature.h
+++ b/chrome/common/extensions/features/permission_feature.h
@@ -20,7 +20,7 @@ class PermissionFeature : public SimpleFeature {
const GURL& url,
Feature::Platform platform) const OVERRIDE;
- virtual std::string Parse(const DictionaryValue* value) OVERRIDE;
+ virtual std::string Parse(const base::DictionaryValue* value) OVERRIDE;
};
} // extensions
diff --git a/chrome/common/extensions/features/simple_feature.cc b/chrome/common/extensions/features/simple_feature.cc
index b04632d..676c0c6 100644
--- a/chrome/common/extensions/features/simple_feature.cc
+++ b/chrome/common/extensions/features/simple_feature.cc
@@ -68,10 +68,10 @@ std::string GetChannelName(VersionInfo::Channel channel) {
// TODO(aa): Can we replace all this manual parsing with JSON schema stuff?
-void ParseSet(const DictionaryValue* value,
+void ParseSet(const base::DictionaryValue* value,
const std::string& property,
std::set<std::string>* set) {
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!value->GetList(property, &list_value))
return;
@@ -94,7 +94,7 @@ void ParseEnum(const std::string& string_value,
}
template<typename T>
-void ParseEnum(const DictionaryValue* value,
+void ParseEnum(const base::DictionaryValue* value,
const std::string& property,
T* enum_value,
const std::map<std::string, T>& mapping) {
@@ -106,7 +106,7 @@ void ParseEnum(const DictionaryValue* value,
}
template<typename T>
-void ParseEnumSet(const DictionaryValue* value,
+void ParseEnumSet(const base::DictionaryValue* value,
const std::string& property,
std::set<T>* enum_set,
const std::map<std::string, T>& mapping) {
@@ -136,10 +136,10 @@ void ParseEnumSet(const DictionaryValue* value,
}
}
-void ParseURLPatterns(const DictionaryValue* value,
+void ParseURLPatterns(const base::DictionaryValue* value,
const std::string& key,
URLPatternSet* set) {
- const ListValue* matches = NULL;
+ const base::ListValue* matches = NULL;
if (value->GetList(key, &matches)) {
set->ClearPatterns();
for (size_t i = 0; i < matches->GetSize(); ++i) {
@@ -224,7 +224,7 @@ bool SimpleFeature::Equals(const SimpleFeature& other) const {
channel_has_been_set_ == other.channel_has_been_set_;
}
-std::string SimpleFeature::Parse(const DictionaryValue* value) {
+std::string SimpleFeature::Parse(const base::DictionaryValue* value) {
ParseURLPatterns(value, "matches", &matches_);
ParseSet(value, "whitelist", &whitelist_);
ParseSet(value, "dependencies", &dependencies_);
diff --git a/chrome/common/extensions/features/simple_feature.h b/chrome/common/extensions/features/simple_feature.h
index 0ca5096..3e75b92 100644
--- a/chrome/common/extensions/features/simple_feature.h
+++ b/chrome/common/extensions/features/simple_feature.h
@@ -32,7 +32,7 @@ class SimpleFeature : public Feature {
// Unspecified values in the JSON are not modified in the object. This allows
// us to implement inheritance by parsing one value after another. Returns
// the error found, or an empty string on success.
- virtual std::string Parse(const DictionaryValue* value);
+ virtual std::string Parse(const base::DictionaryValue* value);
// Returns true if the feature contains the same values as another.
bool Equals(const SimpleFeature& other) const;
diff --git a/chrome/common/extensions/features/simple_feature_unittest.cc b/chrome/common/extensions/features/simple_feature_unittest.cc
index c72f304..b50ddb2 100644
--- a/chrome/common/extensions/features/simple_feature_unittest.cc
+++ b/chrome/common/extensions/features/simple_feature_unittest.cc
@@ -357,7 +357,7 @@ TEST_F(ExtensionSimpleFeatureTest, ParseNull) {
}
TEST_F(ExtensionSimpleFeatureTest, ParseWhitelist) {
- scoped_ptr<base::DictionaryValue> value(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
base::ListValue* whitelist = new base::ListValue();
whitelist->Append(new base::StringValue("foo"));
whitelist->Append(new base::StringValue("bar"));
diff --git a/chrome/common/extensions/manifest.h b/chrome/common/extensions/manifest.h
index 0cade48..e43443d 100644
--- a/chrome/common/extensions/manifest.h
+++ b/chrome/common/extensions/manifest.h
@@ -90,7 +90,7 @@ class Manifest {
return IsUnpackedLocation(location);
}
- Manifest(Location location, scoped_ptr<DictionaryValue> value);
+ Manifest(Location location, scoped_ptr<base::DictionaryValue> value);
virtual ~Manifest();
const std::string& extension_id() const { return extension_id_; }
diff --git a/chrome/common/extensions/manifest_handlers/app_isolation_info.cc b/chrome/common/extensions/manifest_handlers/app_isolation_info.cc
index e619b84..58bf371 100644
--- a/chrome/common/extensions/manifest_handlers/app_isolation_info.cc
+++ b/chrome/common/extensions/manifest_handlers/app_isolation_info.cc
@@ -57,7 +57,7 @@ bool AppIsolationHandler::Parse(Extension* extension, string16* error) {
// or is a platform app (which we already handled).
DCHECK(extension->manifest()->HasPath(keys::kIsolation));
- const ListValue* isolation_list = NULL;
+ const base::ListValue* isolation_list = NULL;
if (!extension->manifest()->GetList(keys::kIsolation, &isolation_list)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidIsolation);
return false;
diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
index 9fefea8..08062a2 100644
--- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc
@@ -33,7 +33,7 @@ namespace {
// Helper method that loads either the include_globs or exclude_globs list
// from an entry in the content_script lists of the manifest.
-bool LoadGlobsHelper(const DictionaryValue* content_script,
+bool LoadGlobsHelper(const base::DictionaryValue* content_script,
int content_script_index,
const char* globs_property_name,
string16* error,
@@ -42,7 +42,7 @@ bool LoadGlobsHelper(const DictionaryValue* content_script,
if (!content_script->HasKey(globs_property_name))
return true; // they are optional
- const ListValue* list = NULL;
+ const base::ListValue* list = NULL;
if (!content_script->GetList(globs_property_name, &list)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidGlobList,
@@ -70,7 +70,7 @@ bool LoadGlobsHelper(const DictionaryValue* content_script,
// Helper method that loads a UserScript object from a dictionary in the
// content_script list of the manifest.
-bool LoadUserScriptFromDictionary(const DictionaryValue* content_script,
+bool LoadUserScriptFromDictionary(const base::DictionaryValue* content_script,
int definition_index,
Extension* extension,
string16* error,
@@ -111,7 +111,7 @@ bool LoadUserScriptFromDictionary(const DictionaryValue* content_script,
}
// matches (required)
- const ListValue* matches = NULL;
+ const base::ListValue* matches = NULL;
if (!content_script->GetList(keys::kMatches, &matches)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidMatches,
@@ -174,7 +174,7 @@ bool LoadUserScriptFromDictionary(const DictionaryValue* content_script,
// exclude_matches
if (content_script->HasKey(keys::kExcludeMatches)) { // optional
- const ListValue* exclude_matches = NULL;
+ const base::ListValue* exclude_matches = NULL;
if (!content_script->GetList(keys::kExcludeMatches, &exclude_matches)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidExcludeMatches,
@@ -222,7 +222,7 @@ bool LoadUserScriptFromDictionary(const DictionaryValue* content_script,
}
// js and css keys
- const ListValue* js = NULL;
+ const base::ListValue* js = NULL;
if (content_script->HasKey(keys::kJs) &&
!content_script->GetList(keys::kJs, &js)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
@@ -231,7 +231,7 @@ bool LoadUserScriptFromDictionary(const DictionaryValue* content_script,
return false;
}
- const ListValue* css = NULL;
+ const base::ListValue* css = NULL;
if (content_script->HasKey(keys::kCss) &&
!content_script->GetList(keys::kCss, &css)) {
*error = ErrorUtils::
@@ -382,14 +382,14 @@ const std::vector<std::string> ContentScriptsHandler::Keys() const {
bool ContentScriptsHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<ContentScriptsInfo> content_scripts_info(new ContentScriptsInfo);
- const ListValue* scripts_list = NULL;
+ const base::ListValue* scripts_list = NULL;
if (!extension->manifest()->GetList(keys::kContentScripts, &scripts_list)) {
*error = ASCIIToUTF16(errors::kInvalidContentScriptsList);
return false;
}
for (size_t i = 0; i < scripts_list->GetSize(); ++i) {
- const DictionaryValue* script_dict = NULL;
+ const base::DictionaryValue* script_dict = NULL;
if (!scripts_list->GetDictionary(i, &script_dict)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidContentScript,
diff --git a/chrome/common/extensions/manifest_handlers/icons_handler.cc b/chrome/common/extensions/manifest_handlers/icons_handler.cc
index 3c8219d..c068a5c 100644
--- a/chrome/common/extensions/manifest_handlers/icons_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/icons_handler.cc
@@ -127,7 +127,7 @@ IconsHandler::~IconsHandler() {
bool IconsHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<IconsInfo> icons_info(new IconsInfo);
- const DictionaryValue* icons_dict = NULL;
+ const base::DictionaryValue* icons_dict = NULL;
if (!extension->manifest()->GetDictionary(keys::kIcons, &icons_dict)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidIcons);
return false;
diff --git a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc
index 4594d47..bf66bd1 100644
--- a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc
@@ -42,7 +42,7 @@ NaClModulesHandler::~NaClModulesHandler() {
bool NaClModulesHandler::Parse(Extension* extension,
string16* error) {
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!extension->manifest()->GetList(keys::kNaClModules, &list_value)) {
*error = ASCIIToUTF16(errors::kInvalidNaClModules);
return false;
@@ -51,7 +51,7 @@ bool NaClModulesHandler::Parse(Extension* extension,
scoped_ptr<NaClModuleData> nacl_module_data(new NaClModuleData);
for (size_t i = 0; i < list_value->GetSize(); ++i) {
- const DictionaryValue* module_value = NULL;
+ const base::DictionaryValue* module_value = NULL;
if (!list_value->GetDictionary(i, &module_value)) {
*error = ASCIIToUTF16(errors::kInvalidNaClModules);
return false;
diff --git a/chrome/common/extensions/manifest_handlers/requirements_handler.cc b/chrome/common/extensions/manifest_handlers/requirements_handler.cc
index 71db056..d0b0ad0 100644
--- a/chrome/common/extensions/manifest_handlers/requirements_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/requirements_handler.cc
@@ -22,7 +22,7 @@ RequirementsInfo::RequirementsInfo(const Manifest* manifest)
npapi(false) {
// Before parsing requirements from the manifest, automatically default the
// NPAPI plugin requirement based on whether it includes NPAPI plugins.
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
npapi = manifest->GetList(keys::kPlugins, &list_value) &&
!list_value->empty();
}
@@ -69,16 +69,17 @@ bool RequirementsHandler::Parse(Extension* extension, string16* error) {
return true;
}
- const DictionaryValue* requirements_value = NULL;
+ const base::DictionaryValue* requirements_value = NULL;
if (!extension->manifest()->GetDictionary(keys::kRequirements,
&requirements_value)) {
*error = ASCIIToUTF16(errors::kInvalidRequirements);
return false;
}
- for (DictionaryValue::Iterator iter(*requirements_value); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*requirements_value);
+ !iter.IsAtEnd();
iter.Advance()) {
- const DictionaryValue* requirement_value;
+ const base::DictionaryValue* requirement_value;
if (!iter.value().GetAsDictionary(&requirement_value)) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidRequirement, iter.key());
@@ -86,7 +87,7 @@ bool RequirementsHandler::Parse(Extension* extension, string16* error) {
}
if (iter.key() == "plugins") {
- for (DictionaryValue::Iterator plugin_iter(*requirement_value);
+ for (base::DictionaryValue::Iterator plugin_iter(*requirement_value);
!plugin_iter.IsAtEnd(); plugin_iter.Advance()) {
bool plugin_required = false;
if (!plugin_iter.value().GetAsBoolean(&plugin_required)) {
@@ -103,7 +104,7 @@ bool RequirementsHandler::Parse(Extension* extension, string16* error) {
}
}
} else if (iter.key() == "3D") {
- const ListValue* features = NULL;
+ const base::ListValue* features = NULL;
if (!requirement_value->GetListWithoutPathExpansion("features",
&features) ||
!features) {
diff --git a/chrome/common/extensions/manifest_handlers/shared_module_info.cc b/chrome/common/extensions/manifest_handlers/shared_module_info.cc
index d185243..f1f965a 100644
--- a/chrome/common/extensions/manifest_handlers/shared_module_info.cc
+++ b/chrome/common/extensions/manifest_handlers/shared_module_info.cc
@@ -15,7 +15,6 @@
#include "chrome/common/extensions/permissions/permission_set.h"
#include "extensions/common/error_utils.h"
-using base::DictionaryValue;
namespace keys = extension_manifest_keys;
namespace values = extension_manifest_values;
namespace errors = extension_manifest_errors;
@@ -118,12 +117,12 @@ bool SharedModuleInfo::Parse(const Extension* extension, string16* error) {
}
if (has_export) {
- const DictionaryValue* export_value = NULL;
+ const base::DictionaryValue* export_value = NULL;
if (!extension->manifest()->GetDictionary(keys::kExport, &export_value)) {
*error = ASCIIToUTF16(errors::kInvalidExport);
return false;
}
- const ListValue* resources_list = NULL;
+ const base::ListValue* resources_list = NULL;
if (!export_value->GetList(keys::kResources, &resources_list)) {
*error = ASCIIToUTF16(errors::kInvalidExportResources);
return false;
@@ -147,13 +146,13 @@ bool SharedModuleInfo::Parse(const Extension* extension, string16* error) {
}
if (has_import) {
- const ListValue* import_list = NULL;
+ const base::ListValue* import_list = NULL;
if (!extension->manifest()->GetList(keys::kImport, &import_list)) {
*error = ASCIIToUTF16(errors::kInvalidImport);
return false;
}
for (size_t i = 0; i < import_list->GetSize(); ++i) {
- const DictionaryValue* import_entry = NULL;
+ const base::DictionaryValue* import_entry = NULL;
if (!import_list->GetDictionary(i, &import_entry)) {
*error = ASCIIToUTF16(errors::kInvalidImport);
return false;
diff --git a/chrome/common/extensions/manifest_handlers/theme_handler.cc b/chrome/common/extensions/manifest_handlers/theme_handler.cc
index 18b584d..19e2e57 100644
--- a/chrome/common/extensions/manifest_handlers/theme_handler.cc
+++ b/chrome/common/extensions/manifest_handlers/theme_handler.cc
@@ -13,8 +13,6 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-using base::DictionaryValue;
-
namespace extensions {
namespace keys = extension_manifest_keys;
@@ -22,23 +20,23 @@ namespace errors = extension_manifest_errors;
namespace {
-bool LoadImages(const DictionaryValue* theme_value,
+bool LoadImages(const base::DictionaryValue* theme_value,
string16* error,
ThemeInfo* theme_info) {
- const DictionaryValue* images_value = NULL;
+ const base::DictionaryValue* images_value = NULL;
if (theme_value->GetDictionary(keys::kThemeImages, &images_value)) {
// Validate that the images are all strings.
- for (DictionaryValue::Iterator iter(*images_value); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*images_value); !iter.IsAtEnd();
iter.Advance()) {
// The value may be a dictionary of scales and files paths.
// Or the value may be a file path, in which case a scale
// of 100% is assumed.
- if (iter.value().IsType(Value::TYPE_DICTIONARY)) {
- const DictionaryValue* inner_value = NULL;
+ if (iter.value().IsType(base::Value::TYPE_DICTIONARY)) {
+ const base::DictionaryValue* inner_value = NULL;
if (iter.value().GetAsDictionary(&inner_value)) {
- for (DictionaryValue::Iterator inner_iter(*inner_value);
+ for (base::DictionaryValue::Iterator inner_iter(*inner_value);
!inner_iter.IsAtEnd(); inner_iter.Advance()) {
- if (!inner_iter.value().IsType(Value::TYPE_STRING)) {
+ if (!inner_iter.value().IsType(base::Value::TYPE_STRING)) {
*error = ASCIIToUTF16(errors::kInvalidThemeImages);
return false;
}
@@ -47,7 +45,7 @@ bool LoadImages(const DictionaryValue* theme_value,
*error = ASCIIToUTF16(errors::kInvalidThemeImages);
return false;
}
- } else if (!iter.value().IsType(Value::TYPE_STRING)) {
+ } else if (!iter.value().IsType(base::Value::TYPE_STRING)) {
*error = ASCIIToUTF16(errors::kInvalidThemeImages);
return false;
}
@@ -57,15 +55,15 @@ bool LoadImages(const DictionaryValue* theme_value,
return true;
}
-bool LoadColors(const DictionaryValue* theme_value,
+bool LoadColors(const base::DictionaryValue* theme_value,
string16* error,
ThemeInfo* theme_info) {
- const DictionaryValue* colors_value = NULL;
+ const base::DictionaryValue* colors_value = NULL;
if (theme_value->GetDictionary(keys::kThemeColors, &colors_value)) {
// Validate that the colors are RGB or RGBA lists.
- for (DictionaryValue::Iterator iter(*colors_value); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*colors_value); !iter.IsAtEnd();
iter.Advance()) {
- const ListValue* color_list = NULL;
+ const base::ListValue* color_list = NULL;
double alpha = 0.0;
int color = 0;
// The color must be a list...
@@ -89,17 +87,17 @@ bool LoadColors(const DictionaryValue* theme_value,
return true;
}
-bool LoadTints(const DictionaryValue* theme_value,
+bool LoadTints(const base::DictionaryValue* theme_value,
string16* error,
ThemeInfo* theme_info) {
- const DictionaryValue* tints_value = NULL;
+ const base::DictionaryValue* tints_value = NULL;
if (!theme_value->GetDictionary(keys::kThemeTints, &tints_value))
return true;
// Validate that the tints are all reals.
- for (DictionaryValue::Iterator iter(*tints_value); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*tints_value); !iter.IsAtEnd();
iter.Advance()) {
- const ListValue* tint_list = NULL;
+ const base::ListValue* tint_list = NULL;
double v = 0.0;
if (!iter.value().GetAsList(&tint_list) ||
tint_list->GetSize() != 3 ||
@@ -114,10 +112,10 @@ bool LoadTints(const DictionaryValue* theme_value,
return true;
}
-bool LoadDisplayProperties(const DictionaryValue* theme_value,
+bool LoadDisplayProperties(const base::DictionaryValue* theme_value,
string16* error,
ThemeInfo* theme_info) {
- const DictionaryValue* display_properties_value = NULL;
+ const base::DictionaryValue* display_properties_value = NULL;
if (theme_value->GetDictionary(keys::kThemeDisplayProperties,
&display_properties_value)) {
theme_info->theme_display_properties_.reset(
@@ -139,25 +137,25 @@ ThemeInfo::~ThemeInfo() {
}
// static
-const DictionaryValue* ThemeInfo::GetImages(const Extension* extension) {
+const base::DictionaryValue* ThemeInfo::GetImages(const Extension* extension) {
const ThemeInfo* theme_info = GetInfo(extension);
return theme_info ? theme_info->theme_images_.get() : NULL;
}
// static
-const DictionaryValue* ThemeInfo::GetColors(const Extension* extension) {
+const base::DictionaryValue* ThemeInfo::GetColors(const Extension* extension) {
const ThemeInfo* theme_info = GetInfo(extension);
return theme_info ? theme_info->theme_colors_.get() : NULL;
}
// static
-const DictionaryValue* ThemeInfo::GetTints(const Extension* extension) {
+const base::DictionaryValue* ThemeInfo::GetTints(const Extension* extension) {
const ThemeInfo* theme_info = GetInfo(extension);
return theme_info ? theme_info->theme_tints_.get() : NULL;
}
// static
-const DictionaryValue* ThemeInfo::GetDisplayProperties(
+const base::DictionaryValue* ThemeInfo::GetDisplayProperties(
const Extension* extension) {
const ThemeInfo* theme_info = GetInfo(extension);
return theme_info ? theme_info->theme_display_properties_.get() : NULL;
@@ -170,7 +168,7 @@ ThemeHandler::~ThemeHandler() {
}
bool ThemeHandler::Parse(Extension* extension, string16* error) {
- const DictionaryValue* theme_value = NULL;
+ const base::DictionaryValue* theme_value = NULL;
if (!extension->manifest()->GetDictionary(keys::kTheme, &theme_value)) {
*error = ASCIIToUTF16(errors::kInvalidTheme);
return false;
@@ -195,10 +193,10 @@ bool ThemeHandler::Validate(const Extension* extension,
std::vector<InstallWarning>* warnings) const {
// Validate that theme images exist.
if (extension->is_theme()) {
- const DictionaryValue* images_value =
+ const base::DictionaryValue* images_value =
extensions::ThemeInfo::GetImages(extension);
if (images_value) {
- for (DictionaryValue::Iterator iter(*images_value); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*images_value); !iter.IsAtEnd();
iter.Advance()) {
std::string val;
if (iter.value().GetAsString(&val)) {
diff --git a/chrome/common/extensions/manifest_tests/extension_manifest_test.cc b/chrome/common/extensions/manifest_tests/extension_manifest_test.cc
index e37eb64..b768970 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifest_test.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifest_test.cc
@@ -19,8 +19,8 @@ namespace {
// If filename is a relative path, LoadManifestFile will treat it relative to
// the appropriate test directory.
-DictionaryValue* LoadManifestFile(
- const base::FilePath& filename_path, std::string* error) {
+base::DictionaryValue* LoadManifestFile(const base::FilePath& filename_path,
+ std::string* error) {
base::FilePath extension_path;
base::FilePath manifest_path;
@@ -32,8 +32,8 @@ DictionaryValue* LoadManifestFile(
"Couldn't find " << manifest_path.value();
JSONFileValueSerializer serializer(manifest_path);
- DictionaryValue* manifest =
- static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error));
+ base::DictionaryValue* manifest =
+ static_cast<base::DictionaryValue*>(serializer.Deserialize(NULL, error));
// Most unit tests don't need localization, and they'll fail if we try to
// localize them, since their manifests don't have a default_locale key.
@@ -61,7 +61,7 @@ ExtensionManifestTest::Manifest::Manifest(const char* name)
: name_(name), manifest_(NULL) {
}
-ExtensionManifestTest::Manifest::Manifest(DictionaryValue* manifest,
+ExtensionManifestTest::Manifest::Manifest(base::DictionaryValue* manifest,
const char* name)
: name_(name), manifest_(manifest) {
CHECK(manifest_) << "Manifest NULL";
@@ -74,7 +74,7 @@ ExtensionManifestTest::Manifest::Manifest(const Manifest& m) {
ExtensionManifestTest::Manifest::~Manifest() {
}
-DictionaryValue* ExtensionManifestTest::Manifest::GetManifest(
+base::DictionaryValue* ExtensionManifestTest::Manifest::GetManifest(
char const* test_data_dir, std::string* error) const {
if (manifest_)
return manifest_;
@@ -92,7 +92,7 @@ char const* ExtensionManifestTest::test_data_dir() {
return "manifest_tests";
}
-scoped_ptr<DictionaryValue> ExtensionManifestTest::LoadManifest(
+scoped_ptr<base::DictionaryValue> ExtensionManifestTest::LoadManifest(
char const* manifest_name, std::string* error) {
base::FilePath filename_path;
filename_path = filename_path.AppendASCII("extensions")
@@ -106,7 +106,7 @@ scoped_refptr<Extension> ExtensionManifestTest::LoadExtension(
std::string* error,
extensions::Manifest::Location location,
int flags) {
- DictionaryValue* value = manifest.GetManifest(test_data_dir(), error);
+ base::DictionaryValue* value = manifest.GetManifest(test_data_dir(), error);
if (!value)
return NULL;
base::FilePath path;
diff --git a/chrome/common/extensions/manifest_tests/extension_manifest_test.h b/chrome/common/extensions/manifest_tests/extension_manifest_test.h
index 7b05fc1..d91fc9f 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifest_test.h
+++ b/chrome/common/extensions/manifest_tests/extension_manifest_test.h
@@ -24,7 +24,7 @@ class ExtensionManifestTest : public testing::Test {
class Manifest {
public:
explicit Manifest(const char* name);
- Manifest(DictionaryValue* manifest, const char* name);
+ Manifest(base::DictionaryValue* manifest, const char* name);
// C++98 requires the copy constructor for a type to be visible if you
// take a const-ref of a temporary for that type. Since Manifest
// contains a scoped_ptr, its implicit copy constructor is declared
@@ -40,19 +40,19 @@ class ExtensionManifestTest : public testing::Test {
const std::string& name() const { return name_; };
- DictionaryValue* GetManifest(char const* test_data_dir,
- std::string* error) const;
+ base::DictionaryValue* GetManifest(char const* test_data_dir,
+ std::string* error) const;
private:
const std::string name_;
- mutable DictionaryValue* manifest_;
- mutable scoped_ptr<DictionaryValue> manifest_holder_;
+ mutable base::DictionaryValue* manifest_;
+ mutable scoped_ptr<base::DictionaryValue> manifest_holder_;
};
// The subdirectory in which to find test data files.
virtual char const* test_data_dir();
- scoped_ptr<DictionaryValue> LoadManifest(
+ scoped_ptr<base::DictionaryValue> LoadManifest(
char const* manifest_name,
std::string* error);
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_manifest_version_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_manifest_version_unittest.cc
index ba382f1..51ced6c 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_manifest_version_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_manifest_version_unittest.cc
@@ -12,20 +12,20 @@ using extensions::Extension;
namespace errors = extension_manifest_errors;
TEST_F(ExtensionManifestTest, ManifestVersionError) {
- scoped_ptr<DictionaryValue> manifest1(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> manifest1(new base::DictionaryValue());
manifest1->SetString("name", "Miles");
manifest1->SetString("version", "0.55");
- scoped_ptr<DictionaryValue> manifest2(manifest1->DeepCopy());
+ scoped_ptr<base::DictionaryValue> manifest2(manifest1->DeepCopy());
manifest2->SetInteger("manifest_version", 1);
- scoped_ptr<DictionaryValue> manifest3(manifest1->DeepCopy());
+ scoped_ptr<base::DictionaryValue> manifest3(manifest1->DeepCopy());
manifest3->SetInteger("manifest_version", 2);
struct {
const char* test_name;
bool require_modern_manifest_version;
- DictionaryValue* manifest;
+ base::DictionaryValue* manifest;
bool expect_error;
} test_data[] = {
{ "require_modern_with_default", true, manifest1.get(), true },
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 f7fe762..e63ce26 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
@@ -25,8 +25,9 @@ TEST_F(ValidAppManifestTest, ValidApp) {
TEST_F(ValidAppManifestTest, AllowUnrecognizedPermissions) {
std::string error;
- scoped_ptr<DictionaryValue> manifest(LoadManifest("valid_app.json", &error));
- ListValue* permissions = NULL;
+ scoped_ptr<base::DictionaryValue> manifest(
+ LoadManifest("valid_app.json", &error));
+ base::ListValue* permissions = NULL;
ASSERT_TRUE(manifest->GetList("permissions", &permissions));
permissions->Append(new StringValue("not-a-valid-permission"));
LoadAndExpectSuccess(Manifest(manifest.get(), ""));
diff --git a/chrome/common/extensions/manifest_url_handler.cc b/chrome/common/extensions/manifest_url_handler.cc
index b0cdde8..8b1847d 100644
--- a/chrome/common/extensions/manifest_url_handler.cc
+++ b/chrome/common/extensions/manifest_url_handler.cc
@@ -262,7 +262,7 @@ URLOverridesHandler::~URLOverridesHandler() {
}
bool URLOverridesHandler::Parse(Extension* extension, string16* error) {
- const DictionaryValue* overrides = NULL;
+ const base::DictionaryValue* overrides = NULL;
if (!extension->manifest()->GetDictionary(keys::kChromeURLOverrides,
&overrides)) {
*error = ASCIIToUTF16(errors::kInvalidChromeURLOverrides);
@@ -270,7 +270,7 @@ bool URLOverridesHandler::Parse(Extension* extension, string16* error) {
}
scoped_ptr<URLOverrides> url_overrides(new URLOverrides);
// Validate that the overrides are all strings
- for (DictionaryValue::Iterator iter(*overrides); !iter.IsAtEnd();
+ for (base::DictionaryValue::Iterator iter(*overrides); !iter.IsAtEnd();
iter.Advance()) {
std::string page = iter.key();
std::string val;
diff --git a/chrome/common/extensions/message_bundle.cc b/chrome/common/extensions/message_bundle.cc
index aa3310e..24ceff9 100644
--- a/chrome/common/extensions/message_bundle.cc
+++ b/chrome/common/extensions/message_bundle.cc
@@ -73,9 +73,9 @@ bool MessageBundle::Init(const CatalogVector& locale_catalogs,
for (CatalogVector::const_reverse_iterator it = locale_catalogs.rbegin();
it != locale_catalogs.rend(); ++it) {
- DictionaryValue* catalog = (*it).get();
- for (DictionaryValue::Iterator message_it(*catalog); !message_it.IsAtEnd();
- message_it.Advance()) {
+ base::DictionaryValue* catalog = (*it).get();
+ for (base::DictionaryValue::Iterator message_it(*catalog);
+ !message_it.IsAtEnd(); message_it.Advance()) {
std::string key(StringToLowerASCII(message_it.key()));
if (!IsValidName(message_it.key()))
return BadKeyMessage(key, error);
@@ -130,11 +130,11 @@ bool MessageBundle::AppendReservedMessagesForLocale(
}
bool MessageBundle::GetMessageValue(const std::string& key,
- const Value& name_value,
+ const base::Value& name_value,
std::string* value,
std::string* error) const {
// Get the top level tree for given key (name part).
- const DictionaryValue* name_tree;
+ const base::DictionaryValue* name_tree;
if (!name_value.GetAsDictionary(&name_tree)) {
*error = base::StringPrintf("Not a valid tree for key %s.", key.c_str());
return false;
@@ -159,23 +159,23 @@ bool MessageBundle::GetMessageValue(const std::string& key,
MessageBundle::MessageBundle() {
}
-bool MessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
+bool MessageBundle::GetPlaceholders(const base::DictionaryValue& name_tree,
const std::string& name_key,
SubstitutionMap* placeholders,
std::string* error) const {
if (!name_tree.HasKey(kPlaceholdersKey))
return true;
- const DictionaryValue* placeholders_tree;
+ const base::DictionaryValue* placeholders_tree;
if (!name_tree.GetDictionary(kPlaceholdersKey, &placeholders_tree)) {
*error = base::StringPrintf("Not a valid \"%s\" element for key %s.",
kPlaceholdersKey, name_key.c_str());
return false;
}
- for (DictionaryValue::Iterator it(*placeholders_tree); !it.IsAtEnd();
+ for (base::DictionaryValue::Iterator it(*placeholders_tree); !it.IsAtEnd();
it.Advance()) {
- const DictionaryValue* placeholder;
+ const base::DictionaryValue* placeholder;
const std::string& content_key(it.key());
if (!IsValidName(content_key))
return BadKeyMessage(content_key, error);
diff --git a/chrome/common/extensions/message_bundle_unittest.cc b/chrome/common/extensions/message_bundle_unittest.cc
index bd63124..bf5e601 100644
--- a/chrome/common/extensions/message_bundle_unittest.cc
+++ b/chrome/common/extensions/message_bundle_unittest.cc
@@ -37,21 +37,21 @@ class MessageBundleTest : public testing::Test {
// Helper method for dictionary building.
void SetDictionary(const std::string& name,
- DictionaryValue* subtree,
- DictionaryValue* target) {
- target->Set(name, static_cast<Value*>(subtree));
+ base::DictionaryValue* subtree,
+ base::DictionaryValue* target) {
+ target->Set(name, static_cast<base::Value*>(subtree));
}
void CreateContentTree(const std::string& name,
const std::string& content,
- DictionaryValue* dict) {
- DictionaryValue* content_tree = new DictionaryValue;
+ base::DictionaryValue* dict) {
+ base::DictionaryValue* content_tree = new base::DictionaryValue;
content_tree->SetString(MessageBundle::kContentKey, content);
SetDictionary(name, content_tree, dict);
}
- void CreatePlaceholdersTree(DictionaryValue* dict) {
- DictionaryValue* placeholders_tree = new DictionaryValue;
+ void CreatePlaceholdersTree(base::DictionaryValue* dict) {
+ base::DictionaryValue* placeholders_tree = new base::DictionaryValue;
CreateContentTree("a", "A", placeholders_tree);
CreateContentTree("b", "B", placeholders_tree);
CreateContentTree("c", "C", placeholders_tree);
@@ -63,8 +63,8 @@ class MessageBundleTest : public testing::Test {
void CreateMessageTree(const std::string& name,
const std::string& message,
bool create_placeholder_subtree,
- DictionaryValue* dict) {
- DictionaryValue* message_tree = new DictionaryValue;
+ base::DictionaryValue* dict) {
+ base::DictionaryValue* message_tree = new base::DictionaryValue;
if (create_placeholder_subtree)
CreatePlaceholdersTree(message_tree);
message_tree->SetString(MessageBundle::kMessageKey, message);
@@ -72,8 +72,8 @@ class MessageBundleTest : public testing::Test {
}
// Caller owns the memory.
- DictionaryValue* CreateGoodDictionary() {
- DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* CreateGoodDictionary() {
+ base::DictionaryValue* dict = new base::DictionaryValue;
CreateMessageTree("n1", "message1 $a$ $b$", true, dict);
CreateMessageTree("n2", "message2 $c$", true, dict);
CreateMessageTree("n3", "message3", false, dict);
@@ -81,8 +81,8 @@ class MessageBundleTest : public testing::Test {
}
// Caller owns the memory.
- DictionaryValue* CreateBadDictionary(enum BadDictionary what_is_bad) {
- DictionaryValue* dict = CreateGoodDictionary();
+ base::DictionaryValue* CreateBadDictionary(enum BadDictionary what_is_bad) {
+ base::DictionaryValue* dict = CreateGoodDictionary();
// Now remove/break things.
switch (what_is_bad) {
case INVALID_NAME:
@@ -92,7 +92,7 @@ class MessageBundleTest : public testing::Test {
dict->SetString("n4", "whatever");
break;
case EMPTY_NAME_TREE: {
- DictionaryValue* empty_tree = new DictionaryValue;
+ base::DictionaryValue* empty_tree = new base::DictionaryValue;
SetDictionary("n4", empty_tree, dict);
}
break;
@@ -103,7 +103,7 @@ class MessageBundleTest : public testing::Test {
dict->SetString("n1.placeholders", "whatever");
break;
case EMPTY_PLACEHOLDER_TREE: {
- DictionaryValue* empty_tree = new DictionaryValue;
+ base::DictionaryValue* empty_tree = new base::DictionaryValue;
SetDictionary("n1.placeholders", empty_tree, dict);
}
break;
@@ -111,7 +111,7 @@ class MessageBundleTest : public testing::Test {
dict->Remove("n1.placeholders.a.content", NULL);
break;
case MESSAGE_PLACEHOLDER_DOESNT_MATCH:
- DictionaryValue* value;
+ base::DictionaryValue* value;
dict->Remove("n1.placeholders.a", NULL);
dict->GetDictionary("n1.placeholders", &value);
CreateContentTree("x", "X", value);
@@ -158,7 +158,7 @@ class MessageBundleTest : public testing::Test {
}
scoped_ptr<MessageBundle> handler_;
- std::vector<linked_ptr<DictionaryValue> > catalogs_;
+ std::vector<linked_ptr<base::DictionaryValue> > catalogs_;
};
TEST_F(MessageBundleTest, ReservedMessagesCount) {
@@ -173,7 +173,8 @@ TEST_F(MessageBundleTest, InitEmptyDictionaries) {
}
TEST_F(MessageBundleTest, InitGoodDefaultDict) {
- catalogs_.push_back(linked_ptr<DictionaryValue>(CreateGoodDictionary()));
+ catalogs_.push_back(
+ linked_ptr<base::DictionaryValue>(CreateGoodDictionary()));
CreateMessageBundle();
EXPECT_TRUE(handler_.get() != NULL);
@@ -186,10 +187,12 @@ TEST_F(MessageBundleTest, InitGoodDefaultDict) {
}
TEST_F(MessageBundleTest, InitAppDictConsultedFirst) {
- catalogs_.push_back(linked_ptr<DictionaryValue>(CreateGoodDictionary()));
- catalogs_.push_back(linked_ptr<DictionaryValue>(CreateGoodDictionary()));
+ catalogs_.push_back(
+ linked_ptr<base::DictionaryValue>(CreateGoodDictionary()));
+ catalogs_.push_back(
+ linked_ptr<base::DictionaryValue>(CreateGoodDictionary()));
- DictionaryValue* app_dict = catalogs_[0].get();
+ base::DictionaryValue* app_dict = catalogs_[0].get();
// Flip placeholders in message of n1 tree.
app_dict->SetString("n1.message", "message1 $b$ $a$");
// Remove one message from app dict.
@@ -211,8 +214,9 @@ TEST_F(MessageBundleTest, InitAppDictConsultedFirst) {
TEST_F(MessageBundleTest, InitBadAppDict) {
catalogs_.push_back(
- linked_ptr<DictionaryValue>(CreateBadDictionary(INVALID_NAME)));
- catalogs_.push_back(linked_ptr<DictionaryValue>(CreateGoodDictionary()));
+ linked_ptr<base::DictionaryValue>(CreateBadDictionary(INVALID_NAME)));
+ catalogs_.push_back(
+ linked_ptr<base::DictionaryValue>(CreateGoodDictionary()));
std::string error = CreateMessageBundle();
@@ -257,9 +261,10 @@ TEST_F(MessageBundleTest, InitBadAppDict) {
}
TEST_F(MessageBundleTest, ReservedMessagesOverrideDeveloperMessages) {
- catalogs_.push_back(linked_ptr<DictionaryValue>(CreateGoodDictionary()));
+ catalogs_.push_back(
+ linked_ptr<base::DictionaryValue>(CreateGoodDictionary()));
- DictionaryValue* dict = catalogs_[0].get();
+ base::DictionaryValue* dict = catalogs_[0].get();
CreateMessageTree(MessageBundle::kUILocaleKey, "x", false, dict);
std::string error = CreateMessageBundle();
diff --git a/chrome/common/extensions/mime_types_handler.cc b/chrome/common/extensions/mime_types_handler.cc
index ed8a37d..a656e7d 100644
--- a/chrome/common/extensions/mime_types_handler.cc
+++ b/chrome/common/extensions/mime_types_handler.cc
@@ -86,7 +86,7 @@ MimeTypesHandlerParser::~MimeTypesHandlerParser() {
bool MimeTypesHandlerParser::Parse(extensions::Extension* extension,
string16* error) {
- const ListValue* mime_types_value = NULL;
+ const base::ListValue* mime_types_value = NULL;
if (!extension->manifest()->GetList(keys::kMIMETypes,
&mime_types_value)) {
*error = ASCIIToUTF16(errors::kInvalidMimeTypesHandler);
diff --git a/chrome/common/extensions/permissions/api_permission_set.cc b/chrome/common/extensions/permissions/api_permission_set.cc
index 3934b90..2fe35e0a 100644
--- a/chrome/common/extensions/permissions/api_permission_set.cc
+++ b/chrome/common/extensions/permissions/api_permission_set.cc
@@ -55,12 +55,12 @@ bool CreateAPIPermission(
}
bool ParseChildPermissions(const std::string& base_name,
- const Value* permission_value,
+ const base::Value* permission_value,
APIPermissionSet* api_permissions,
string16* error,
std::vector<std::string>* unhandled_permissions) {
if (permission_value) {
- const ListValue* permissions;
+ const base::ListValue* permissions;
if (!permission_value->GetAsList(&permissions)) {
if (error) {
*error = ErrorUtils::FormatErrorMessageUTF16(
@@ -280,7 +280,7 @@ void APIPermissionSet::Union(
// static
bool APIPermissionSet::ParseFromJSON(
- const ListValue* permissions,
+ const base::ListValue* permissions,
APIPermissionSet* api_permissions,
string16* error,
std::vector<std::string>* unhandled_permissions) {
diff --git a/chrome/common/extensions/permissions/permission_set_unittest.cc b/chrome/common/extensions/permissions/permission_set_unittest.cc
index 08a0373b..232afc6 100644
--- a/chrome/common/extensions/permissions/permission_set_unittest.cc
+++ b/chrome/common/extensions/permissions/permission_set_unittest.cc
@@ -245,10 +245,11 @@ TEST(PermissionsTest, CreateUnion) {
PermissionsInfo::GetInstance()->GetByID(APIPermission::kSocket);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -290,9 +291,10 @@ TEST(PermissionsTest, CreateUnion) {
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-send-to::8899"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8899"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -306,11 +308,12 @@ TEST(PermissionsTest, CreateUnion) {
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
- value->Append(Value::CreateStringValue("udp-send-to::8899"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8899"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -373,10 +376,11 @@ TEST(PermissionsTest, CreateIntersection) {
apis1.insert(APIPermission::kBackground);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -410,10 +414,10 @@ TEST(PermissionsTest, CreateIntersection) {
apis2.insert(APIPermission::kPlugin);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
- value->Append(Value::CreateStringValue("udp-send-to::8899"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8899"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -423,9 +427,9 @@ TEST(PermissionsTest, CreateIntersection) {
expected_apis.insert(APIPermission::kTab);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -487,10 +491,11 @@ TEST(PermissionsTest, CreateDifference) {
apis1.insert(APIPermission::kBackground);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -512,9 +517,10 @@ TEST(PermissionsTest, CreateDifference) {
apis2.insert(APIPermission::kPlugin);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80"));
- value->Append(Value::CreateStringValue("udp-send-to::8899"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(
+ base::Value::CreateStringValue("tcp-connect:*.example.com:80"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8899"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
@@ -524,9 +530,9 @@ TEST(PermissionsTest, CreateDifference) {
expected_apis.insert(APIPermission::kBackground);
permission = permission_info->CreateAPIPermission();
{
- scoped_ptr<ListValue> value(new ListValue());
- value->Append(Value::CreateStringValue("udp-bind::8080"));
- value->Append(Value::CreateStringValue("udp-send-to::8888"));
+ scoped_ptr<base::ListValue> value(new base::ListValue());
+ value->Append(base::Value::CreateStringValue("udp-bind::8080"));
+ value->Append(base::Value::CreateStringValue("udp-send-to::8888"));
if (!permission->FromValue(value.get())) {
NOTREACHED();
}
diff --git a/chrome/common/extensions/permissions/permissions_data.cc b/chrome/common/extensions/permissions/permissions_data.cc
index 6ab4029..1d7057d 100644
--- a/chrome/common/extensions/permissions/permissions_data.cc
+++ b/chrome/common/extensions/permissions/permissions_data.cc
@@ -126,7 +126,7 @@ bool ParseHelper(Extension* extension,
if (!extension->manifest()->HasKey(key))
return true;
- const ListValue* permissions = NULL;
+ const base::ListValue* permissions = NULL;
if (!extension->manifest()->GetList(key, &permissions)) {
*error = ErrorUtils::FormatErrorMessageUTF16(errors::kInvalidPermissions,
std::string());
diff --git a/chrome/common/extensions/permissions/set_disjunction_permission.h b/chrome/common/extensions/permissions/set_disjunction_permission.h
index 80d35ab..dd6f9b3 100644
--- a/chrome/common/extensions/permissions/set_disjunction_permission.h
+++ b/chrome/common/extensions/permissions/set_disjunction_permission.h
@@ -135,7 +135,7 @@ class SetDisjunctionPermission : public APIPermission {
}
virtual scoped_ptr<base::Value> ToValue() const OVERRIDE {
- base::ListValue* list = new ListValue();
+ base::ListValue* list = new base::ListValue();
typename std::set<PermissionDataType>::const_iterator i;
for (i = data_set_.begin(); i != data_set_.end(); ++i) {
scoped_ptr<base::Value> item_value(i->ToValue());
diff --git a/chrome/common/extensions/sync_type_unittest.cc b/chrome/common/extensions/sync_type_unittest.cc
index d68d37d..73d33d1 100644
--- a/chrome/common/extensions/sync_type_unittest.cc
+++ b/chrome/common/extensions/sync_type_unittest.cc
@@ -32,13 +32,13 @@ class ExtensionSyncTypeTest : public testing::Test {
int num_plugins,
const base::FilePath& extension_path,
int creation_flags) {
- DictionaryValue source;
+ base::DictionaryValue source;
source.SetString(keys::kName, "PossiblySyncableExtension");
source.SetString(keys::kVersion, "0.0.0.0");
if (type == APP)
source.SetString(keys::kApp, "true");
if (type == THEME)
- source.Set(keys::kTheme, new DictionaryValue());
+ source.Set(keys::kTheme, new base::DictionaryValue());
if (!update_url.is_empty()) {
source.SetString(keys::kUpdateURL, update_url.spec());
}
@@ -47,9 +47,9 @@ class ExtensionSyncTypeTest : public testing::Test {
}
if (type != THEME) {
source.SetBoolean(keys::kConvertedFromUserScript, type == USER_SCRIPT);
- ListValue* plugins = new ListValue();
+ base::ListValue* plugins = new base::ListValue();
for (int i = 0; i < num_plugins; ++i) {
- DictionaryValue* plugin = new DictionaryValue();
+ base::DictionaryValue* plugin = new base::DictionaryValue();
plugin->SetString(keys::kPluginsPath, std::string());
plugins->Set(i, plugin);
}
@@ -148,7 +148,7 @@ TEST_F(ExtensionSyncTypeTest, OnlyDisplayAppsInLauncher) {
}
TEST_F(ExtensionSyncTypeTest, DisplayInXManifestProperties) {
- DictionaryValue manifest;
+ base::DictionaryValue manifest;
manifest.SetString(keys::kName, "TestComponentApp");
manifest.SetString(keys::kVersion, "0.0.0.0");
manifest.SetString(keys::kApp, "true");
diff --git a/chrome/common/extensions/unpacker.cc b/chrome/common/extensions/unpacker.cc
index bb450df..7a958df 100644
--- a/chrome/common/extensions/unpacker.cc
+++ b/chrome/common/extensions/unpacker.cc
@@ -99,7 +99,7 @@ Unpacker::Unpacker(const base::FilePath& extension_path,
Unpacker::~Unpacker() {
}
-DictionaryValue* Unpacker::ReadManifest() {
+base::DictionaryValue* Unpacker::ReadManifest() {
base::FilePath manifest_path =
temp_install_dir_.Append(kManifestFilename);
if (!file_util::PathExists(manifest_path)) {
@@ -109,18 +109,18 @@ DictionaryValue* Unpacker::ReadManifest() {
JSONFileValueSerializer serializer(manifest_path);
std::string error;
- scoped_ptr<Value> root(serializer.Deserialize(NULL, &error));
+ scoped_ptr<base::Value> root(serializer.Deserialize(NULL, &error));
if (!root.get()) {
SetError(error);
return NULL;
}
- if (!root->IsType(Value::TYPE_DICTIONARY)) {
+ if (!root->IsType(base::Value::TYPE_DICTIONARY)) {
SetError(errors::kInvalidManifest);
return NULL;
}
- return static_cast<DictionaryValue*>(root.release());
+ return static_cast<base::DictionaryValue*>(root.release());
}
bool Unpacker::ReadAllMessageCatalogs(const std::string& default_locale) {
@@ -207,7 +207,7 @@ bool Unpacker::Run() {
}
// Parse all message catalogs (if any).
- parsed_catalogs_.reset(new DictionaryValue);
+ parsed_catalogs_.reset(new base::DictionaryValue);
if (!LocaleInfo::GetDefaultLocale(extension.get()).empty()) {
if (!ReadAllMessageCatalogs(LocaleInfo::GetDefaultLocale(extension.get())))
return false; // Error was already reported.
@@ -262,7 +262,7 @@ bool Unpacker::ReadImagesFromFile(const base::FilePath& extension_path,
// static
bool Unpacker::ReadMessageCatalogsFromFile(const base::FilePath& extension_path,
- DictionaryValue* catalogs) {
+ base::DictionaryValue* catalogs) {
base::FilePath path = extension_path.AppendASCII(
filenames::kDecodedMessageCatalogsFilename);
std::string file_str;
@@ -302,8 +302,8 @@ bool Unpacker::AddDecodedImage(const base::FilePath& path) {
bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) {
std::string error;
JSONFileValueSerializer serializer(message_path);
- scoped_ptr<DictionaryValue> root(
- static_cast<DictionaryValue*>(serializer.Deserialize(NULL, &error)));
+ scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>(
+ serializer.Deserialize(NULL, &error)));
if (!root.get()) {
string16 messages_file = message_path.LossyDisplayName();
if (error.empty()) {
diff --git a/chrome/common/extensions/value_builder.cc b/chrome/common/extensions/value_builder.cc
index 2b09858..1fd6794 100644
--- a/chrome/common/extensions/value_builder.cc
+++ b/chrome/common/extensions/value_builder.cc
@@ -4,16 +4,13 @@
#include "chrome/common/extensions/value_builder.h"
-using base::DictionaryValue;
-using base::ListValue;
-
namespace extensions {
// DictionaryBuilder
-DictionaryBuilder::DictionaryBuilder() : dict_(new DictionaryValue) {}
+DictionaryBuilder::DictionaryBuilder() : dict_(new base::DictionaryValue) {}
-DictionaryBuilder::DictionaryBuilder(const DictionaryValue& init)
+DictionaryBuilder::DictionaryBuilder(const base::DictionaryValue& init)
: dict_(init.DeepCopy()) {}
DictionaryBuilder::~DictionaryBuilder() {}
@@ -62,8 +59,9 @@ DictionaryBuilder& DictionaryBuilder::SetBoolean(
// ListBuilder
-ListBuilder::ListBuilder() : list_(new ListValue) {}
-ListBuilder::ListBuilder(const ListValue& init) : list_(init.DeepCopy()) {}
+ListBuilder::ListBuilder() : list_(new base::ListValue) {}
+ListBuilder::ListBuilder(const base::ListValue& init) : list_(init.DeepCopy()) {
+}
ListBuilder::~ListBuilder() {}
ListBuilder& ListBuilder::Append(int in_value) {
diff --git a/chrome/common/extensions/web_accessible_resources_handler.cc b/chrome/common/extensions/web_accessible_resources_handler.cc
index 917c856..80a34cd 100644
--- a/chrome/common/extensions/web_accessible_resources_handler.cc
+++ b/chrome/common/extensions/web_accessible_resources_handler.cc
@@ -64,7 +64,7 @@ WebAccessibleResourcesHandler::~WebAccessibleResourcesHandler() {
bool WebAccessibleResourcesHandler::Parse(Extension* extension,
string16* error) {
scoped_ptr<WebAccessibleResourcesInfo> info(new WebAccessibleResourcesInfo);
- const ListValue* list_value = NULL;
+ const base::ListValue* list_value = NULL;
if (!extension->manifest()->GetList(keys::kWebAccessibleResources,
&list_value)) {
*error = ASCIIToUTF16(errors::kInvalidWebAccessibleResourcesList);