OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PART_C
HROMEOS_h_ |
| 6 #define COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PART_C
HROMEOS_h_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/sequenced_task_runner.h" |
| 14 #include "components/cert_database/public/cert_database_service_io_part.h" |
| 15 |
| 16 namespace chromeos { |
| 17 class CryptohomeClient; |
| 18 } |
| 19 |
| 20 namespace cert_database { |
| 21 |
| 22 class CertDatabaseServiceIOPartChromeOS : public CertDatabaseServiceIOPart { |
| 23 public: |
| 24 typedef base::Callback<void(bool system_tpm_token_enabled)> |
| 25 SystemTPMTokenReadyCallback; |
| 26 |
| 27 CertDatabaseServiceIOPartChromeOS( |
| 28 const std::string& user_email, |
| 29 const std::string& username_hash, |
| 30 bool use_system_key_slot, |
| 31 const base::FilePath& path, |
| 32 const scoped_refptr<base::SequencedTaskRunner>& dbus_task_runner, |
| 33 chromeos::CryptohomeClient* cryptohome_client); |
| 34 |
| 35 virtual ~CertDatabaseServiceIOPartChromeOS(); |
| 36 |
| 37 virtual void Init() override; |
| 38 |
| 39 SystemTPMTokenReadyCallback GetSystemTPMTokenReadyCallback(); |
| 40 |
| 41 protected: |
| 42 virtual void DidCreateNSSCertDatabase( |
| 43 scoped_ptr<net::NSSCertDatabase> db) override; |
| 44 |
| 45 private: |
| 46 static void OnSystemTPMTokenReady( |
| 47 const base::WeakPtr<CertDatabaseServiceIOPart>& weak_ptr, |
| 48 CertDatabaseServiceIOPartChromeOS* io_part, |
| 49 bool system_tpm_token_enabled); |
| 50 |
| 51 class Internal; |
| 52 scoped_ptr<Internal> internal_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(CertDatabaseServiceIOPartChromeOS); |
| 55 }; |
| 56 |
| 57 } // namespace cert_database |
| 58 |
| 59 #endif // COMPONENTS_CERT_DATABASE_PUBLIC_CHROMEOS_CERT_DATABASE_SERVICE_IO_PAR
T_CHROMEOS_h_ |
OLD | NEW |