| Index: components/autofill/core/browser/password_autofill_manager.cc
|
| diff --git a/components/autofill/core/browser/password_autofill_manager.cc b/components/autofill/core/browser/password_autofill_manager.cc
|
| index def93f407f2058ae1887d4994890a2211c342a27..0106a336163b617383982135d792f4073a21f40f 100644
|
| --- a/components/autofill/core/browser/password_autofill_manager.cc
|
| +++ b/components/autofill/core/browser/password_autofill_manager.cc
|
| @@ -2,10 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "components/autofill/core/browser/autofill_driver.h"
|
| #include "components/autofill/core/browser/password_autofill_manager.h"
|
| -#include "components/autofill/core/common/autofill_messages.h"
|
| -#include "content/public/browser/render_view_host.h"
|
| -#include "content/public/browser/web_contents.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
|
|
| namespace autofill {
|
| @@ -14,7 +12,7 @@ namespace autofill {
|
| // PasswordAutofillManager, public:
|
|
|
| PasswordAutofillManager::PasswordAutofillManager(
|
| - content::WebContents* web_contents) : web_contents_(web_contents) {
|
| + AutofillDriver* autofill_driver) : autofill_driver_(autofill_driver) {
|
| }
|
|
|
| PasswordAutofillManager::~PasswordAutofillManager() {
|
| @@ -28,13 +26,10 @@ bool PasswordAutofillManager::DidAcceptAutofillSuggestion(
|
| return false;
|
|
|
| if (WillFillUserNameAndPassword(value, password)) {
|
| - if (web_contents_) {
|
| - content::RenderViewHost* render_view_host =
|
| - web_contents_->GetRenderViewHost();
|
| - render_view_host->Send(new AutofillMsg_AcceptPasswordAutofillSuggestion(
|
| - render_view_host->GetRoutingID(),
|
| - value));
|
| - }
|
| + // TODO(jeanfrancoisg): Remove 'if' once PasswordAutofillManagerTest fully
|
| + // mocks the autofill_driver_. http://crbug.com/321721
|
| + if (autofill_driver_)
|
| + autofill_driver_->RendererShouldAcceptPasswordAutofillSuggestion(value);
|
| return true;
|
| }
|
|
|
|
|