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

Unified Diff: tools/json_schema_compiler/util.h

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
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util.h
diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h
index f0459dcd0d961b3b2dc4965fc0dda66f9e5122e6..61148c616a4e6ac2b268b61feb25331c1f50dde3 100644
--- a/tools/json_schema_compiler/util.h
+++ b/tools/json_schema_compiler/util.h
@@ -67,7 +67,7 @@ bool PopulateArrayFromDictionary(
const base::DictionaryValue& from,
const std::string& name,
std::vector<T>* out) {
- base::ListValue* list = NULL;
+ const base::ListValue* list = NULL;
if (!from.GetListWithoutPathExpansion(name, &list))
return false;
@@ -102,16 +102,16 @@ bool PopulateOptionalArrayFromDictionary(
const base::DictionaryValue& from,
const std::string& name,
scoped_ptr<std::vector<T> >* out) {
- base::ListValue* list = NULL;
+ const base::ListValue* list = NULL;
{
- base::Value* maybe_list = NULL;
+ const base::Value* maybe_list = NULL;
// Since |name| is optional, its absence is acceptable. However, anything
// other than a ListValue is not.
if (!from.GetWithoutPathExpansion(name, &maybe_list))
return true;
if (!maybe_list->IsType(base::Value::TYPE_LIST))
return false;
- list = static_cast<base::ListValue*>(maybe_list);
+ list = static_cast<const base::ListValue*>(maybe_list);
}
return PopulateOptionalArrayFromList(*list, out);
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698