OLD | NEW |
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_autofill_agent.h" | 5 #include "components/autofill/content/renderer/password_autofill_agent.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 // RenderView to be instantiated (such as redirects to the WebStore) | 1229 // RenderView to be instantiated (such as redirects to the WebStore) |
1230 // we will never get to finish the load. | 1230 // we will never get to finish the load. |
1231 Send(new AutofillHostMsg_PasswordFormSubmitted(routing_id(), | 1231 Send(new AutofillHostMsg_PasswordFormSubmitted(routing_id(), |
1232 *submitted_form)); | 1232 *submitted_form)); |
1233 provisionally_saved_form_.reset(); | 1233 provisionally_saved_form_.reset(); |
1234 } else if (logger) { | 1234 } else if (logger) { |
1235 logger->LogMessage(Logger::STRING_FORM_IS_NOT_PASSWORD); | 1235 logger->LogMessage(Logger::STRING_FORM_IS_NOT_PASSWORD); |
1236 } | 1236 } |
1237 } | 1237 } |
1238 | 1238 |
| 1239 void PasswordAutofillAgent::OnDestruct() { |
| 1240 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
| 1241 } |
| 1242 |
1239 void PasswordAutofillAgent::DidStartProvisionalLoad() { | 1243 void PasswordAutofillAgent::DidStartProvisionalLoad() { |
1240 std::unique_ptr<RendererSavePasswordProgressLogger> logger; | 1244 std::unique_ptr<RendererSavePasswordProgressLogger> logger; |
1241 if (logging_state_active_) { | 1245 if (logging_state_active_) { |
1242 logger.reset(new RendererSavePasswordProgressLogger(this, routing_id())); | 1246 logger.reset(new RendererSavePasswordProgressLogger(this, routing_id())); |
1243 logger->LogMessage(Logger::STRING_DID_START_PROVISIONAL_LOAD_METHOD); | 1247 logger->LogMessage(Logger::STRING_DID_START_PROVISIONAL_LOAD_METHOD); |
1244 } | 1248 } |
1245 | 1249 |
1246 const blink::WebLocalFrame* navigated_frame = render_frame()->GetWebFrame(); | 1250 const blink::WebLocalFrame* navigated_frame = render_frame()->GetWebFrame(); |
1247 if (navigated_frame->parent()) { | 1251 if (navigated_frame->parent()) { |
1248 if (logger) | 1252 if (logger) |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 } | 1538 } |
1535 | 1539 |
1536 bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() { | 1540 bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() { |
1537 return provisionally_saved_form_ && | 1541 return provisionally_saved_form_ && |
1538 !provisionally_saved_form_->username_value.empty() && | 1542 !provisionally_saved_form_->username_value.empty() && |
1539 !(provisionally_saved_form_->password_value.empty() && | 1543 !(provisionally_saved_form_->password_value.empty() && |
1540 provisionally_saved_form_->new_password_value.empty()); | 1544 provisionally_saved_form_->new_password_value.empty()); |
1541 } | 1545 } |
1542 | 1546 |
1543 } // namespace autofill | 1547 } // namespace autofill |
OLD | NEW |