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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 2432933004: Adjust HTTP-bad console messages (Closed)
Patch Set: elawrence comment Created 4 years, 2 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 | « no previous file | chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index 0a2c80e27980fea3438838515c75000043be03c5..5b7097e4b4e89c8b0c8ad8d31ffc030aa4cd8fbe 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -334,15 +334,30 @@ void ChromeSecurityStateModelClient::VisibleSSLStateChanged() {
security_state::SecurityStateModel::SecurityInfo security_info;
GetSecurityInfo(&security_info);
- if (security_info.security_level ==
- security_state::SecurityStateModel::HTTP_SHOW_WARNING) {
- web_contents_->GetMainFrame()->AddMessageToConsole(
- content::CONSOLE_MESSAGE_LEVEL_WARNING,
- "In Chrome M56 (Jan 2017), this page will be marked "
- "as \"not secure\" in the URL bar. For more "
- "information, see https://goo.gl/zmWq3m");
- logged_http_warning_on_current_navigation_ = true;
+ if (!security_info.displayed_private_user_data_input_on_http)
+ return;
+
+ std::string warning;
+ switch (security_info.security_level) {
+ case security_state::SecurityStateModel::HTTP_SHOW_WARNING:
+ warning =
lgarron 2016/10/21 00:01:12 I was going to complain that we shouldn't define t
+ "This page includes a password or credit card input in a non-secure "
+ "context. A warning has been added to the URL bar. For more "
+ "information, see https://goo.gl/zmWq3m.";
+ break;
+ case security_state::SecurityStateModel::NONE:
+ warning =
+ "This page includes a password or credit card input in a non-secure "
+ "context. A warning will be added to the URL bar in Chrome 56 (Jan "
+ "2017). For more information, see https://goo.gl/zmWq3m.";
+ break;
+ default:
+ return;
}
+
+ logged_http_warning_on_current_navigation_ = true;
+ web_contents_->GetMainFrame()->AddMessageToConsole(
+ content::CONSOLE_MESSAGE_LEVEL_WARNING, warning);
}
void ChromeSecurityStateModelClient::DidFinishNavigation(
« no previous file with comments | « no previous file | chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698