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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 1153023004: Prepare the infrastructure for password overrides. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test. Created 5 years, 7 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: components/autofill/content/renderer/password_autofill_agent.h
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
index 711c02a2e899e4c985e970902def82d520e93afc..9e82bcd73bcb3020350ee07e0bca65c4d9db958d 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/autofill/core/common/form_data_predictions.h"
+#include "components/autofill/core/common/password_form_field_prediction_map.h"
#include "components/autofill/core/common/password_form_fill_data.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_view_observer.h"
@@ -107,8 +108,8 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
typedef std::map<blink::WebElement, int> LoginToPasswordInfoKeyMap;
typedef std::map<blink::WebInputElement, blink::WebInputElement>
PasswordToLoginMap;
- using FormDataFieldDataMap =
- std::map<autofill::FormData, autofill::FormFieldData>;
+ using FormsPredictionsMap =
+ std::map<autofill::FormData, autofill::PasswordFormFieldPredictionMap>;
// This class keeps track of autofilled password input elements and makes sure
// the autofilled password value is not accessible to JavaScript code until
@@ -180,7 +181,8 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
// RenderView IPC handlers:
void OnFillPasswordForm(int key, const PasswordFormFillData& form_data);
void OnSetLoggingState(bool active);
- void OnAutofillUsernameDataReceived(const FormDataFieldDataMap& predictions);
+ void OnAutofillUsernameAndPasswordDataReceived(
+ const FormsPredictionsMap& predictions);
// Scans the given frame for password forms and sends them up to the browser.
// If |only_visible| is true, only forms visible in the layout are sent.
@@ -282,9 +284,9 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
// save password prompt on in-page navigations.
bool save_password_on_in_page_navigation_;
- // Contains server predictions for which field is the username field for forms
- // on the page.
- FormDataFieldDataMap form_predictions_;
+ // Contains server predictions for username, password and/or new password
+ // fields for individual forms.
+ FormsPredictionsMap form_predictions_;
base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698