| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_password_manager_client.h" | 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 if (IsTheHotNewBubbleUIEnabled()) { | 282 if (IsTheHotNewBubbleUIEnabled()) { |
| 283 ManagePasswordsUIController* manage_passwords_ui_controller = | 283 ManagePasswordsUIController* manage_passwords_ui_controller = |
| 284 ManagePasswordsUIController::FromWebContents(web_contents()); | 284 ManagePasswordsUIController::FromWebContents(web_contents()); |
| 285 manage_passwords_ui_controller->OnAutomaticPasswordSave( | 285 manage_passwords_ui_controller->OnAutomaticPasswordSave( |
| 286 saved_form.Pass()); | 286 saved_form.Pass()); |
| 287 } | 287 } |
| 288 #endif | 288 #endif |
| 289 } | 289 } |
| 290 | 290 |
| 291 void ChromePasswordManagerClient::PasswordWasAutofilled( | 291 void ChromePasswordManagerClient::PasswordWasAutofilled( |
| 292 const autofill::PasswordFormMap& best_matches) const { | 292 const autofill::PasswordFormMap& best_matches, |
| 293 const GURL& origin) const { |
| 293 ManagePasswordsUIController* manage_passwords_ui_controller = | 294 ManagePasswordsUIController* manage_passwords_ui_controller = |
| 294 ManagePasswordsUIController::FromWebContents(web_contents()); | 295 ManagePasswordsUIController::FromWebContents(web_contents()); |
| 295 if (manage_passwords_ui_controller && IsTheHotNewBubbleUIEnabled()) | 296 if (manage_passwords_ui_controller && IsTheHotNewBubbleUIEnabled()) |
| 296 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches); | 297 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin); |
| 297 } | 298 } |
| 298 | 299 |
| 299 void ChromePasswordManagerClient::PasswordAutofillWasBlocked( | 300 void ChromePasswordManagerClient::PasswordAutofillWasBlocked( |
| 300 const autofill::PasswordFormMap& best_matches) const { | 301 const autofill::PasswordFormMap& best_matches) const { |
| 301 ManagePasswordsUIController* controller = | 302 ManagePasswordsUIController* controller = |
| 302 ManagePasswordsUIController::FromWebContents(web_contents()); | 303 ManagePasswordsUIController::FromWebContents(web_contents()); |
| 303 if (controller && IsTheHotNewBubbleUIEnabled()) | 304 if (controller && IsTheHotNewBubbleUIEnabled()) |
| 304 controller->OnBlacklistBlockedAutofill(best_matches); | 305 controller->OnBlacklistBlockedAutofill(best_matches); |
| 305 } | 306 } |
| 306 | 307 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 if (!entry) | 580 if (!entry) |
| 580 return GURL::EmptyGURL(); | 581 return GURL::EmptyGURL(); |
| 581 | 582 |
| 582 return entry->GetURL(); | 583 return entry->GetURL(); |
| 583 } | 584 } |
| 584 | 585 |
| 585 const password_manager::CredentialsFilter* | 586 const password_manager::CredentialsFilter* |
| 586 ChromePasswordManagerClient::GetStoreResultFilter() const { | 587 ChromePasswordManagerClient::GetStoreResultFilter() const { |
| 587 return &credentials_filter_; | 588 return &credentials_filter_; |
| 588 } | 589 } |
| OLD | NEW |