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

Unified Diff: ios/chrome/browser/ssl/ios_security_state_tab_helper.mm

Issue 2917873004: Implement 'Not secure' warning for non-secure pages in Incognito mode (Closed)
Patch Set: Ensure sensitive fields trigger warnings outside of Incognito Created 3 years, 6 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
Index: ios/chrome/browser/ssl/ios_security_state_tab_helper.mm
diff --git a/ios/chrome/browser/ssl/ios_security_state_tab_helper.mm b/ios/chrome/browser/ssl/ios_security_state_tab_helper.mm
index c4634660888ef58e851462c958bc0cc6df82f97c..be63f28163cbe17ad9ad26ec8e2cafb6c903ffe9 100644
--- a/ios/chrome/browser/ssl/ios_security_state_tab_helper.mm
+++ b/ios/chrome/browser/ssl/ios_security_state_tab_helper.mm
@@ -10,6 +10,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "components/security_state/core/security_state.h"
+#include "ios/web/public/browser_state.h"
#include "ios/web/public/navigation_item.h"
#import "ios/web/public/navigation_manager.h"
#import "ios/web/public/origin_util.h"
@@ -62,5 +63,10 @@ IOSSecurityStateTabHelper::GetVisibleSecurityState() const {
(ssl.content_status & web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP)
? true
: false;
+ if (!state->certificate &&
+ security_state::IsHttpWarningForIncognitoEnabled()) {
+ state->is_incognito = web_state_->GetBrowserState()->IsOffTheRecord();
+ }
+
return state;
}
« components/security_state/core/security_state.h ('K') | « components/security_state_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698