| OLD | NEW |
| 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/ui/webui/options2/certificate_manager_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_util.h" // for FileAccessProvider | 9 #include "base/file_util.h" // for FileAccessProvider |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 icu::Collator* collator_; | 129 icu::Collator* collator_; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 std::string NetErrorToString(int net_error) { | 132 std::string NetErrorToString(int net_error) { |
| 133 switch (net_error) { | 133 switch (net_error) { |
| 134 // TODO(mattm): handle more cases. | 134 // TODO(mattm): handle more cases. |
| 135 case net::ERR_IMPORT_CA_CERT_NOT_CA: | 135 case net::ERR_IMPORT_CA_CERT_NOT_CA: |
| 136 return l10n_util::GetStringUTF8(IDS_CERT_MANAGER_ERROR_NOT_CA); | 136 return l10n_util::GetStringUTF8(IDS_CERT_MANAGER_ERROR_NOT_CA); |
| 137 case net::ERR_IMPORT_CERT_ALREADY_EXISTS: |
| 138 return l10n_util::GetStringUTF8( |
| 139 IDS_CERT_MANAGER_ERROR_CERT_ALREADY_EXISTS); |
| 137 default: | 140 default: |
| 138 return l10n_util::GetStringUTF8(IDS_CERT_MANAGER_UNKNOWN_ERROR); | 141 return l10n_util::GetStringUTF8(IDS_CERT_MANAGER_UNKNOWN_ERROR); |
| 139 } | 142 } |
| 140 } | 143 } |
| 141 | 144 |
| 142 } // namespace | 145 } // namespace |
| 143 | 146 |
| 144 namespace options2 { | 147 namespace options2 { |
| 145 | 148 |
| 146 /////////////////////////////////////////////////////////////////////////////// | 149 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1057 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
| 1055 ready); | 1058 ready); |
| 1056 } | 1059 } |
| 1057 #endif | 1060 #endif |
| 1058 | 1061 |
| 1059 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1062 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
| 1060 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1063 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
| 1061 } | 1064 } |
| 1062 | 1065 |
| 1063 } // namespace options2 | 1066 } // namespace options2 |
| OLD | NEW |