OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_manager/core/browser/password_form_manager.h" | 5 #include "components/password_manager/core/browser/password_form_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 if (owned_form_fetcher_) | 240 if (owned_form_fetcher_) |
241 owned_form_fetcher_->Fetch(); | 241 owned_form_fetcher_->Fetch(); |
242 DCHECK_EQ(observed_form.scheme == PasswordForm::SCHEME_HTML, | 242 DCHECK_EQ(observed_form.scheme == PasswordForm::SCHEME_HTML, |
243 driver != nullptr); | 243 driver != nullptr); |
244 if (driver) | 244 if (driver) |
245 drivers_.push_back(driver); | 245 drivers_.push_back(driver); |
246 form_fetcher_->AddConsumer(this); | 246 form_fetcher_->AddConsumer(this); |
247 } | 247 } |
248 | 248 |
249 PasswordFormManager::~PasswordFormManager() { | 249 PasswordFormManager::~PasswordFormManager() { |
| 250 form_fetcher_->RemoveConsumer(this); |
| 251 |
250 UMA_HISTOGRAM_ENUMERATION("PasswordManager.ActionsTakenV3", GetActionsTaken(), | 252 UMA_HISTOGRAM_ENUMERATION("PasswordManager.ActionsTakenV3", GetActionsTaken(), |
251 kMaxNumActionsTaken); | 253 kMaxNumActionsTaken); |
252 // Use the visible main frame URL at the time the PasswordFormManager | 254 // Use the visible main frame URL at the time the PasswordFormManager |
253 // is created, in case a navigation has already started and the | 255 // is created, in case a navigation has already started and the |
254 // visible URL has changed. | 256 // visible URL has changed. |
255 if (!is_main_frame_secure_) { | 257 if (!is_main_frame_secure_) { |
256 UMA_HISTOGRAM_ENUMERATION("PasswordManager.ActionsTakenOnNonSecureForm", | 258 UMA_HISTOGRAM_ENUMERATION("PasswordManager.ActionsTakenOnNonSecureForm", |
257 GetActionsTaken(), kMaxNumActionsTaken); | 259 GetActionsTaken(), kMaxNumActionsTaken); |
258 } | 260 } |
259 if (submit_result_ == kSubmitResultNotSubmitted) { | 261 if (submit_result_ == kSubmitResultNotSubmitted) { |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 credentials_to_update->back().password_value = | 1324 credentials_to_update->back().password_value = |
1323 pending_credentials_.password_value; | 1325 pending_credentials_.password_value; |
1324 } | 1326 } |
1325 } | 1327 } |
1326 } | 1328 } |
1327 | 1329 |
1328 return old_primary_key; | 1330 return old_primary_key; |
1329 } | 1331 } |
1330 | 1332 |
1331 } // namespace password_manager | 1333 } // namespace password_manager |
OLD | NEW |