Commit 44bd4ba5 authored by skuhne@chromium.org's avatar skuhne@chromium.org

Removal of GetDefaultProfile for new charger messages

As discussed - it's time to get rid of the GetDefaultProfile now.

BUG=322682
TEST=covered by existing unit tests

Review URL: https://codereview.chromium.org/128583002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243963 0039d316-1c4b-4281-b951-d872f2087c98
parent bc3ec20f
......@@ -38,8 +38,11 @@ ChargerLinkDialog::~ChargerLinkDialog() {
}
void ChargerLinkDialog::Show() {
// We show the dialog for the active user, so that the dialog will get
// displayed immediately. The parent window is a system modal/lock container
// and does not belong to any user.
chrome::ShowWebDialog(parent_window_,
ProfileManager::GetDefaultProfile(),
ProfileManager::GetActiveUserProfile(),
this);
}
......
......@@ -73,9 +73,13 @@ void ChargerReplacementDialog::Show() {
content::UserMetricsAction("ShowChargerReplacementDialog"));
is_window_visible_ = true;
current_window_ = chrome::ShowWebDialog(parent_window_,
ProfileManager::GetDefaultProfile(),
this);
// We show the dialog for the active user, so that the dialog will get
// displayed immediately. The parent window is a system modal/lock container
// and does not belong to any user.
current_window_ = chrome::ShowWebDialog(
parent_window_,
ProfileManager::GetActiveUserProfile(),
this);
charger_replacement_handler_->set_charger_window(current_window_);
}
......
......@@ -48,7 +48,7 @@ class ChargerReplacementDialog : public ui::WebDialogDelegate {
static bool is_window_visible_;
static gfx::NativeWindow current_window_;
gfx::NativeWindow parent_window_;
const gfx::NativeWindow parent_window_;
bool can_close_;
ChargerReplacementHandler* charger_replacement_handler_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment