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

Unified Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_factory.h

Issue 729803002: Easy Sign-in: Use TPM RSA key to sign nonce in sign-in protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years 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: chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_factory.h
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_factory.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c85d4fe6c47c33aa3e27eddcc102e41b2dab285
--- /dev/null
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_factory.h
@@ -0,0 +1,44 @@
+// 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 CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TPM_KEY_MANAGER_FACTORY_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TPM_KEY_MANAGER_FACTORY_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+
+namespace content {
+class BrowserContext;
+}
+
+template <typename T> struct DefaultSingletonTraits;
+class EasyUnlockTpmKeyManager;
+
+// Singleton factory that builds and owns all EasyUnlockTpmKeyManager services.
+class EasyUnlockTpmKeyManagerFactory
+ : public BrowserContextKeyedServiceFactory {
+ public:
+ static EasyUnlockTpmKeyManagerFactory* GetInstance();
+
+ static EasyUnlockTpmKeyManager* Get(content::BrowserContext* context);
+ static EasyUnlockTpmKeyManager* GetForUser(const std::string& user_id);
+
+ private:
+ friend struct DefaultSingletonTraits<EasyUnlockTpmKeyManagerFactory>;
+
+ EasyUnlockTpmKeyManagerFactory();
+ ~EasyUnlockTpmKeyManagerFactory() override;
+
+ // BrowserContextKeyedServiceFactory:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+ content::BrowserContext* GetBrowserContextToUse(
+ content::BrowserContext* context) const override;
+
+ DISALLOW_COPY_AND_ASSIGN(EasyUnlockTpmKeyManagerFactory);
+};
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TPM_KEY_MANAGER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698