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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 6735032: Get rid of PrefService::GetMutableDictionary/GetMutableList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another windows compile error Created 9 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 | « chrome/browser/ui/gtk/task_manager_gtk.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 35b5bc3f5d4fc90739fc30a6c6a1a793d61af374..cd63fabd562c0457fd6939b4ad24c511532ab371 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -9,6 +9,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/views/accessibility_event_router_views.h"
#include "chrome/browser/ui/window_sizer.h"
@@ -60,8 +61,8 @@ void ChromeViewsDelegate::SaveWindowPlacement(views::Window* window,
return;
DCHECK(prefs->FindPreference(WideToUTF8(window_name).c_str()));
- DictionaryValue* window_preferences =
- prefs->GetMutableDictionary(WideToUTF8(window_name).c_str());
+ DictionaryPrefUpdate update(prefs, WideToUTF8(window_name).c_str());
+ DictionaryValue* window_preferences = update.Get();
window_preferences->SetInteger("left", bounds.x());
window_preferences->SetInteger("top", bounds.y());
window_preferences->SetInteger("right", bounds.right());
« no previous file with comments | « chrome/browser/ui/gtk/task_manager_gtk.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698