Index: components/ownership/mock_owner_key_util.cc |
diff --git a/chrome/browser/chromeos/settings/mock_owner_key_util.cc b/components/ownership/mock_owner_key_util.cc |
similarity index 79% |
rename from chrome/browser/chromeos/settings/mock_owner_key_util.cc |
rename to components/ownership/mock_owner_key_util.cc |
index 2cb4a74bfb5f970c164526557b1a29fcb96c39f1..495f993397edf4e432b31115c2199eece43b87ec 100644 |
--- a/chrome/browser/chromeos/settings/mock_owner_key_util.cc |
+++ b/components/ownership/mock_owner_key_util.cc |
@@ -2,26 +2,31 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/chromeos/settings/mock_owner_key_util.h" |
+#include "components/ownership/mock_owner_key_util.h" |
+#include "base/files/file_path.h" |
#include "crypto/rsa_private_key.h" |
-namespace chromeos { |
+namespace ownership { |
-MockOwnerKeyUtil::MockOwnerKeyUtil() {} |
+MockOwnerKeyUtil::MockOwnerKeyUtil() { |
+} |
-MockOwnerKeyUtil::~MockOwnerKeyUtil() {} |
+MockOwnerKeyUtil::~MockOwnerKeyUtil() { |
+} |
bool MockOwnerKeyUtil::ImportPublicKey(std::vector<uint8>* output) { |
*output = public_key_; |
return !public_key_.empty(); |
} |
+#if defined(USE_NSS) |
crypto::RSAPrivateKey* MockOwnerKeyUtil::FindPrivateKeyInSlot( |
const std::vector<uint8>& key, |
PK11SlotInfo* slot) { |
return private_key_.get() ? private_key_->Copy() : NULL; |
} |
+#endif // defined(USE_NSS) |
bool MockOwnerKeyUtil::IsPublicKeyPresent() { |
return !public_key_.empty(); |
@@ -46,4 +51,4 @@ void MockOwnerKeyUtil::SetPrivateKey(scoped_ptr<crypto::RSAPrivateKey> key) { |
private_key_->ExportPublicKey(&public_key_); |
} |
-} // namespace chromeos |
+} // namespace ownership |