| 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/ui/webui/options/certificate_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.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 11 matching lines...) Expand all Loading... |
| 22 #include "net/base/crypto_module.h" | 22 #include "net/base/crypto_module.h" |
| 23 #include "net/base/x509_certificate.h" | 23 #include "net/base/x509_certificate.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 25 #include "ui/base/l10n/l10n_util_collator.h" | 25 #include "ui/base/l10n/l10n_util_collator.h" |
| 26 | 26 |
| 27 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) |
| 28 #include "chrome/browser/chromeos/cros/cros_library.h" | 28 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 29 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 29 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 using content::BrowserThread; |
| 33 |
| 32 namespace { | 34 namespace { |
| 33 | 35 |
| 34 static const char kKeyId[] = "id"; | 36 static const char kKeyId[] = "id"; |
| 35 static const char kSubNodesId[] = "subnodes"; | 37 static const char kSubNodesId[] = "subnodes"; |
| 36 static const char kNameId[] = "name"; | 38 static const char kNameId[] = "name"; |
| 37 static const char kReadOnlyId[] = "readonly"; | 39 static const char kReadOnlyId[] = "readonly"; |
| 38 static const char kUntrustedId[] = "untrusted"; | 40 static const char kUntrustedId[] = "untrusted"; |
| 39 static const char kIconId[] = "icon"; | 41 static const char kIconId[] = "icon"; |
| 40 static const char kSecurityDeviceId[] = "device"; | 42 static const char kSecurityDeviceId[] = "device"; |
| 41 static const char kErrorId[] = "error"; | 43 static const char kErrorId[] = "error"; |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 // TODO(xiyuan): Use async way when underlying supports it. | 1039 // TODO(xiyuan): Use async way when underlying supports it. |
| 1038 base::FundamentalValue ready(cryptohome->Pkcs11IsTpmTokenReady()); | 1040 base::FundamentalValue ready(cryptohome->Pkcs11IsTpmTokenReady()); |
| 1039 web_ui_->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1041 web_ui_->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
| 1040 ready); | 1042 ready); |
| 1041 } | 1043 } |
| 1042 #endif | 1044 #endif |
| 1043 | 1045 |
| 1044 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1046 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
| 1045 return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); | 1047 return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); |
| 1046 } | 1048 } |
| OLD | NEW |