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

Unified Diff: components/ownership/owner_key_util_chromeos.h

Issue 494093002: OwnerKeyUtil is moved to components/ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 months 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/ownership/owner_key_util_chromeos.h
diff --git a/components/ownership/owner_key_util_chromeos.h b/components/ownership/owner_key_util_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..6136ffb4ab834d170e5e27f81df710ed82490c0b
--- /dev/null
+++ b/components/ownership/owner_key_util_chromeos.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
erikwright (departed) 2014/08/25 15:51:07 Remove the 'chromeos' from this filename. There is
ygorshenin1 2014/08/26 14:53:35 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_CHROMEOS_H_
+#define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_CHROMEOS_H_
+
+#include "base/compiler_specific.h"
+#include "base/files/file_path.h"
+#include "base/macros.h"
+#include "components/ownership/owner_key_util.h"
+#include "components/ownership/ownership_export.h"
+
+namespace ownership {
+
+// Implementation of OwnerKeyUtil that is used in production code.
+class OWNERSHIP_EXPORT OwnerKeyUtilChromeOS : public OwnerKeyUtil {
+ public:
+ // OwnerKeyUtil:
+ virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE;
+ virtual crypto::RSAPrivateKey* FindPrivateKeyInSlot(
+ const std::vector<uint8>& key,
+ PK11SlotInfo* slot) OVERRIDE;
+ virtual bool IsPublicKeyPresent() OVERRIDE;
+
+ protected:
+ friend class OwnerKeyUtil;
+ friend class OwnerKeyUtilChromeOSTest;
+
+ explicit OwnerKeyUtilChromeOS(const base::FilePath& public_key_file);
+
+ virtual ~OwnerKeyUtilChromeOS();
+
+ private:
+ // The file that holds the public key.
+ base::FilePath key_file_;
+
+ DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilChromeOS);
+};
+
+} // namespace ownership
+
+#endif // COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698