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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 1161023008: Suggest to fill password change forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny fix Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set>
Garrett Casto 2015/06/12 22:22:16 Unneeded.
dvadym 2015/06/15 09:34:59 Done.
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "components/autofill/core/common/form_data_predictions.h" 15 #include "components/autofill/core/common/form_data_predictions.h"
15 #include "components/autofill/core/common/password_form_field_prediction_map.h" 16 #include "components/autofill/core/common/password_form_field_prediction_map.h"
16 #include "components/autofill/core/common/password_form_fill_data.h" 17 #include "components/autofill/core/common/password_form_fill_data.h"
17 #include "content/public/renderer/render_frame_observer.h" 18 #include "content/public/renderer/render_frame_observer.h"
18 #include "content/public/renderer/render_view_observer.h" 19 #include "content/public/renderer/render_view_observer.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 RESTRICTION_NON_EMPTY_PASSWORD 102 RESTRICTION_NON_EMPTY_PASSWORD
102 }; 103 };
103 104
104 struct PasswordInfo { 105 struct PasswordInfo {
105 blink::WebInputElement password_field; 106 blink::WebInputElement password_field;
106 PasswordFormFillData fill_data; 107 PasswordFormFillData fill_data;
107 bool backspace_pressed_last; 108 bool backspace_pressed_last;
108 // The user manually edited the password more recently than the username was 109 // The user manually edited the password more recently than the username was
109 // changed. 110 // changed.
110 bool password_was_edited_last; 111 bool password_was_edited_last;
112 // The user edited the username field after page loading.
113 bool username_was_edited;
111 PasswordInfo(); 114 PasswordInfo();
112 }; 115 };
113 typedef std::map<blink::WebInputElement, PasswordInfo> LoginToPasswordInfoMap; 116 typedef std::map<blink::WebInputElement, PasswordInfo> LoginToPasswordInfoMap;
114 typedef std::map<blink::WebElement, int> LoginToPasswordInfoKeyMap; 117 typedef std::map<blink::WebElement, int> LoginToPasswordInfoKeyMap;
115 typedef std::map<blink::WebInputElement, blink::WebInputElement> 118 typedef std::map<blink::WebInputElement, blink::WebInputElement>
116 PasswordToLoginMap; 119 PasswordToLoginMap;
117 using FormsPredictionsMap = 120 using FormsPredictionsMap =
118 std::map<autofill::FormData, autofill::PasswordFormFieldPredictionMap>; 121 std::map<autofill::FormData, autofill::PasswordFormFieldPredictionMap>;
119 122
120 // This class keeps track of autofilled password input elements and makes sure 123 // This class keeps track of autofilled password input elements and makes sure
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 FormsPredictionsMap form_predictions_; 295 FormsPredictionsMap form_predictions_;
293 296
294 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; 297 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;
295 298
296 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 299 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
297 }; 300 };
298 301
299 } // namespace autofill 302 } // namespace autofill
300 303
301 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 304 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698