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

Unified Diff: chrome/browser/ui/gtk/browser_window_gtk.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
Index: chrome/browser/ui/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 1f984c4ef5218d38ad229995469c56d308192422..cc92cc4dc5bc817e60675302fee8c52fe814a16d 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/page_info_window.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/tabs/tab_strip_model.h"
#include "chrome/browser/themes/theme_service.h"
@@ -1785,9 +1786,9 @@ void BrowserWindowGtk::SaveWindowPosition() {
return;
std::string window_name = browser_->GetWindowPlacementKey();
- DictionaryValue* window_preferences =
- browser_->profile()->GetPrefs()->
- GetMutableDictionary(window_name.c_str());
+ DictionaryPrefUpdate update(browser_->profile()->GetPrefs(),
+ window_name.c_str());
+ DictionaryValue* window_preferences = update.Get();
// Note that we store left/top for consistency with Windows, but that we
// *don't* obey them; we only use them for computing width/height. See
// comments in SetGeometryHints().
« no previous file with comments | « chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm ('k') | chrome/browser/ui/gtk/task_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698