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

Side by Side Diff: chrome/browser/gtk/options/options_window_gtk.cc

Issue 208021: Remove the intializaton of the Download Manager when bringing up (Closed)
Patch Set: Created 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/views/options/options_window_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/options_window.h" 5 #include "chrome/browser/options_window.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // OptionsWindowGtk, public: 74 // OptionsWindowGtk, public:
75 75
76 OptionsWindowGtk::OptionsWindowGtk(Profile* profile) 76 OptionsWindowGtk::OptionsWindowGtk(Profile* profile)
77 // Always show preferences for the original profile. Most state when off 77 // Always show preferences for the original profile. Most state when off
78 // the record comes from the original profile, but we explicitly use 78 // the record comes from the original profile, but we explicitly use
79 // the original profile to avoid potential problems. 79 // the original profile to avoid potential problems.
80 : profile_(profile->GetOriginalProfile()), 80 : profile_(profile->GetOriginalProfile()),
81 general_page_(profile_), 81 general_page_(profile_),
82 content_page_(profile_), 82 content_page_(profile_),
83 advanced_page_(profile_) { 83 advanced_page_(profile_) {
84 // The download manager needs to be initialized before the contents of the
85 // Options Window are created.
86 profile_->GetDownloadManager();
87 // We don't need to observe changes in this value. 84 // We don't need to observe changes in this value.
88 last_selected_page_.Init(prefs::kOptionsWindowLastTabIndex, 85 last_selected_page_.Init(prefs::kOptionsWindowLastTabIndex,
89 g_browser_process->local_state(), NULL); 86 g_browser_process->local_state(), NULL);
90 87
91 dialog_ = gtk_dialog_new_with_buttons( 88 dialog_ = gtk_dialog_new_with_buttons(
92 l10n_util::GetStringFUTF8(IDS_OPTIONS_DIALOG_TITLE, 89 l10n_util::GetStringFUTF8(IDS_OPTIONS_DIALOG_TITLE,
93 WideToUTF16(l10n_util::GetString(IDS_PRODUCT_NAME))).c_str(), 90 WideToUTF16(l10n_util::GetString(IDS_PRODUCT_NAME))).c_str(),
94 // Prefs window is shared between all browser windows. 91 // Prefs window is shared between all browser windows.
95 NULL, 92 NULL,
96 // Non-modal. 93 // Non-modal.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 OptionsGroup highlight_group, 200 OptionsGroup highlight_group,
204 Profile* profile) { 201 Profile* profile) {
205 DCHECK(profile); 202 DCHECK(profile);
206 // If there's already an existing options window, activate it and switch to 203 // If there's already an existing options window, activate it and switch to
207 // the specified page. 204 // the specified page.
208 if (!options_window) { 205 if (!options_window) {
209 options_window = new OptionsWindowGtk(profile); 206 options_window = new OptionsWindowGtk(profile);
210 } 207 }
211 options_window->ShowOptionsPage(page, highlight_group); 208 options_window->ShowOptionsPage(page, highlight_group);
212 } 209 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/options/options_window_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698