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

Unified Diff: chrome/browser/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: svn pset 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/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 71191)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -66,6 +66,7 @@
#include "chrome/browser/page_info_window.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -1273,8 +1274,9 @@
} 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);
+ ProfileManager* profile_manager = g_browser_process->profile_manager();
+ profile_manager->GetDefaultProfile()->GetPrefs()->
+ SetInteger(prefs::kDevToolsSplitLocation, divider_offset);
gtk_widget_hide(devtools_container_->widget());
}
}
@@ -1597,8 +1599,9 @@
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);
+ ProfileManager* profile_manager = g_browser_process->profile_manager();
+ int split_offset = profile_manager->GetDefaultProfile()->GetPrefs()->
+ GetInteger(prefs::kDevToolsSplitLocation);
if (split_offset != -1) {
if (split_offset < kMinDevToolsHeight)
split_offset = kMinDevToolsHeight;
@@ -1758,13 +1761,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 (!g_browser_process->profile_manager())
return;
std::string window_name = browser_->GetWindowPlacementKey();
DictionaryValue* window_preferences =
- g_browser_process->local_state()->GetMutableDictionary(
- window_name.c_str());
+ g_browser_process->profile_manager()->GetDefaultProfile()->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().

Powered by Google App Engine
This is Rietveld 408576698