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

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

Issue 193063: Fix for an SSL error related crasher (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 handler->ssl_info().cert, 298 handler->ssl_info().cert,
299 tab->render_view_host()->process()->id()); 299 tab->render_view_host()->process()->id());
300 std::string security_info = 300 std::string security_info =
301 SSLManager::SerializeSecurityInfo(cert_id, 301 SSLManager::SerializeSecurityInfo(cert_id,
302 handler->ssl_info().cert_status, 302 handler->ssl_info().cert_status,
303 handler->ssl_info().security_bits); 303 handler->ssl_info().security_bits);
304 tab->render_view_host()->LoadAlternateHTMLString(html_text, 304 tab->render_view_host()->LoadAlternateHTMLString(html_text,
305 true, 305 true,
306 handler->request_url(), 306 handler->request_url(),
307 security_info); 307 security_info);
308 tab->controller().GetActiveEntry()->set_page_type( 308
309 NavigationEntry::ERROR_PAGE); 309 // TODO(jcampan): we may want to set the navigation entry type to
310 // PageType::ERROR_PAGE. The navigation entry is not available at this point,
311 // it is created when the rendere receives a DidNavigate (triggered by the
willchan no longer on Chromium 2009/09/10 00:19:16 s/rendere/renderer/
312 // LoadAlternateHTMLString above). We'd probably need to pass the page type
313 // along with the security_info.
310 } 314 }
311 315
312 void SSLPolicy::AddMixedContentWarningToConsole( 316 void SSLPolicy::AddMixedContentWarningToConsole(
313 SSLMixedContentHandler* handler) { 317 SSLMixedContentHandler* handler) {
314 const std::wstring& text = l10n_util::GetStringF( 318 const std::wstring& text = l10n_util::GetStringF(
315 IDS_MIXED_CONTENT_LOG_MESSAGE, 319 IDS_MIXED_CONTENT_LOG_MESSAGE,
316 UTF8ToWide(handler->frame_origin()), 320 UTF8ToWide(handler->frame_origin()),
317 UTF8ToWide(handler->request_url().spec())); 321 UTF8ToWide(handler->request_url().spec()));
318 backend_->AddMessageToConsole( 322 backend_->AddMessageToConsole(
319 WideToUTF16Hack(text), WebConsoleMessage::LevelWarning); 323 WideToUTF16Hack(text), WebConsoleMessage::LevelWarning);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // mark the main frame's origin as broken too. 359 // mark the main frame's origin as broken too.
356 MarkOriginAsBroken(info->main_frame_origin(), info->child_id()); 360 MarkOriginAsBroken(info->main_frame_origin(), info->child_id());
357 } 361 }
358 } 362 }
359 363
360 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { 364 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) {
361 // This request as a broken cert, which means its host is broken. 365 // This request as a broken cert, which means its host is broken.
362 backend_->MarkHostAsBroken(info->url().host(), info->child_id()); 366 backend_->MarkHostAsBroken(info->url().host(), info->child_id());
363 UpdateStateForMixedContent(info); 367 UpdateStateForMixedContent(info);
364 } 368 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698