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

Unified Diff: chrome/browser/chromeos/login/mock_owner_key_utils.h

Issue 6538098: [Chrome OS] Owner keys are generated outside Chrome now; handle appropriately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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/login/mock_owner_key_utils.h
diff --git a/chrome/browser/chromeos/login/mock_owner_key_utils.h b/chrome/browser/chromeos/login/mock_owner_key_utils.h
index 4715dfb3ecbf1249e04bb69744685278984b9f73..00986041053d6ca6694432b18adb3b9f910a13e8 100644
--- a/chrome/browser/chromeos/login/mock_owner_key_utils.h
+++ b/chrome/browser/chromeos/login/mock_owner_key_utils.h
@@ -24,11 +24,6 @@ namespace chromeos {
class MockKeyUtils : public OwnerKeyUtils {
public:
MockKeyUtils() {}
- MOCK_METHOD0(GenerateKeyPair, RSAPrivateKey*());
- MOCK_METHOD2(ExportPublicKeyViaDbus, bool(RSAPrivateKey* pair,
- LoginLibrary::Delegate*));
- MOCK_METHOD2(ExportPublicKeyToFile, bool(RSAPrivateKey* pair,
- const FilePath& key_file));
MOCK_METHOD2(ImportPublicKey, bool(const FilePath& key_file,
std::vector<uint8>* output));
MOCK_METHOD3(Verify, bool(const std::string& data,
@@ -39,29 +34,8 @@ class MockKeyUtils : public OwnerKeyUtils {
base::RSAPrivateKey* key));
MOCK_METHOD1(FindPrivateKey, RSAPrivateKey*(const std::vector<uint8>& key));
MOCK_METHOD0(GetOwnerKeyFilePath, FilePath());
-
- // To simulate doing a LoginLibrary::SetOwnerKey call
- static void SetOwnerKeyCallback(LoginLibrary::Delegate* callback,
- bool value) {
- callback->OnComplete(value);
- }
-
- static bool ExportPublicKeyViaDbusWin(RSAPrivateKey* key,
- LoginLibrary::Delegate* d) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(&SetOwnerKeyCallback, d, true));
- return true;
- }
-
- static bool ExportPublicKeyViaDbusFail(RSAPrivateKey* key,
- LoginLibrary::Delegate* d) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(&SetOwnerKeyCallback, d, false));
- return false;
- }
-
+ MOCK_METHOD2(ExportPublicKeyToFile, bool(base::RSAPrivateKey* pair,
+ const FilePath& key_file));
protected:
virtual ~MockKeyUtils() {}
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_ownership_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698