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

Unified Diff: chrome/browser/chromeos/settings/mock_owner_key_util.cc

Issue 494093002: OwnerKeyUtil is moved to components/ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed GYP file. 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: chrome/browser/chromeos/settings/mock_owner_key_util.cc
diff --git a/chrome/browser/chromeos/settings/mock_owner_key_util.cc b/chrome/browser/chromeos/settings/mock_owner_key_util.cc
deleted file mode 100644
index 2cb4a74bfb5f970c164526557b1a29fcb96c39f1..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/settings/mock_owner_key_util.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "chrome/browser/chromeos/settings/mock_owner_key_util.h"
-
-#include "crypto/rsa_private_key.h"
-
-namespace chromeos {
-
-MockOwnerKeyUtil::MockOwnerKeyUtil() {}
-
-MockOwnerKeyUtil::~MockOwnerKeyUtil() {}
-
-bool MockOwnerKeyUtil::ImportPublicKey(std::vector<uint8>* output) {
- *output = public_key_;
- return !public_key_.empty();
-}
-
-crypto::RSAPrivateKey* MockOwnerKeyUtil::FindPrivateKeyInSlot(
- const std::vector<uint8>& key,
- PK11SlotInfo* slot) {
- return private_key_.get() ? private_key_->Copy() : NULL;
-}
-
-bool MockOwnerKeyUtil::IsPublicKeyPresent() {
- return !public_key_.empty();
-}
-
-void MockOwnerKeyUtil::Clear() {
- public_key_.clear();
- private_key_.reset();
-}
-
-void MockOwnerKeyUtil::SetPublicKey(const std::vector<uint8>& key) {
- public_key_ = key;
-}
-
-void MockOwnerKeyUtil::SetPublicKeyFromPrivateKey(
- const crypto::RSAPrivateKey& key) {
- key.ExportPublicKey(&public_key_);
-}
-
-void MockOwnerKeyUtil::SetPrivateKey(scoped_ptr<crypto::RSAPrivateKey> key) {
- private_key_ = key.Pass();
- private_key_->ExportPublicKey(&public_key_);
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/settings/mock_owner_key_util.h ('k') | chrome/browser/chromeos/settings/owner_key_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698