Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index 987eee25874e7c36776b314ae8813998518bf429..378e45cf08dccc7fdc4480d787b32c7ede96a92a 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -2791,13 +2791,9 @@ void TestingAutomationProvider::PerformActionOnSearchEngine( |
void TestingAutomationProvider::GetPrefsInfo(Browser* browser, |
DictionaryValue* args, |
IPC::Message* reply_message) { |
- const PrefService::PreferenceSet& prefs = |
- profile_->GetPrefs()->preference_set(); |
DictionaryValue* items = new DictionaryValue; |
- for (PrefService::PreferenceSet::const_iterator it = prefs.begin(); |
- it != prefs.end(); ++it) { |
- items->Set((*it)->name(), (*it)->GetValue()->DeepCopy()); |
- } |
+ profile_->GetPrefs()->GetPreferenceValues(items); |
Mattias Nissler (ping if slow)
2011/01/26 17:55:11
Seems like we could create the DictionaryValue in
battre
2011/01/27 09:53:27
Done.
|
+ |
scoped_ptr<DictionaryValue> return_value(new DictionaryValue); |
return_value->Set("prefs", items); // return_value owns items. |
AutomationJSONReply(this, reply_message).SendSuccess(return_value.get()); |