Chromium Code Reviews| 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 <string> | |
|
Mattias Nissler (ping if slow)
2011/08/09 15:37:25
you already have added it in the corresponding hea
markusheintz_
2011/08/15 19:09:04
True don't know way lint complained about this. Ma
| |
| 8 | |
| 7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 8 #include "chrome/app/breakpad_mac.h" | 10 #include "chrome/app/breakpad_mac.h" |
| 9 #include "chrome/browser/browser_about_handler.h" | 11 #include "chrome/browser/browser_about_handler.h" |
| 10 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/browsing_data_remover.h" | 13 #include "chrome/browser/browsing_data_remover.h" |
| 12 #include "chrome/browser/character_encoding.h" | 14 #include "chrome/browser/character_encoding.h" |
| 13 #include "chrome/browser/chrome_plugin_message_filter.h" | 15 #include "chrome/browser/chrome_plugin_message_filter.h" |
| 14 #include "chrome/browser/chrome_quota_permission_context.h" | 16 #include "chrome/browser/chrome_quota_permission_context.h" |
| 15 #include "chrome/browser/chrome_worker_message_filter.h" | 17 #include "chrome/browser/chrome_worker_message_filter.h" |
| 16 #include "chrome/browser/content_settings/host_content_settings_map.h" | 18 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 return; | 532 return; |
| 531 } | 533 } |
| 532 } | 534 } |
| 533 | 535 |
| 534 // Otherwise, display an SSL blocking page. | 536 // Otherwise, display an SSL blocking page. |
| 535 SSLBlockingPage* blocking_page = new SSLBlockingPage( | 537 SSLBlockingPage* blocking_page = new SSLBlockingPage( |
| 536 handler, overridable, callback); | 538 handler, overridable, callback); |
| 537 blocking_page->Show(); | 539 blocking_page->Show(); |
| 538 } | 540 } |
| 539 | 541 |
| 540 void ChromeContentBrowserClient::ShowClientCertificateRequestDialog( | 542 void ChromeContentBrowserClient::SelectClientCertificate( |
| 541 int render_process_id, | 543 int render_process_id, |
| 542 int render_view_id, | 544 int render_view_id, |
| 543 SSLClientAuthHandler* handler) { | 545 SSLClientAuthHandler* handler) { |
| 544 TabContents* tab = tab_util::GetTabContentsByID( | 546 TabContents* tab = tab_util::GetTabContentsByID( |
| 545 render_process_id, render_view_id); | 547 render_process_id, render_view_id); |
| 546 if (!tab) { | 548 if (!tab) { |
| 547 NOTREACHED(); | 549 NOTREACHED(); |
| 548 return; | 550 return; |
| 549 } | 551 } |
| 550 | 552 |
| 551 TabContentsWrapper* wrapper = | 553 TabContentsWrapper* wrapper = |
| 552 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 554 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
| 553 wrapper->ssl_helper()->ShowClientCertificateRequestDialog(handler); | 555 wrapper->ssl_helper()->SelectClientCertificate(handler); |
| 554 } | 556 } |
| 555 | 557 |
| 556 void ChromeContentBrowserClient::AddNewCertificate( | 558 void ChromeContentBrowserClient::AddNewCertificate( |
| 557 net::URLRequest* request, | 559 net::URLRequest* request, |
| 558 net::X509Certificate* cert, | 560 net::X509Certificate* cert, |
| 559 int render_process_id, | 561 int render_process_id, |
| 560 int render_view_id) { | 562 int render_view_id) { |
| 561 // The handler will run the UI and delete itself when it's finished. | 563 // The handler will run the UI and delete itself when it's finished. |
| 562 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 564 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); |
| 563 } | 565 } |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 785 #if defined(USE_NSS) | 787 #if defined(USE_NSS) |
| 786 crypto::CryptoModuleBlockingPasswordDelegate* | 788 crypto::CryptoModuleBlockingPasswordDelegate* |
| 787 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 789 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 788 const GURL& url) { | 790 const GURL& url) { |
| 789 return browser::NewCryptoModuleBlockingDialogDelegate( | 791 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 790 browser::kCryptoModulePasswordKeygen, url.host()); | 792 browser::kCryptoModulePasswordKeygen, url.host()); |
| 791 } | 793 } |
| 792 #endif | 794 #endif |
| 793 | 795 |
| 794 } // namespace chrome | 796 } // namespace chrome |
| OLD | NEW |