Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: components/cert_database/cert_database_service_io_part_chromeos.h

Issue 419013003: Replace c/b/nss_context by a KeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Flattened components/cert_database folders. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cert_database/cert_database_service_io_part_chromeos.h
diff --git a/components/cert_database/cert_database_service_io_part_chromeos.h b/components/cert_database/cert_database_service_io_part_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..e8a6b7d8723f44df9bd84f2ee771bb3e33a0a6bf
--- /dev/null
+++ b/components/cert_database/cert_database_service_io_part_chromeos.h
@@ -0,0 +1,57 @@
+// 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/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);
+
+ ~CertDatabaseServiceIOPartChromeOS() override;
+
+ void Init() override;
+
+ // Returns a callback that must be called at most once to signal that the
+ // system TPM token is ready (disabled or enabled).
+ // This function may only be called before Init(). However, the returned
+ // callback must be called after Init() and must be called on the IO thread.
+ SystemTPMTokenReadyCallback GetSystemTPMTokenReadyCallback();
+
+ protected:
+ void DidCreateNSSCertDatabase(scoped_ptr<net::NSSCertDatabase> db);
+
+ private:
+ 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_

Powered by Google App Engine
This is Rietveld 408576698