| Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
|
| diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
|
| index 687dca2a90f47b1367a8f3b141ddb4acef686fd8..3eb18c799a9d60a888591802bd54fa6ed5fa3fed 100644
|
| --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
|
| +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
|
| @@ -18,12 +18,11 @@ using autofill::PasswordFormMap;
|
| ManagePasswordsBubbleModel::ManagePasswordsBubbleModel(
|
| content::WebContents* web_contents)
|
| : content::WebContentsObserver(web_contents),
|
| - web_contents_(web_contents),
|
| display_disposition_(
|
| password_manager::metrics_util::AUTOMATIC_WITH_PASSWORD_PENDING),
|
| dismissal_reason_(password_manager::metrics_util::NOT_DISPLAYED) {
|
| ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller =
|
| - ManagePasswordsBubbleUIController::FromWebContents(web_contents_);
|
| + ManagePasswordsBubbleUIController::FromWebContents(web_contents);
|
|
|
| if (manage_passwords_bubble_ui_controller->password_to_be_saved())
|
| manage_passwords_bubble_state_ = PASSWORD_TO_BE_SAVED;
|
| @@ -87,7 +86,7 @@ void ManagePasswordsBubbleModel::OnNopeClicked() {
|
| void ManagePasswordsBubbleModel::OnNeverForThisSiteClicked() {
|
| dismissal_reason_ = password_manager::metrics_util::CLICKED_NEVER;
|
| ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller =
|
| - ManagePasswordsBubbleUIController::FromWebContents(web_contents_);
|
| + ManagePasswordsBubbleUIController::FromWebContents(web_contents());
|
| manage_passwords_bubble_ui_controller->NeverSavePassword();
|
| manage_passwords_bubble_ui_controller->unset_password_to_be_saved();
|
| manage_passwords_bubble_state_ = NEVER_SAVE_PASSWORDS;
|
| @@ -96,7 +95,7 @@ void ManagePasswordsBubbleModel::OnNeverForThisSiteClicked() {
|
| void ManagePasswordsBubbleModel::OnSaveClicked() {
|
| dismissal_reason_ = password_manager::metrics_util::CLICKED_SAVE;
|
| ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller =
|
| - ManagePasswordsBubbleUIController::FromWebContents(web_contents_);
|
| + ManagePasswordsBubbleUIController::FromWebContents(web_contents());
|
| manage_passwords_bubble_ui_controller->SavePassword();
|
| manage_passwords_bubble_ui_controller->unset_password_to_be_saved();
|
| manage_passwords_bubble_state_ = MANAGE_PASSWORDS;
|
| @@ -108,17 +107,17 @@ void ManagePasswordsBubbleModel::OnDoneClicked() {
|
|
|
| void ManagePasswordsBubbleModel::OnManageLinkClicked() {
|
| dismissal_reason_ = password_manager::metrics_util::CLICKED_MANAGE;
|
| - ManagePasswordsBubbleUIController::FromWebContents(web_contents_)
|
| + ManagePasswordsBubbleUIController::FromWebContents(web_contents())
|
| ->NavigateToPasswordManagerSettingsPage();
|
| }
|
|
|
| void ManagePasswordsBubbleModel::OnPasswordAction(
|
| const autofill::PasswordForm& password_form,
|
| PasswordAction action) {
|
| - if (!web_contents_)
|
| + if (!web_contents())
|
| return;
|
| Profile* profile =
|
| - Profile::FromBrowserContext(web_contents_->GetBrowserContext());
|
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
| password_manager::PasswordStore* password_store =
|
| PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS)
|
| .get();
|
| @@ -129,8 +128,7 @@ void ManagePasswordsBubbleModel::OnPasswordAction(
|
| password_store->AddLogin(password_form);
|
| }
|
|
|
| -void ManagePasswordsBubbleModel::WebContentsDestroyed(
|
| - content::WebContents* web_contents) {
|
| +void ManagePasswordsBubbleModel::WebContentsDestroyed() {
|
| // The WebContents have been destroyed.
|
| web_contents_ = NULL;
|
| }
|
|
|