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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 return; | 462 return; |
463 } | 463 } |
464 } | 464 } |
465 | 465 |
466 // Otherwise, display an SSL blocking page. | 466 // Otherwise, display an SSL blocking page. |
467 SSLBlockingPage* blocking_page = new SSLBlockingPage( | 467 SSLBlockingPage* blocking_page = new SSLBlockingPage( |
468 handler, overridable, callback); | 468 handler, overridable, callback); |
469 blocking_page->Show(); | 469 blocking_page->Show(); |
470 } | 470 } |
471 | 471 |
472 void ChromeContentBrowserClient::ShowClientCertificateRequestDialog( | 472 void ChromeContentBrowserClient::SelectClientCertificate( |
473 int render_process_id, | 473 int render_process_id, |
474 int render_view_id, | 474 int render_view_id, |
475 SSLClientAuthHandler* handler) { | 475 SSLClientAuthHandler* handler) { |
476 TabContents* tab = tab_util::GetTabContentsByID( | 476 TabContents* tab = tab_util::GetTabContentsByID( |
477 render_process_id, render_view_id); | 477 render_process_id, render_view_id); |
478 if (!tab) { | 478 if (!tab) { |
479 NOTREACHED(); | 479 NOTREACHED(); |
480 return; | 480 return; |
481 } | 481 } |
482 | 482 |
483 TabContentsWrapper* wrapper = | 483 TabContentsWrapper* wrapper = |
484 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 484 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
485 wrapper->ssl_helper()->ShowClientCertificateRequestDialog(handler); | 485 wrapper->ssl_helper()->SelectClientCertificate(handler); |
486 } | 486 } |
487 | 487 |
488 void ChromeContentBrowserClient::AddNewCertificate( | 488 void ChromeContentBrowserClient::AddNewCertificate( |
489 net::URLRequest* request, | 489 net::URLRequest* request, |
490 net::X509Certificate* cert, | 490 net::X509Certificate* cert, |
491 int render_process_id, | 491 int render_process_id, |
492 int render_view_id) { | 492 int render_view_id) { |
493 // The handler will run the UI and delete itself when it's finished. | 493 // The handler will run the UI and delete itself when it's finished. |
494 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 494 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); |
495 } | 495 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 #if defined(USE_NSS) | 717 #if defined(USE_NSS) |
718 crypto::CryptoModuleBlockingPasswordDelegate* | 718 crypto::CryptoModuleBlockingPasswordDelegate* |
719 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 719 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
720 const GURL& url) { | 720 const GURL& url) { |
721 return browser::NewCryptoModuleBlockingDialogDelegate( | 721 return browser::NewCryptoModuleBlockingDialogDelegate( |
722 browser::kCryptoModulePasswordKeygen, url.host()); | 722 browser::kCryptoModulePasswordKeygen, url.host()); |
723 } | 723 } |
724 #endif | 724 #endif |
725 | 725 |
726 } // namespace chrome | 726 } // namespace chrome |
OLD | NEW |