OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/browser_about_handler.h" | 9 #include "chrome/browser/browser_about_handler.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return; | 471 return; |
472 } | 472 } |
473 } | 473 } |
474 | 474 |
475 // Otherwise, display an SSL blocking page. | 475 // Otherwise, display an SSL blocking page. |
476 SSLBlockingPage* blocking_page = new SSLBlockingPage( | 476 SSLBlockingPage* blocking_page = new SSLBlockingPage( |
477 handler, overridable, callback); | 477 handler, overridable, callback); |
478 blocking_page->Show(); | 478 blocking_page->Show(); |
479 } | 479 } |
480 | 480 |
481 void ChromeContentBrowserClient::ShowClientCertificateRequestDialog( | 481 void ChromeContentBrowserClient::SelectClientCertificate( |
482 int render_process_id, | 482 int render_process_id, |
483 int render_view_id, | 483 int render_view_id, |
484 SSLClientAuthHandler* handler) { | 484 SSLClientAuthHandler* handler) { |
485 TabContents* tab = tab_util::GetTabContentsByID( | 485 TabContents* tab = tab_util::GetTabContentsByID( |
486 render_process_id, render_view_id); | 486 render_process_id, render_view_id); |
487 if (!tab) { | 487 if (!tab) { |
488 NOTREACHED(); | 488 NOTREACHED(); |
489 return; | 489 return; |
490 } | 490 } |
491 | 491 |
492 TabContentsWrapper* wrapper = | 492 TabContentsWrapper* wrapper = |
493 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 493 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
494 wrapper->ssl_helper()->ShowClientCertificateRequestDialog(handler); | 494 wrapper->ssl_helper()->SelectClientCertificate(handler); |
495 } | 495 } |
496 | 496 |
497 void ChromeContentBrowserClient::AddNewCertificate( | 497 void ChromeContentBrowserClient::AddNewCertificate( |
498 net::URLRequest* request, | 498 net::URLRequest* request, |
499 net::X509Certificate* cert, | 499 net::X509Certificate* cert, |
500 int render_process_id, | 500 int render_process_id, |
501 int render_view_id) { | 501 int render_view_id) { |
502 // The handler will run the UI and delete itself when it's finished. | 502 // The handler will run the UI and delete itself when it's finished. |
503 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 503 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); |
504 } | 504 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 #if defined(USE_NSS) | 730 #if defined(USE_NSS) |
731 crypto::CryptoModuleBlockingPasswordDelegate* | 731 crypto::CryptoModuleBlockingPasswordDelegate* |
732 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 732 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
733 const GURL& url) { | 733 const GURL& url) { |
734 return browser::NewCryptoModuleBlockingDialogDelegate( | 734 return browser::NewCryptoModuleBlockingDialogDelegate( |
735 browser::kCryptoModulePasswordKeygen, url.host()); | 735 browser::kCryptoModulePasswordKeygen, url.host()); |
736 } | 736 } |
737 #endif | 737 #endif |
738 | 738 |
739 } // namespace chrome | 739 } // namespace chrome |
OLD | NEW |