Index: components/cert_database/public/chromeos/cert_database_service_io_part_chromeos.h |
diff --git a/components/cert_database/public/chromeos/cert_database_service_io_part_chromeos.h b/components/cert_database/public/chromeos/cert_database_service_io_part_chromeos.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..978f9f08c9e0736aedb15057b1af5e2d8e1f0832 |
--- /dev/null |
+++ b/components/cert_database/public/chromeos/cert_database_service_io_part_chromeos.h |
@@ -0,0 +1,59 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PART_CHROMEOS_h_ |
+#define COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PART_CHROMEOS_h_ |
+ |
+#include <string> |
+ |
+#include "base/files/file_path.h" |
+#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/sequenced_task_runner.h" |
+#include "components/cert_database/public/cert_database_service_io_part.h" |
+ |
+namespace chromeos { |
+class CryptohomeClient; |
+} |
+ |
+namespace cert_database { |
+ |
+class CertDatabaseServiceIOPartChromeOS : public CertDatabaseServiceIOPart { |
+ public: |
+ typedef base::Callback<void(bool system_tpm_token_enabled)> |
+ SystemTPMTokenReadyCallback; |
+ |
+ CertDatabaseServiceIOPartChromeOS( |
+ const std::string& user_email, |
+ const std::string& username_hash, |
+ bool use_system_key_slot, |
+ const base::FilePath& path, |
+ const scoped_refptr<base::SequencedTaskRunner>& dbus_task_runner, |
+ chromeos::CryptohomeClient* cryptohome_client); |
+ |
+ virtual ~CertDatabaseServiceIOPartChromeOS(); |
+ |
+ virtual void Init() override; |
+ |
+ SystemTPMTokenReadyCallback GetSystemTPMTokenReadyCallback(); |
+ |
+ protected: |
+ virtual void DidCreateNSSCertDatabase( |
+ scoped_ptr<net::NSSCertDatabase> db) override; |
+ |
+ private: |
+ static void OnSystemTPMTokenReady( |
+ const base::WeakPtr<CertDatabaseServiceIOPart>& weak_ptr, |
+ CertDatabaseServiceIOPartChromeOS* io_part, |
+ bool system_tpm_token_enabled); |
+ |
+ class Internal; |
+ scoped_ptr<Internal> internal_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CertDatabaseServiceIOPartChromeOS); |
+}; |
+ |
+} // namespace cert_database |
+ |
+#endif // COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PART_CHROMEOS_h_ |