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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6353015: Fix broken PrefService::preference_set() returning not all registered preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | chrome/browser/prefs/pref_service.h » ('j') | chrome/browser/prefs/pref_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_service.h » ('j') | chrome/browser/prefs/pref_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698