| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_add_cert_handler.h" | 5 #include "chrome/browser/ssl/ssl_add_cert_handler.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| 11 #include "chrome/browser/chrome_thread.h" | 11 #include "chrome/browser/chrome_thread.h" |
| 12 #include "chrome/common/platform_util.h" | 12 #include "chrome/browser/platform_util.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "net/base/cert_database.h" | 14 #include "net/base/cert_database.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/x509_certificate.h" | 16 #include "net/base/x509_certificate.h" |
| 17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
| 18 | 18 |
| 19 SSLAddCertHandler::SSLAddCertHandler(URLRequest* request, | 19 SSLAddCertHandler::SSLAddCertHandler(URLRequest* request, |
| 20 net::X509Certificate* cert) | 20 net::X509Certificate* cert) |
| 21 : cert_(cert) { | 21 : cert_(cert) { |
| 22 // Stay alive until the UI completes and Finished() is called. | 22 // Stay alive until the UI completes and Finished() is called. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 Release(); | 60 Release(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void SSLAddCertHandler::ShowError(const string16& error) { | 63 void SSLAddCertHandler::ShowError(const string16& error) { |
| 64 Browser* browser = BrowserList::GetLastActive(); | 64 Browser* browser = BrowserList::GetLastActive(); |
| 65 platform_util::SimpleErrorBox( | 65 platform_util::SimpleErrorBox( |
| 66 browser ? browser->window()->GetNativeHandle() : NULL, | 66 browser ? browser->window()->GetNativeHandle() : NULL, |
| 67 l10n_util::GetStringUTF16(IDS_ADD_CERT_FAILURE_TITLE), | 67 l10n_util::GetStringUTF16(IDS_ADD_CERT_FAILURE_TITLE), |
| 68 error); | 68 error); |
| 69 } | 69 } |
| OLD | NEW |