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

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: Addressed comments 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') | no next file with comments »
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..960bee2f18979f23c505bd8226ccfae06faec056 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2791,13 +2791,8 @@ 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());
- }
+ DictionaryValue* items = profile_->GetPrefs()->GetPreferenceValues();
+
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698