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

Unified Diff: chrome/browser/policy/policy_loader_win.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/browser/policy/policy_loader_win.cc
diff --git a/chrome/browser/policy/policy_loader_win.cc b/chrome/browser/policy/policy_loader_win.cc
index 2f25fa56f409e9c64dda9993088cdc2ad94d256a..0bef5a9f013ebcd32f67b0a5d37855a4cc9a6aa4 100644
--- a/chrome/browser/policy/policy_loader_win.cc
+++ b/chrome/browser/policy/policy_loader_win.cc
@@ -263,11 +263,11 @@ base::Value::Type GetDefaultFor(DWORD reg_type) {
}
// Returns the entry with key |name| in |dictionary| (can be NULL), or NULL.
-base::DictionaryValue* GetEntry(const base::DictionaryValue* dictionary,
+const base::DictionaryValue* GetEntry(const base::DictionaryValue* dictionary,
const std::string& name) {
if (!dictionary)
return NULL;
- base::DictionaryValue* entry = NULL;
+ const base::DictionaryValue* entry = NULL;
dictionary->GetDictionary(name, &entry);
return entry;
}
@@ -275,10 +275,10 @@ base::DictionaryValue* GetEntry(const base::DictionaryValue* dictionary,
// Returns the schema for property |name| given the |schema| of an object.
// Returns the "additionalProperties" schema if no specific schema for
// |name| is present. Returns NULL if no schema is found.
-base::DictionaryValue* GetSchemaFor(const base::DictionaryValue* schema,
+const base::DictionaryValue* GetSchemaFor(const base::DictionaryValue* schema,
const std::string& name) {
- base::DictionaryValue* properties = GetEntry(schema, kProperties);
- base::DictionaryValue* sub_schema = GetEntry(properties, name);
+ const base::DictionaryValue* properties = GetEntry(schema, kProperties);
+ const base::DictionaryValue* sub_schema = GetEntry(properties, name);
if (sub_schema)
return sub_schema;
// "additionalProperties" can be a boolean, but that case is ignored.
@@ -470,7 +470,7 @@ base::DictionaryValue* ReadComponentDictionaryValue(
continue;
}
- base::DictionaryValue* sub_schema = GetSchemaFor(schema, name);
+ const base::DictionaryValue* sub_schema = GetSchemaFor(schema, name);
base::Value::Type type = GetType(sub_schema, base::Value::TYPE_DICTIONARY);
base::Value* value = NULL;
const string16 sub_path = path + kPathSep + name16;
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698