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

Unified Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 151413008: Move ownership of Password(Generation)Manager to ContentPasswordDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle WebContents having no PasswordManagerDelegateImpl attached Created 6 years, 10 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
Index: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
index 9c3dfdb3ce4accbe48189075719eec96186f60e6..a26b4fe0b365694c5cccb08c2d7cff23514f84cf 100644
--- a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
+++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/password_manager/password_generation_manager.h"
+#include "chrome/browser/password_manager/password_manager_delegate_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
@@ -148,7 +149,8 @@ void TabAutofillManagerDelegate::HideAutofillPopup() {
// Password generation popups behave in the same fashion and should also
// be hidden.
PasswordGenerationManager* generation_manager =
- PasswordGenerationManager::FromWebContents(web_contents_);
+ PasswordManagerDelegateImpl::GetGenerationManagerFromWebContents(
+ web_contents_);
if (generation_manager)
generation_manager->HidePopup();
}
@@ -187,7 +189,8 @@ void TabAutofillManagerDelegate::WebContentsDestroyed(
void TabAutofillManagerDelegate::DetectAccountCreationForms(
const std::vector<autofill::FormStructure*>& forms) {
PasswordGenerationManager* manager =
- PasswordGenerationManager::FromWebContents(web_contents_);
+ PasswordManagerDelegateImpl::GetGenerationManagerFromWebContents(
+ web_contents_);
if (manager)
manager->DetectAccountCreationForms(forms);
}
« no previous file with comments | « chrome/browser/password_manager/password_manager_unittest.cc ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698