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

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

Issue 10704147: Always query for the latest RenderViewHost from WebContents before sending the NOtBlacklistedMessag… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/password_manager/password_form_manager.cc
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index b9cc0bc9177baa5f4daa88603c27c143ca9d4b66..7d3b69814a5c6f26fdba526fbe175f31b8926180 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/autofill_messages.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/web_contents.h"
#include "webkit/forms/password_form_dom_manager.h"
using base::Time;
@@ -23,7 +24,7 @@ using webkit::forms::PasswordFormMap;
PasswordFormManager::PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
- content::RenderViewHost* host,
+ content::WebContents* web_contents,
const PasswordForm& observed_form,
bool ssl_valid)
: best_matches_deleter_(&best_matches_),
@@ -35,7 +36,7 @@ PasswordFormManager::PasswordFormManager(Profile* profile,
preferred_match_(NULL),
state_(PRE_MATCHING_PHASE),
profile_(profile),
- host_(host),
+ web_contents_(web_contents),
manager_action_(kManagerActionNone),
user_action_(kUserActionNone),
submit_result_(kSubmitResultNotSubmitted) {
@@ -507,6 +508,7 @@ void PasswordFormManager::SubmitFailed() {
}
void PasswordFormManager::SendNotBlacklistedToRenderer() {
- host_->Send(new AutofillMsg_FormNotBlacklisted(host_->GetRoutingID(),
+ content::RenderViewHost* host = web_contents_->GetRenderViewHost();
+ host->Send(new AutofillMsg_FormNotBlacklisted(host->GetRoutingID(),
observed_form_));
}
« no previous file with comments | « chrome/browser/password_manager/password_form_manager.h ('k') | chrome/browser/password_manager/password_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698