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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 1358063002: Switch warning_explanations (yellow) to be unauthenticated_explanations (neutral). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 1347
1348 if (security_info.sha1_deprecation_status == 1348 if (security_info.sha1_deprecation_status ==
1349 SecurityStateModel::DEPRECATED_SHA1_BROKEN) { 1349 SecurityStateModel::DEPRECATED_SHA1_BROKEN) {
1350 security_style_explanations->broken_explanations.push_back( 1350 security_style_explanations->broken_explanations.push_back(
1351 content::SecurityStyleExplanation( 1351 content::SecurityStyleExplanation(
1352 l10n_util::GetStringUTF8(IDS_BROKEN_SHA1), 1352 l10n_util::GetStringUTF8(IDS_BROKEN_SHA1),
1353 l10n_util::GetStringUTF8(IDS_BROKEN_SHA1_DESCRIPTION), 1353 l10n_util::GetStringUTF8(IDS_BROKEN_SHA1_DESCRIPTION),
1354 security_info.cert_id)); 1354 security_info.cert_id));
1355 } else if (security_info.sha1_deprecation_status == 1355 } else if (security_info.sha1_deprecation_status ==
1356 SecurityStateModel::DEPRECATED_SHA1_WARNING) { 1356 SecurityStateModel::DEPRECATED_SHA1_WARNING) {
1357 security_style_explanations->warning_explanations.push_back( 1357 security_style_explanations->unauthenticated_explanations.push_back(
1358 content::SecurityStyleExplanation( 1358 content::SecurityStyleExplanation(
1359 l10n_util::GetStringUTF8(IDS_WARNING_SHA1), 1359 l10n_util::GetStringUTF8(IDS_WARNING_SHA1),
1360 l10n_util::GetStringUTF8(IDS_WARNING_SHA1_DESCRIPTION), 1360 l10n_util::GetStringUTF8(IDS_WARNING_SHA1_DESCRIPTION),
1361 security_info.cert_id)); 1361 security_info.cert_id));
1362 } 1362 }
1363 1363
1364 security_style_explanations->ran_insecure_content = 1364 security_style_explanations->ran_insecure_content =
1365 security_info.mixed_content_status == 1365 security_info.mixed_content_status ==
1366 SecurityStateModel::RAN_MIXED_CONTENT || 1366 SecurityStateModel::RAN_MIXED_CONTENT ||
1367 security_info.mixed_content_status == 1367 security_info.mixed_content_status ==
1368 SecurityStateModel::RAN_AND_DISPLAYED_MIXED_CONTENT; 1368 SecurityStateModel::RAN_AND_DISPLAYED_MIXED_CONTENT;
1369 security_style_explanations->displayed_insecure_content = 1369 security_style_explanations->displayed_insecure_content =
1370 security_info.mixed_content_status == 1370 security_info.mixed_content_status ==
1371 SecurityStateModel::DISPLAYED_MIXED_CONTENT || 1371 SecurityStateModel::DISPLAYED_MIXED_CONTENT ||
1372 security_info.mixed_content_status == 1372 security_info.mixed_content_status ==
1373 SecurityStateModel::RAN_AND_DISPLAYED_MIXED_CONTENT; 1373 SecurityStateModel::RAN_AND_DISPLAYED_MIXED_CONTENT;
1374 1374
1375 if (net::IsCertStatusError(security_info.cert_status)) { 1375 if (net::IsCertStatusError(security_info.cert_status)) {
1376 base::string16 error_string = base::UTF8ToUTF16(net::ErrorToString( 1376 base::string16 error_string = base::UTF8ToUTF16(net::ErrorToString(
1377 net::MapCertStatusToNetError(security_info.cert_status))); 1377 net::MapCertStatusToNetError(security_info.cert_status)));
1378 1378
1379 content::SecurityStyleExplanation explanation( 1379 content::SecurityStyleExplanation explanation(
1380 l10n_util::GetStringUTF8(IDS_CERTIFICATE_CHAIN_ERROR), 1380 l10n_util::GetStringUTF8(IDS_CERTIFICATE_CHAIN_ERROR),
1381 l10n_util::GetStringFUTF8( 1381 l10n_util::GetStringFUTF8(
1382 IDS_CERTIFICATE_CHAIN_ERROR_DESCRIPTION_FORMAT, error_string), 1382 IDS_CERTIFICATE_CHAIN_ERROR_DESCRIPTION_FORMAT, error_string),
1383 security_info.cert_id); 1383 security_info.cert_id);
1384 1384
1385 if (net::IsCertStatusMinorError(security_info.cert_status)) 1385 if (net::IsCertStatusMinorError(security_info.cert_status))
Peter Kasting 2015/11/07 02:33:18 Nit: This now needs {}
1386 security_style_explanations->warning_explanations.push_back(explanation); 1386 security_style_explanations->unauthenticated_explanations.push_back(
1387 explanation);
1387 else 1388 else
1388 security_style_explanations->broken_explanations.push_back(explanation); 1389 security_style_explanations->broken_explanations.push_back(explanation);
1389 } else { 1390 } else {
1390 // If the certificate does not have errors and is not using 1391 // If the certificate does not have errors and is not using
1391 // deprecated SHA1, then add an explanation that the certificate is 1392 // deprecated SHA1, then add an explanation that the certificate is
1392 // valid. 1393 // valid.
1393 if (security_info.sha1_deprecation_status == 1394 if (security_info.sha1_deprecation_status ==
1394 SecurityStateModel::NO_DEPRECATED_SHA1) { 1395 SecurityStateModel::NO_DEPRECATED_SHA1) {
1395 security_style_explanations->secure_explanations.push_back( 1396 security_style_explanations->secure_explanations.push_back(
1396 content::SecurityStyleExplanation( 1397 content::SecurityStyleExplanation(
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 if (contents && !allow_js_access) { 2696 if (contents && !allow_js_access) {
2696 contents->web_contents()->GetController().LoadURL( 2697 contents->web_contents()->GetController().LoadURL(
2697 target_url, 2698 target_url,
2698 content::Referrer(), 2699 content::Referrer(),
2699 ui::PAGE_TRANSITION_LINK, 2700 ui::PAGE_TRANSITION_LINK,
2700 std::string()); // No extra headers. 2701 std::string()); // No extra headers.
2701 } 2702 }
2702 2703
2703 return contents != NULL; 2704 return contents != NULL;
2704 } 2705 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698