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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10381051: Show the "cannot proceed" text only when appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 platform_util::ShowItemInFolder(path); 1007 platform_util::ShowItemInFolder(path);
1008 } 1008 }
1009 1009
1010 void ChromeContentBrowserClient::AllowCertificateError( 1010 void ChromeContentBrowserClient::AllowCertificateError(
1011 int render_process_id, 1011 int render_process_id,
1012 int render_view_id, 1012 int render_view_id,
1013 int cert_error, 1013 int cert_error,
1014 const net::SSLInfo& ssl_info, 1014 const net::SSLInfo& ssl_info,
1015 const GURL& request_url, 1015 const GURL& request_url,
1016 bool overridable, 1016 bool overridable,
1017 bool strict_enforcement,
1017 const base::Callback<void(bool)>& callback, 1018 const base::Callback<void(bool)>& callback,
1018 bool* cancel_request) { 1019 bool* cancel_request) {
1019 // If the tab is being prerendered, cancel the prerender and the request. 1020 // If the tab is being prerendered, cancel the prerender and the request.
1020 WebContents* tab = tab_util::GetWebContentsByID( 1021 WebContents* tab = tab_util::GetWebContentsByID(
1021 render_process_id, render_view_id); 1022 render_process_id, render_view_id);
1022 if (!tab) { 1023 if (!tab) {
1023 NOTREACHED(); 1024 NOTREACHED();
1024 return; 1025 return;
1025 } 1026 }
1026 prerender::PrerenderManager* prerender_manager = 1027 prerender::PrerenderManager* prerender_manager =
1027 prerender::PrerenderManagerFactory::GetForProfile( 1028 prerender::PrerenderManagerFactory::GetForProfile(
1028 Profile::FromBrowserContext(tab->GetBrowserContext())); 1029 Profile::FromBrowserContext(tab->GetBrowserContext()));
1029 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab)) { 1030 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab)) {
1030 if (prerender_manager->prerender_tracker()->TryCancel( 1031 if (prerender_manager->prerender_tracker()->TryCancel(
1031 render_process_id, render_view_id, 1032 render_process_id, render_view_id,
1032 prerender::FINAL_STATUS_SSL_ERROR)) { 1033 prerender::FINAL_STATUS_SSL_ERROR)) {
1033 *cancel_request = true; 1034 *cancel_request = true;
1034 return; 1035 return;
1035 } 1036 }
1036 } 1037 }
1037 1038
1038 // Otherwise, display an SSL blocking page. 1039 // Otherwise, display an SSL blocking page.
1039 new SSLBlockingPage( 1040 new SSLBlockingPage(tab, cert_error, ssl_info, request_url, overridable,
1040 tab, cert_error, ssl_info, request_url, overridable, callback); 1041 strict_enforcement, callback);
1041 } 1042 }
1042 1043
1043 void ChromeContentBrowserClient::SelectClientCertificate( 1044 void ChromeContentBrowserClient::SelectClientCertificate(
1044 int render_process_id, 1045 int render_process_id,
1045 int render_view_id, 1046 int render_view_id,
1046 const net::HttpNetworkSession* network_session, 1047 const net::HttpNetworkSession* network_session,
1047 net::SSLCertRequestInfo* cert_request_info, 1048 net::SSLCertRequestInfo* cert_request_info,
1048 const base::Callback<void(net::X509Certificate*)>& callback) { 1049 const base::Callback<void(net::X509Certificate*)>& callback) {
1049 WebContents* tab = tab_util::GetWebContentsByID( 1050 WebContents* tab = tab_util::GetWebContentsByID(
1050 render_process_id, render_view_id); 1051 render_process_id, render_view_id);
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 #if defined(USE_NSS) 1624 #if defined(USE_NSS)
1624 crypto::CryptoModuleBlockingPasswordDelegate* 1625 crypto::CryptoModuleBlockingPasswordDelegate*
1625 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1626 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1626 const GURL& url) { 1627 const GURL& url) {
1627 return browser::NewCryptoModuleBlockingDialogDelegate( 1628 return browser::NewCryptoModuleBlockingDialogDelegate(
1628 browser::kCryptoModulePasswordKeygen, url.host()); 1629 browser::kCryptoModulePasswordKeygen, url.host());
1629 } 1630 }
1630 #endif 1631 #endif
1631 1632
1632 } // namespace chrome 1633 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698