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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 1000333003: Properly decode IDN in interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move test commands to negative values, and control flow nit 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ssl/ssl_blocking_page.h" 5 #include "chrome/browser/ssl/ssl_blocking_page.h"
6 6
7 #include "base/build_time.h" 7 #include "base/build_time.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 entry->GetSSL().security_style = 449 entry->GetSSL().security_style =
450 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; 450 content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
451 entry->GetSSL().cert_id = cert_id; 451 entry->GetSSL().cert_id = cert_id;
452 entry->GetSSL().cert_status = ssl_info_.cert_status; 452 entry->GetSSL().cert_status = ssl_info_.cert_status;
453 entry->GetSSL().security_bits = ssl_info_.security_bits; 453 entry->GetSSL().security_bits = ssl_info_.security_bits;
454 } 454 }
455 455
456 // This handles the commands sent from the interstitial JavaScript. 456 // This handles the commands sent from the interstitial JavaScript.
457 // DO NOT reorder or change this logic without also changing the JavaScript! 457 // DO NOT reorder or change this logic without also changing the JavaScript!
458 void SSLBlockingPage::CommandReceived(const std::string& command) { 458 void SSLBlockingPage::CommandReceived(const std::string& command) {
459 if (command == "\"pageLoadComplete\"") {
460 // content::WaitForRenderFrameReady sends this message when the page
461 // load completes. Ignore it.
462 return;
463 }
464
459 int cmd = 0; 465 int cmd = 0;
460 bool retval = base::StringToInt(command, &cmd); 466 bool retval = base::StringToInt(command, &cmd);
461 DCHECK(retval); 467 DCHECK(retval);
462 switch (cmd) { 468 switch (cmd) {
463 case CMD_DONT_PROCEED: { 469 case CMD_DONT_PROCEED: {
464 interstitial_page()->DontProceed(); 470 interstitial_page()->DontProceed();
465 break; 471 break;
466 } 472 }
467 case CMD_PROCEED: { 473 case CMD_PROCEED: {
468 if (danger_overridable_) { 474 if (danger_overridable_) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 event_name.append(kEventNotOverridable); 579 event_name.append(kEventNotOverridable);
574 event_name.append(net::ErrorToString(cert_error_)); 580 event_name.append(net::ErrorToString(cert_error_));
575 return event_name; 581 return event_name;
576 } 582 }
577 583
578 // static 584 // static
579 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) { 585 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) {
580 return (options_mask & SSLBlockingPage::OVERRIDABLE) && 586 return (options_mask & SSLBlockingPage::OVERRIDABLE) &&
581 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT); 587 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT);
582 } 588 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698