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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 780183002: Remove ContentPasswordManagerDriver::GetAutofillManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: vabr review Created 6 years 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/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 0ad9df43ffb94fe6c980db669d15e1f2aa783695..ff52b68d8e6377693d7ed705fbce3234c8101c3b 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -23,6 +23,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/url_constants.h"
+#include "components/autofill/content/browser/content_autofill_driver.h"
+#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "components/autofill/content/common/autofill_messages.h"
#include "components/autofill/core/browser/password_generator.h"
#include "components/autofill/core/common/password_form.h"
@@ -363,6 +365,16 @@ ChromePasswordManagerClient::GetPasswordManager() {
return &password_manager_;
}
+autofill::AutofillManager*
+ChromePasswordManagerClient::GetAutofillManagerForMainFrame() {
+ autofill::ContentAutofillDriverFactory* factory =
+ autofill::ContentAutofillDriverFactory::FromWebContents(web_contents());
+ return factory
+ ? factory->DriverForFrame(web_contents()->GetMainFrame())
+ ->autofill_manager()
+ : nullptr;
+}
+
void ChromePasswordManagerClient::SetTestObserver(
autofill::PasswordGenerationPopupObserver* observer) {
observer_ = observer;

Powered by Google App Engine
This is Rietveld 408576698