| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 ->OnPromptEnableAutoSignin(); | 548 ->OnPromptEnableAutoSignin(); |
| 549 #endif | 549 #endif |
| 550 } | 550 } |
| 551 | 551 |
| 552 void ChromePasswordManagerClient::GenerationAvailableForForm( | 552 void ChromePasswordManagerClient::GenerationAvailableForForm( |
| 553 const autofill::PasswordForm& form) { | 553 const autofill::PasswordForm& form) { |
| 554 password_manager_.GenerationAvailableForForm(form); | 554 password_manager_.GenerationAvailableForForm(form); |
| 555 } | 555 } |
| 556 | 556 |
| 557 bool ChromePasswordManagerClient::IsUpdatePasswordUIEnabled() const { | 557 bool ChromePasswordManagerClient::IsUpdatePasswordUIEnabled() const { |
| 558 #if BUILDFLAG(ANDROID_JAVA_UI) | |
| 559 return base::FeatureList::IsEnabled( | |
| 560 password_manager::features::kEnablePasswordChangeSupport); | |
| 561 #else | |
| 562 return true; | 558 return true; |
| 563 #endif | |
| 564 } | 559 } |
| 565 | 560 |
| 566 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { | 561 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { |
| 567 return web_contents()->GetVisibleURL(); | 562 return web_contents()->GetVisibleURL(); |
| 568 } | 563 } |
| 569 | 564 |
| 570 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const { | 565 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const { |
| 571 DCHECK(web_contents()); | 566 DCHECK(web_contents()); |
| 572 content::NavigationEntry* entry = | 567 content::NavigationEntry* entry = |
| 573 web_contents()->GetController().GetLastCommittedEntry(); | 568 web_contents()->GetController().GetLastCommittedEntry(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 593 password_manager::mojom::CredentialManagerRequest request) { | 588 password_manager::mojom::CredentialManagerRequest request) { |
| 594 content::WebContents* web_contents = | 589 content::WebContents* web_contents = |
| 595 content::WebContents::FromRenderFrameHost(render_frame_host); | 590 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 596 DCHECK(web_contents); | 591 DCHECK(web_contents); |
| 597 | 592 |
| 598 ChromePasswordManagerClient* instance = | 593 ChromePasswordManagerClient* instance = |
| 599 ChromePasswordManagerClient::FromWebContents(web_contents); | 594 ChromePasswordManagerClient::FromWebContents(web_contents); |
| 600 DCHECK(instance); | 595 DCHECK(instance); |
| 601 instance->credential_manager_impl_.BindRequest(std::move(request)); | 596 instance->credential_manager_impl_.BindRequest(std::move(request)); |
| 602 } | 597 } |
| OLD | NEW |