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

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

Issue 42054: Stop using renderer specific host ids in ResourceDispatcher. This allows it ... (Closed) Base URL: svn://chrome-svn/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_policy.h" 5 #include "chrome/browser/ssl/ssl_policy.h"
6 6
7 #include "base/singleton.h" 7 #include "base/singleton.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/cert_store.h" 10 #include "chrome/browser/cert_store.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 static const StringPiece html( 92 static const StringPiece html(
93 ResourceBundle::GetSharedInstance().GetRawDataResource( 93 ResourceBundle::GetSharedInstance().GetRawDataResource(
94 IDR_SSL_ERROR_HTML)); 94 IDR_SSL_ERROR_HTML));
95 95
96 std::string html_text(jstemplate_builder::GetTemplateHtml(html, &strings, 96 std::string html_text(jstemplate_builder::GetTemplateHtml(html, &strings,
97 "template_root")); 97 "template_root"));
98 98
99 WebContents* tab = error->GetWebContents(); 99 WebContents* tab = error->GetWebContents();
100 int cert_id = CertStore::GetSharedInstance()->StoreCert( 100 int cert_id = CertStore::GetSharedInstance()->StoreCert(
101 error->ssl_info().cert, tab->render_view_host()->process()->host_id()); 101 error->ssl_info().cert, tab->render_view_host()->process()->pid());
102 std::string security_info = 102 std::string security_info =
103 SSLManager::SerializeSecurityInfo(cert_id, 103 SSLManager::SerializeSecurityInfo(cert_id,
104 error->ssl_info().cert_status, 104 error->ssl_info().cert_status,
105 error->ssl_info().security_bits); 105 error->ssl_info().security_bits);
106 tab->render_view_host()->LoadAlternateHTMLString(html_text, 106 tab->render_view_host()->LoadAlternateHTMLString(html_text,
107 true, 107 true,
108 error->request_url(), 108 error->request_url(),
109 security_info); 109 security_info);
110 tab->controller()->GetActiveEntry()->set_page_type( 110 tab->controller()->GetActiveEntry()->set_page_type(
111 NavigationEntry::ERROR_PAGE); 111 NavigationEntry::ERROR_PAGE);
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 void SSLPolicy::OnFatalCertError(const GURL& main_frame_url, 484 void SSLPolicy::OnFatalCertError(const GURL& main_frame_url,
485 SSLManager::CertError* error) { 485 SSLManager::CertError* error) {
486 if (error->resource_type() != ResourceType::MAIN_FRAME) { 486 if (error->resource_type() != ResourceType::MAIN_FRAME) {
487 error->DenyRequest(); 487 error->DenyRequest();
488 return; 488 return;
489 } 489 }
490 error->CancelRequest(); 490 error->CancelRequest();
491 ShowErrorPage(this, error); 491 ShowErrorPage(this, error);
492 // No need to degrade our security indicators because we didn't continue. 492 // No need to degrade our security indicators because we didn't continue.
493 } 493 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/tab_contents/interstitial_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698