diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-05 17:05:35 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-05 17:05:35 +0000 |
commit | 3bd3b2be39ff89c234d33f0ee9620a80258cc2ca (patch) | |
tree | dc63e0e57b773a6dc7f39b3c663bfb735aadd793 /chrome/browser/login_prompt.cc | |
parent | 4801ecc5ce684ec8556769cb173506b4645c618b (diff) | |
download | chromium_src-3bd3b2be39ff89c234d33f0ee9620a80258cc2ca.zip chromium_src-3bd3b2be39ff89c234d33f0ee9620a80258cc2ca.tar.gz chromium_src-3bd3b2be39ff89c234d33f0ee9620a80258cc2ca.tar.bz2 |
Remove more reliance on tab contents types.
Review URL: http://codereview.chromium.org/62041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/login_prompt.cc')
-rw-r--r-- | chrome/browser/login_prompt.cc | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/chrome/browser/login_prompt.cc b/chrome/browser/login_prompt.cc index 6a4a59d..ae2cc4d 100644 --- a/chrome/browser/login_prompt.cc +++ b/chrome/browser/login_prompt.cc @@ -348,21 +348,19 @@ class LoginDialogTask : public Task { auth_info_->host, auth_info_->realm); LoginView* view = new LoginView(explanation); - // Tell the password manager to look for saved passwords. There is only - // a password manager when dealing with a WebContents type. - if (parent_contents->type() == TAB_CONTENTS_WEB) { - PasswordManager* password_manager = - parent_contents->AsWebContents()->GetPasswordManager(); - // Set the model for the login view. The model (password manager) is owned - // by the view's parent TabContents, so natural destruction order means we - // don't have to worry about calling SetModel(NULL), because the view will - // be deleted before the password manager. - view->SetModel(password_manager); - std::vector<PasswordForm> v; - MakeInputForPasswordManager(parent_contents->GetURL(), &v); - password_manager->PasswordFormsSeen(v); - handler_->set_password_manager(password_manager); - } + + // Tell the password manager to look for saved passwords. + PasswordManager* password_manager = + parent_contents->AsWebContents()->GetPasswordManager(); + // Set the model for the login view. The model (password manager) is owned + // by the view's parent TabContents, so natural destruction order means we + // don't have to worry about calling SetModel(NULL), because the view will + // be deleted before the password manager. + view->SetModel(password_manager); + std::vector<PasswordForm> v; + MakeInputForPasswordManager(parent_contents->GetURL(), &v); + password_manager->PasswordFormsSeen(v); + handler_->set_password_manager(password_manager); handler_->set_login_view(view); ConstrainedWindow* dialog = |