| 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 "chrome/browser/password_manager/password_form_manager.h" | 5 #include "chrome/browser/password_manager/password_form_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "chrome/browser/password_manager/password_manager.h" | 12 #include "chrome/browser/password_manager/password_manager.h" |
| 13 #include "chrome/browser/password_manager/password_store.h" | 13 #include "chrome/browser/password_manager/password_store.h" |
| 14 #include "chrome/browser/password_manager/password_store_factory.h" | 14 #include "chrome/browser/password_manager/password_store_factory.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/common/autofill_messages.h" | 16 #include "chrome/common/autofill_messages.h" |
| 17 #include "content/public/browser/render_view_host.h" | 17 #include "content/public/browser/render_view_host.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 #include "webkit/forms/password_form_dom_manager.h" | 19 #include "content/public/common/password_form.h" |
| 20 | 20 |
| 21 using base::Time; | 21 using base::Time; |
| 22 using webkit::forms::PasswordForm; | 22 using content::PasswordForm; |
| 23 using webkit::forms::PasswordFormMap; | 23 using content::PasswordFormMap; |
| 24 | 24 |
| 25 PasswordFormManager::PasswordFormManager(Profile* profile, | 25 PasswordFormManager::PasswordFormManager(Profile* profile, |
| 26 PasswordManager* password_manager, | 26 PasswordManager* password_manager, |
| 27 content::WebContents* web_contents, | 27 content::WebContents* web_contents, |
| 28 const PasswordForm& observed_form, | 28 const PasswordForm& observed_form, |
| 29 bool ssl_valid) | 29 bool ssl_valid) |
| 30 : best_matches_deleter_(&best_matches_), | 30 : best_matches_deleter_(&best_matches_), |
| 31 observed_form_(observed_form), | 31 observed_form_(observed_form), |
| 32 is_new_login_(true), | 32 is_new_login_(true), |
| 33 has_generated_password_(false), | 33 has_generated_password_(false), |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 515 |
| 516 void PasswordFormManager::SubmitFailed() { | 516 void PasswordFormManager::SubmitFailed() { |
| 517 submit_result_ = kSubmitResultFailed; | 517 submit_result_ = kSubmitResultFailed; |
| 518 } | 518 } |
| 519 | 519 |
| 520 void PasswordFormManager::SendNotBlacklistedToRenderer() { | 520 void PasswordFormManager::SendNotBlacklistedToRenderer() { |
| 521 content::RenderViewHost* host = web_contents_->GetRenderViewHost(); | 521 content::RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 522 host->Send(new AutofillMsg_FormNotBlacklisted(host->GetRoutingID(), | 522 host->Send(new AutofillMsg_FormNotBlacklisted(host->GetRoutingID(), |
| 523 observed_form_)); | 523 observed_form_)); |
| 524 } | 524 } |
| OLD | NEW |