| Index: ios/chrome/browser/ui/autofill/autofill_client_ios.mm
|
| diff --git a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
|
| index 427c05435696d45cdc7c9f886c3ea705b9e84b16..554b760c2aece376d123c056642338e412ac49fe 100644
|
| --- a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
|
| +++ b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
|
| @@ -27,16 +27,22 @@
|
| #include "ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h"
|
| #include "ios/chrome/browser/web_data_service_factory.h"
|
| #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
|
| +#include "ios/web/public/navigation_item.h"
|
| +#include "ios/web/public/navigation_manager.h"
|
| +#include "ios/web/public/ssl_status.h"
|
| +#include "ios/web/public/web_state/web_state.h"
|
|
|
| namespace autofill {
|
|
|
| AutofillClientIOS::AutofillClientIOS(
|
| ios::ChromeBrowserState* browser_state,
|
| + web::WebState* web_state,
|
| infobars::InfoBarManager* infobar_manager,
|
| id<AutofillClientIOSBridge> bridge,
|
| password_manager::PasswordGenerationManager* password_generation_manager,
|
| std::unique_ptr<IdentityProvider> identity_provider)
|
| : browser_state_(browser_state),
|
| + web_state_(web_state),
|
| infobar_manager_(infobar_manager),
|
| bridge_(bridge),
|
| password_generation_manager_(password_generation_manager),
|
| @@ -185,6 +191,18 @@ bool AutofillClientIOS::IsContextSecure(const GURL& form_origin) {
|
| return form_origin.SchemeIsCryptographic();
|
| }
|
|
|
| +bool AutofillClientIOS::IsMainUrlSecure() {
|
| + web::NavigationManager* manager = web_state_->GetNavigationManager();
|
| + web::NavigationItem* navItem = manager->GetVisibleItem();
|
| + if (!navItem)
|
| + return false;
|
| +
|
| + const web::SSLStatus& ssl = navItem->GetSSL();
|
| + return navItem->GetURL().SchemeIsCryptographic() && ssl.certificate &&
|
| + (!net::IsCertStatusError(ssl.cert_status) ||
|
| + net::IsCertStatusMinorError(ssl.cert_status));
|
| +}
|
| +
|
| void AutofillClientIOS::OnFirstUserGestureObserved() {
|
| // TODO(gcasto): [Merge 306796] http://crbug.com/439425 Verify if this method
|
| // needs a real implementation or not.
|
|
|