Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 if (!security_info.displayed_private_user_data_input_on_http) | 337 if (!security_info.displayed_private_user_data_input_on_http) |
| 338 return; | 338 return; |
| 339 | 339 |
| 340 std::string warning; | 340 std::string warning; |
| 341 switch (security_info.security_level) { | 341 switch (security_info.security_level) { |
| 342 case security_state::SecurityStateModel::HTTP_SHOW_WARNING: | 342 case security_state::SecurityStateModel::HTTP_SHOW_WARNING: |
| 343 warning = | 343 warning = |
| 344 "This page includes a password or credit card input in a non-secure " | 344 "This page includes a password or credit card input in a non-secure " |
| 345 "context. A warning has been added to the URL bar. For more " | 345 "context. A warning has been added to the URL bar. For more " |
| 346 "information, see https://goo.gl/zmWq3m."; | 346 "information, see https://goo.gl/zmWq3m."; |
| 347 UMA_HISTOGRAM_BOOLEAN("Security.HTTPBad.UserWarnedAboutSensitiveInput", | |
|
estark
2016/10/26 20:30:56
I'm not 100% sure, but I think, because of https:/
| |
| 348 true); | |
| 347 break; | 349 break; |
| 348 case security_state::SecurityStateModel::NONE: | 350 case security_state::SecurityStateModel::NONE: |
| 351 case security_state::SecurityStateModel::DANGEROUS: | |
| 349 warning = | 352 warning = |
| 350 "This page includes a password or credit card input in a non-secure " | 353 "This page includes a password or credit card input in a non-secure " |
| 351 "context. A warning will be added to the URL bar in Chrome 56 (Jan " | 354 "context. A warning will be added to the URL bar in Chrome 56 (Jan " |
| 352 "2017). For more information, see https://goo.gl/zmWq3m."; | 355 "2017). For more information, see https://goo.gl/zmWq3m."; |
| 356 UMA_HISTOGRAM_BOOLEAN("Security.HTTPBad.UserWarnedAboutSensitiveInput", | |
| 357 false); | |
| 353 break; | 358 break; |
| 354 default: | 359 default: |
| 355 return; | 360 return; |
| 356 } | 361 } |
| 357 | 362 |
| 358 logged_http_warning_on_current_navigation_ = true; | 363 logged_http_warning_on_current_navigation_ = true; |
| 359 web_contents_->GetMainFrame()->AddMessageToConsole( | 364 web_contents_->GetMainFrame()->AddMessageToConsole( |
| 360 content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); | 365 content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); |
| 361 } | 366 } |
| 362 | 367 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); | 432 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); |
| 428 state->displayed_password_field_on_http = | 433 state->displayed_password_field_on_http = |
| 429 !!(ssl.content_status & | 434 !!(ssl.content_status & |
| 430 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); | 435 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); |
| 431 state->displayed_credit_card_field_on_http = | 436 state->displayed_credit_card_field_on_http = |
| 432 !!(ssl.content_status & | 437 !!(ssl.content_status & |
| 433 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); | 438 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); |
| 434 | 439 |
| 435 CheckSafeBrowsingStatus(entry, web_contents_, state); | 440 CheckSafeBrowsingStatus(entry, web_contents_, state); |
| 436 } | 441 } |
| OLD | NEW |