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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 12601006: Removing base::DictionaryValue::key_iterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 years, 9 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 | « base/values.cc ('k') | chrome/browser/net/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 31d0d888c20842d1e4b4114e2714cddd7da82db4..ed4444ae4ce3a8fd38be7a5e10f15bf22a9799fd 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -1177,11 +1177,10 @@ void ExtensionPrefs::GetSavedFileEntries(
const DictionaryValue* file_entries = NULL;
if (!prefs->GetDictionary(kFileEntries, &file_entries))
return;
- for (DictionaryValue::key_iterator it = file_entries->begin_keys();
- it != file_entries->end_keys(); ++it) {
- std::string id = *it;
+ for (DictionaryValue::Iterator it(*file_entries); !it.IsAtEnd();
+ it.Advance()) {
const DictionaryValue* file_entry = NULL;
- if (!file_entries->GetDictionaryWithoutPathExpansion(id, &file_entry))
+ if (!it.value().GetAsDictionary(&file_entry))
continue;
base::FilePath::StringType path_string;
if (!file_entry->GetString(kFileEntryPath, &path_string))
@@ -1191,7 +1190,7 @@ void ExtensionPrefs::GetSavedFileEntries(
continue;
base::FilePath file_path(path_string);
out->push_back(app_file_handler_util::SavedFileEntry(
- id, file_path, writable));
+ it.key(), file_path, writable));
}
}
@@ -2047,7 +2046,7 @@ void ExtensionPrefs::LoadExtensionControlledPrefs(
if (!source_dict->GetDictionary(key, &preferences))
return;
- for (DictionaryValue::Iterator i(*preferences); i.HasNext(); i.Advance()) {
+ for (DictionaryValue::Iterator i(*preferences); !i.IsAtEnd(); i.Advance()) {
extension_pref_value_map_->SetExtensionPref(
extension_id, i.key(), scope, i.value().DeepCopy());
}
« no previous file with comments | « base/values.cc ('k') | chrome/browser/net/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698