Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: ios/chrome/browser/ui/autofill/autofill_client_ios.mm

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: sebsg comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/autofill/autofill_client_ios.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
Mathieu 2017/02/04 02:34:57 By splitting IsContextSecure and IsMainUrlSecure o
estark 2017/02/06 22:51:02 Yes, but Form-Not-Secure warnings aren't enabled f
+ 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.
« no previous file with comments | « ios/chrome/browser/ui/autofill/autofill_client_ios.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698