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

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

Issue 46094: Fix our handling of mixed SSL / non-SSL content.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/string_piece.h" 7 #include "base/string_piece.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/cert_store.h" 10 #include "chrome/browser/cert_store.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 WebContents* web = tab()->AsWebContents(); 74 WebContents* web = tab()->AsWebContents();
75 const net::SSLInfo& ssl_info = error_->ssl_info(); 75 const net::SSLInfo& ssl_info = error_->ssl_info();
76 int cert_id = CertStore::GetSharedInstance()->StoreCert( 76 int cert_id = CertStore::GetSharedInstance()->StoreCert(
77 ssl_info.cert, web->render_view_host()->process()->pid()); 77 ssl_info.cert, web->render_view_host()->process()->pid());
78 78
79 entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN); 79 entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN);
80 entry->ssl().set_cert_id(cert_id); 80 entry->ssl().set_cert_id(cert_id);
81 entry->ssl().set_cert_status(ssl_info.cert_status); 81 entry->ssl().set_cert_status(ssl_info.cert_status);
82 entry->ssl().set_security_bits(ssl_info.security_bits); 82 entry->ssl().set_security_bits(ssl_info.security_bits);
83 NotificationService::current()->Notify( 83 NotificationService::current()->Notify(
84 NotificationType::SSL_STATE_CHANGED, 84 NotificationType::SSL_VISIBLE_STATE_CHANGED,
85 Source<NavigationController>(web->controller()), 85 Source<NavigationController>(web->controller()),
86 NotificationService::NoDetails()); 86 NotificationService::NoDetails());
87 } 87 }
88 88
89 void SSLBlockingPage::CommandReceived(const std::string& command) { 89 void SSLBlockingPage::CommandReceived(const std::string& command) {
90 if (command == "1") { 90 if (command == "1") {
91 Proceed(); 91 Proceed();
92 } else { 92 } else {
93 DontProceed(); 93 DontProceed();
94 } 94 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" 131 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5"
132 }; 132 };
133 int i; 133 int i;
134 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { 134 for (i = 0; i < static_cast<int>(extra_info.size()); i++) {
135 strings->SetString(keys[i], extra_info[i]); 135 strings->SetString(keys[i], extra_info[i]);
136 } 136 }
137 for (;i < 5; i++) { 137 for (;i < 5; i++) {
138 strings->SetString(keys[i], L""); 138 strings->SetString(keys[i], L"");
139 } 139 }
140 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698