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

Unified Diff: ios/chrome/browser/passwords/password_controller.mm

Issue 2466143002: iOS: Mark HTTP pages with password fields with an omnibox icon. (Closed)
Patch Set: iOS HTTP Bad. Created 4 years 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 | « no previous file | ios/chrome/browser/passwords/password_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/passwords/password_controller.mm
diff --git a/ios/chrome/browser/passwords/password_controller.mm b/ios/chrome/browser/passwords/password_controller.mm
index 04ba014681af8bdab00cc9da21afdc1d67f0cf6a..05e38f66683fb9baf4d7689304b2d43f9b747109 100644
--- a/ios/chrome/browser/passwords/password_controller.mm
+++ b/ios/chrome/browser/passwords/password_controller.mm
@@ -39,6 +39,7 @@
#import "ios/chrome/browser/passwords/js_password_manager.h"
#import "ios/chrome/browser/passwords/password_generation_agent.h"
#include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
+#import "ios/web/public/origin_util.h"
#include "ios/web/public/url_scheme_util.h"
#import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
#import "ios/web/public/web_state/web_state.h"
@@ -548,6 +549,15 @@ bool GetPageURLAndCheckTrustLevel(web::WebState* web_state, GURL* page_url) {
return;
if (!forms.empty()) {
+ // Notify web_state about password forms, so that this can be taken into
+ // account for the security state.
+ if (webStateObserverBridge_) {
+ web::WebState* web_state = webStateObserverBridge_->web_state();
+ if (web_state && !web::IsOriginSecure(web_state->GetLastCommittedURL())) {
+ web_state->OnPasswordInputShownOnHttp();
+ }
+ }
+
// Invoke the password manager callback to autofill password forms
// on the loaded page.
passwordManager_->OnPasswordFormsParsed(passwordManagerDriver_.get(),
« no previous file with comments | « no previous file | ios/chrome/browser/passwords/password_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698