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

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

Issue 2400393003: [Autofill] Close mojo interface bindings of autofill/password agent in time. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "components/autofill/content/renderer/password_generation_agent.h" 5 #include "components/autofill/content/renderer/password_generation_agent.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 void PasswordGenerationAgent::DidFinishLoad() { 185 void PasswordGenerationAgent::DidFinishLoad() {
186 // Since forms on some sites are available only at this event (but not at 186 // Since forms on some sites are available only at this event (but not at
187 // DidFinishDocumentLoad), again call FindPossibleGenerationForm to detect 187 // DidFinishDocumentLoad), again call FindPossibleGenerationForm to detect
188 // these forms (crbug.com/617893). 188 // these forms (crbug.com/617893).
189 FindPossibleGenerationForm(); 189 FindPossibleGenerationForm();
190 } 190 }
191 191
192 void PasswordGenerationAgent::OnDestruct() { 192 void PasswordGenerationAgent::OnDestruct() {
193 binding_.Close();
193 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 194 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
194 } 195 }
195 196
196 void PasswordGenerationAgent::OnDynamicFormsSeen() { 197 void PasswordGenerationAgent::OnDynamicFormsSeen() {
197 FindPossibleGenerationForm(); 198 FindPossibleGenerationForm();
198 } 199 }
199 200
200 void PasswordGenerationAgent::OnAllowToRunFormClassifier() { 201 void PasswordGenerationAgent::OnAllowToRunFormClassifier() {
201 form_classifier_enabled_ = true; 202 form_classifier_enabled_ = true;
202 } 203 }
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 GetAccountCreationPasswordFields(control_elements, &password_elements); 577 GetAccountCreationPasswordFields(control_elements, &password_elements);
577 password_elements = FindPasswordElementsForGeneration( 578 password_elements = FindPasswordElementsForGeneration(
578 password_elements, last_focused_password_element_.nameForAutofill()); 579 password_elements, last_focused_password_element_.nameForAutofill());
579 generation_form_data_.reset(new AccountCreationFormData( 580 generation_form_data_.reset(new AccountCreationFormData(
580 make_linked_ptr(password_form.release()), password_elements)); 581 make_linked_ptr(password_form.release()), password_elements));
581 is_manually_triggered_ = true; 582 is_manually_triggered_ = true;
582 ShowGenerationPopup(); 583 ShowGenerationPopup();
583 } 584 }
584 585
585 } // namespace autofill 586 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698