Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6521)

Unified Diff: chrome/common/extensions/api/extension_api.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more, Windows-only Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/extension_api.cc
diff --git a/chrome/common/extensions/api/extension_api.cc b/chrome/common/extensions/api/extension_api.cc
index 956c8e8cfb63de8276cba9fdb7787d281f439d53..2a7d9b016fa2ea0283a559c5c3c93b6f78dc9364 100644
--- a/chrome/common/extensions/api/extension_api.cc
+++ b/chrome/common/extensions/api/extension_api.cc
@@ -50,8 +50,8 @@ bool IsUnprivileged(const DictionaryValue* dict) {
// children with an { "unprivileged": true } property.
bool HasUnprivilegedChild(const DictionaryValue* name_space_node,
const std::string& child_kind) {
- ListValue* child_list = NULL;
- DictionaryValue* child_dict = NULL;
+ const ListValue* child_list = NULL;
+ const DictionaryValue* child_dict = NULL;
if (name_space_node->GetList(child_kind, &child_list)) {
for (size_t i = 0; i < child_list->GetSize(); ++i) {
@@ -119,7 +119,7 @@ const DictionaryValue* GetSchemaChild(const DictionaryValue* schema_node,
const std::string& child_name) {
DictionaryValue* child_node = NULL;
for (size_t i = 0; i < arraysize(kChildKinds); ++i) {
- ListValue* list_node = NULL;
+ const ListValue* list_node = NULL;
if (!schema_node->GetList(kChildKinds[i], &list_node))
continue;
child_node = FindListItem(list_node, "name", child_name);
@@ -796,7 +796,7 @@ void ExtensionAPI::GetMissingDependencies(
const DictionaryValue* schema = GetSchema(feature_name);
CHECK(schema) << "Schema for " << feature_name << " not found";
- ListValue* dependencies = NULL;
+ const ListValue* dependencies = NULL;
if (!schema->GetList("dependencies", &dependencies))
return;

Powered by Google App Engine
This is Rietveld 408576698