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

Unified Diff: chrome/common/extensions/message_bundle.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
« no previous file with comments | « chrome/common/extensions/features/feature.cc ('k') | chrome/common/net/gaia/oauth2_mint_token_flow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/message_bundle.cc
diff --git a/chrome/common/extensions/message_bundle.cc b/chrome/common/extensions/message_bundle.cc
index 8e199af7fc93fc7cd9ceb10f3e7ec46e0b2934b0..9e39b98b542611e6fb7e454b962501cb699e70ae 100644
--- a/chrome/common/extensions/message_bundle.cc
+++ b/chrome/common/extensions/message_bundle.cc
@@ -134,7 +134,7 @@ bool MessageBundle::GetMessageValue(const std::string& key,
std::string* value,
std::string* error) const {
// Get the top level tree for given key (name part).
- DictionaryValue* name_tree;
+ const DictionaryValue* name_tree;
if (!catalog.GetDictionaryWithoutPathExpansion(key, &name_tree)) {
*error = base::StringPrintf("Not a valid tree for key %s.", key.c_str());
return false;
@@ -166,7 +166,7 @@ bool MessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
if (!name_tree.HasKey(kPlaceholdersKey))
return true;
- DictionaryValue* placeholders_tree;
+ const 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());
@@ -175,7 +175,7 @@ bool MessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
for (DictionaryValue::key_iterator key_it = placeholders_tree->begin_keys();
key_it != placeholders_tree->end_keys(); ++key_it) {
- DictionaryValue* placeholder;
+ const DictionaryValue* placeholder;
const std::string& content_key(*key_it);
if (!IsValidName(content_key))
return BadKeyMessage(content_key, error);
« no previous file with comments | « chrome/common/extensions/features/feature.cc ('k') | chrome/common/net/gaia/oauth2_mint_token_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698