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

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: Reverting webdriver:Command::parameters_ to const 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 6932ea7b1d970476a003be62682b47250ca94e56..5001a354d236fd6a5dd8410954010459a36260e7 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);
@@ -798,7 +798,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;
« no previous file with comments | « chrome/browser/web_resource/notification_promo.cc ('k') | chrome/common/extensions/api/extension_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698