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

Unified Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 5915006: Remove user-related data from local_state and add to user_preferences, i... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
Index: chrome/browser/ui/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/browser_window_gtk.cc (revision 73335)
+++ chrome/browser/ui/gtk/browser_window_gtk.cc (working copy)
@@ -1273,8 +1273,8 @@
} else if (should_hide) {
// Store split offset when hiding devtools window only.
gint divider_offset = gtk_paned_get_position(GTK_PANED(contents_split_));
- g_browser_process->local_state()->SetInteger(
- prefs::kDevToolsSplitLocation, divider_offset);
+ browser_->profile()->GetPrefs()->
+ SetInteger(prefs::kDevToolsSplitLocation, divider_offset);
gtk_widget_hide(devtools_container_->widget());
}
}
@@ -1597,8 +1597,8 @@
FALSE, TRUE);
gtk_box_pack_end(GTK_BOX(render_area_vbox_), contents_split_, TRUE, TRUE, 0);
// Restore split offset.
- int split_offset = g_browser_process->local_state()->GetInteger(
- prefs::kDevToolsSplitLocation);
+ int split_offset = browser_->profile()->GetPrefs()->
+ GetInteger(prefs::kDevToolsSplitLocation);
if (split_offset != -1) {
if (split_offset < kMinDevToolsHeight)
split_offset = kMinDevToolsHeight;
@@ -1758,13 +1758,13 @@
// We also need to save the placement for startup.
// This is a web of calls between views and delegates on Windows, but the
// crux of the logic follows. See also cocoa/browser_window_controller.mm.
- if (!g_browser_process->local_state())
+ if (!browser_->profile()->GetPrefs())
return;
std::string window_name = browser_->GetWindowPlacementKey();
DictionaryValue* window_preferences =
- g_browser_process->local_state()->GetMutableDictionary(
- window_name.c_str());
+ browser_->profile()->GetPrefs()->
+ GetMutableDictionary(window_name.c_str());
// 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/options/preferences_window_controller.mm ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698