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

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

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 8 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_GENERATION_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <utility> 12 #include <utility>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/linked_ptr.h" 16 #include "base/memory/linked_ptr.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "content/public/renderer/render_frame_observer.h" 17 #include "content/public/renderer/render_frame_observer.h"
18 #include "third_party/WebKit/public/web/WebInputElement.h" 18 #include "third_party/WebKit/public/web/WebInputElement.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace blink { 21 namespace blink {
22 class WebDocument; 22 class WebDocument;
23 } 23 }
24 24
25 namespace autofill { 25 namespace autofill {
26 26
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // by the browser. A form can be blacklisted if a user chooses "never save 114 // by the browser. A form can be blacklisted if a user chooses "never save
115 // passwords for this site". 115 // passwords for this site".
116 std::vector<GURL> not_blacklisted_password_form_origins_; 116 std::vector<GURL> not_blacklisted_password_form_origins_;
117 117
118 // Stores each password form for which the Autofill server classifies one of 118 // Stores each password form for which the Autofill server classifies one of
119 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These 119 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These
120 // forms will not be sent if the feature is disabled. 120 // forms will not be sent if the feature is disabled.
121 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_; 121 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_;
122 122
123 // Data for form which generation is allowed on. 123 // Data for form which generation is allowed on.
124 scoped_ptr<AccountCreationFormData> generation_form_data_; 124 std::unique_ptr<AccountCreationFormData> generation_form_data_;
125 125
126 // Element where we want to trigger password generation UI. 126 // Element where we want to trigger password generation UI.
127 blink::WebInputElement generation_element_; 127 blink::WebInputElement generation_element_;
128 128
129 // Password element that had focus last. Since Javascript could change focused 129 // Password element that had focus last. Since Javascript could change focused
130 // element after the user triggered a generation request, it is better to save 130 // element after the user triggered a generation request, it is better to save
131 // the last focused password element. 131 // the last focused password element.
132 blink::WebInputElement last_focused_password_element_; 132 blink::WebInputElement last_focused_password_element_;
133 133
134 // If the password field at |generation_element_| contains a generated 134 // If the password field at |generation_element_| contains a generated
(...skipping 23 matching lines...) Expand all
158 // Unowned pointer. Used to notify PassowrdAutofillAgent when values 158 // Unowned pointer. Used to notify PassowrdAutofillAgent when values
159 // in password fields are updated. 159 // in password fields are updated.
160 PasswordAutofillAgent* password_agent_; 160 PasswordAutofillAgent* password_agent_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); 162 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent);
163 }; 163 };
164 164
165 } // namespace autofill 165 } // namespace autofill
166 166
167 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ 167 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698