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

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

Issue 12041059: content: convert SSL notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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) 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/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { 320 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) {
321 int cert_id = content::CertStore::GetInstance()->StoreCert( 321 int cert_id = content::CertStore::GetInstance()->StoreCert(
322 ssl_info_.cert, web_contents_->GetRenderProcessHost()->GetID()); 322 ssl_info_.cert, web_contents_->GetRenderProcessHost()->GetID());
323 323
324 entry->GetSSL().security_style = 324 entry->GetSSL().security_style =
325 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; 325 content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
326 entry->GetSSL().cert_id = cert_id; 326 entry->GetSSL().cert_id = cert_id;
327 entry->GetSSL().cert_status = ssl_info_.cert_status; 327 entry->GetSSL().cert_status = ssl_info_.cert_status;
328 entry->GetSSL().security_bits = ssl_info_.security_bits; 328 entry->GetSSL().security_bits = ssl_info_.security_bits;
329 content::NotificationService::current()->Notify( 329 web_contents_->NotifyVisibleSSLStateChanged();
330 content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
331 content::Source<NavigationController>(&web_contents_->GetController()),
332 content::NotificationService::NoDetails());
333 } 330 }
334 331
335 // Matches events defined in ssl_error.html and ssl_roadblock.html. 332 // Matches events defined in ssl_error.html and ssl_roadblock.html.
336 void SSLBlockingPage::CommandReceived(const std::string& command) { 333 void SSLBlockingPage::CommandReceived(const std::string& command) {
337 int cmd = atoi(command.c_str()); 334 int cmd = atoi(command.c_str());
338 if (cmd == CMD_DONT_PROCEED) { 335 if (cmd == CMD_DONT_PROCEED) {
339 interstitial_page_->DontProceed(); 336 interstitial_page_->DontProceed();
340 } else if (cmd == CMD_PROCEED) { 337 } else if (cmd == CMD_PROCEED) {
341 interstitial_page_->Proceed(); 338 interstitial_page_->Proceed();
342 } else if (cmd == CMD_FOCUS) { 339 } else if (cmd == CMD_FOCUS) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" 395 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5"
399 }; 396 };
400 int i; 397 int i;
401 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { 398 for (i = 0; i < static_cast<int>(extra_info.size()); i++) {
402 strings->SetString(keys[i], extra_info[i]); 399 strings->SetString(keys[i], extra_info[i]);
403 } 400 }
404 for (; i < 5; i++) { 401 for (; i < 5; i++) {
405 strings->SetString(keys[i], ""); 402 strings->SetString(keys[i], "");
406 } 403 }
407 } 404 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_tab_helper.h » ('j') | content/public/browser/web_contents.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698