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

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

Issue 981243003: Make commands consistent across security interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: if -> switch in SafeBrowsingBlockingPage Created 5 years, 9 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 | « chrome/browser/ssl/ssl_blocking_page.h ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_blocking_page.cc
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 2dd3c51a9329e4807d4ce770a425e874c6988726..0fd33736af2122e25f904fe380485edf364daa5f 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -449,8 +449,7 @@ void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) {
entry->GetSSL().security_bits = ssl_info_.security_bits;
}
-// This handles the commands sent from the interstitial JavaScript. They are
-// defined in chrome/browser/resources/ssl/ssl_errors_common.js.
+// This handles the commands sent from the interstitial JavaScript.
// DO NOT reorder or change this logic without also changing the JavaScript!
void SSLBlockingPage::CommandReceived(const std::string& command) {
int cmd = 0;
@@ -467,19 +466,12 @@ void SSLBlockingPage::CommandReceived(const std::string& command) {
}
break;
}
- case CMD_MORE: {
+ case CMD_SHOW_MORE_SECTION: {
metrics_helper_->RecordUserInteraction(
SecurityInterstitialMetricsHelper::SHOW_ADVANCED);
break;
}
- case CMD_RELOAD: {
- metrics_helper_->RecordUserInteraction(
- SecurityInterstitialMetricsHelper::RELOAD);
- // The interstitial can't refresh itself.
- web_contents()->GetController().Reload(true);
- break;
- }
- case CMD_HELP: {
+ case CMD_OPEN_HELP_CENTER: {
metrics_helper_->RecordUserInteraction(
SecurityInterstitialMetricsHelper::SHOW_LEARN_MORE);
content::NavigationController::LoadURLParams help_page_params(
@@ -488,15 +480,26 @@ void SSLBlockingPage::CommandReceived(const std::string& command) {
web_contents()->GetController().LoadURLWithParams(help_page_params);
break;
}
- case CMD_CLOCK: {
+ case CMD_RELOAD: {
+ metrics_helper_->RecordUserInteraction(
+ SecurityInterstitialMetricsHelper::RELOAD);
+ // The interstitial can't refresh itself.
+ web_contents()->GetController().Reload(true);
+ break;
+ }
+ case CMD_OPEN_DATE_SETTINGS: {
metrics_helper_->RecordUserInteraction(
SecurityInterstitialMetricsHelper::OPEN_TIME_SETTINGS);
LaunchDateAndTimeSettings();
break;
}
- default: {
- NOTREACHED();
- }
+ case CMD_OPEN_DIAGNOSTIC:
+ // Google doesn't currently have a transparency report for SSL.
+ case CMD_DO_REPORT:
+ case CMD_DONT_REPORT:
+ case CMD_OPEN_REPORTING_PRIVACY:
+ // Chrome doesn't currently do Extended Reporting for SSL.
+ NOTREACHED() << "Unexpected command: " << command;
Bernhard Bauer 2015/03/11 16:19:20 This changes the semantics from the previous versi
felt 2015/03/11 16:25:21 Yes, I changed my mind and decided a DCHECK would
}
}
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.h ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698