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

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

Issue 511393003: No longer register app window placement preference keys on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update to ToT and fix scoped_refptr error Created 6 years, 3 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/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 6ffb2ca5ebe248c5932e4db0a79fea4b9b7a256d..7a31e96170783dc07bd0b3cdeed5abb35c125cf3 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -126,10 +126,11 @@ const CGFloat kLocBarBottomInset = 1;
gfx::Rect workArea(NSRectToCGRect([windowScreen visibleFrame]));
workArea.set_y(monitorFrame.size.height - workArea.y() - workArea.height());
- DictionaryPrefUpdate update(
- prefs,
- chrome::GetWindowPlacementKey(browser_.get()).c_str());
- base::DictionaryValue* windowPreferences = update.Get();
+ scoped_ptr<DictionaryPrefUpdate> update =
+ chrome::GetWindowPlacementDictionaryReadWrite(
+ chrome::GetWindowName(browser_.get()),
+ browser_->profile()->GetPrefs());
+ base::DictionaryValue* windowPreferences = update->Get();
windowPreferences->SetInteger("left", bounds.x());
windowPreferences->SetInteger("top", bounds.y());
windowPreferences->SetInteger("right", bounds.right());

Powered by Google App Engine
This is Rietveld 408576698