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(). |