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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

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/debugger/devtools_window.cc ('k') | chrome/browser/ui/cocoa/window_size_autosaver.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index e26a64dd31e7a27c6d30f70a9949a383a315aeb9..2eac3311f3b61ba1bd990106ed25662e038b1984 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -8,6 +8,7 @@
#import "base/memory/scoped_nsobject.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.h"
#include "chrome/browser/ui/browser_list.h"
#import "chrome/browser/ui/cocoa/fast_resize_view.h"
@@ -116,8 +117,8 @@ enum {
if (browser_->ShouldSaveWindowPlacement())
browser_->SaveWindowPlacement(bounds, /*maximized=*/ false);
- DictionaryValue* windowPreferences = prefs->GetMutableDictionary(
- browser_->GetWindowPlacementKey().c_str());
+ DictionaryPrefUpdate update(prefs, browser_->GetWindowPlacementKey().c_str());
+ DictionaryValue* windowPreferences = update.Get();
windowPreferences->SetInteger("left", bounds.x());
windowPreferences->SetInteger("top", bounds.y());
windowPreferences->SetInteger("right", bounds.right());
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/ui/cocoa/window_size_autosaver.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698