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

Unified Diff: chrome/browser/gtk/options/content_page_gtk.cc

Issue 3007004: [GTK] Fix pref initialization order so options page doesn't instantly crash. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/content_page_gtk.cc
diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
index 4d86fbd2684fe81673439069434de1d316fcd45a..1532e2cbcff944c2910fc670a0edd5793b64da8a 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -98,6 +98,14 @@ ContentPageGtk::ContentPageGtk(Profile* profile)
UpdateSyncControls();
}
+ // Add preferences observers.
+ ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled,
+ profile->GetPrefs(), this);
+ if (browser_defaults::kCanToggleSystemTitleBar) {
+ use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
+ profile->GetPrefs(), this);
+ }
+
options_builder->AddOptionGroup(
l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_GROUP_NAME),
InitPasswordSavingGroup(), false);
@@ -114,15 +122,6 @@ ContentPageGtk::ContentPageGtk(Profile* profile)
InitThemesGroup(), false);
page_ = options_builder->get_page_widget();
- // Add preferences observers.
- ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled,
- profile->GetPrefs(), this);
-
- if (browser_defaults::kCanToggleSystemTitleBar) {
- use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
- profile->GetPrefs(), this);
- }
-
// Load initial values.
NotifyPrefChanged(NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698