summaryrefslogtreecommitdiffstats
path: root/chromeos/cryptohome
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/cryptohome')
-rw-r--r--chromeos/cryptohome/mock_async_method_caller.cc34
-rw-r--r--chromeos/cryptohome/mock_async_method_caller.h8
2 files changed, 0 insertions, 42 deletions
diff --git a/chromeos/cryptohome/mock_async_method_caller.cc b/chromeos/cryptohome/mock_async_method_caller.cc
index ce02bd3..eb2203c 100644
--- a/chromeos/cryptohome/mock_async_method_caller.cc
+++ b/chromeos/cryptohome/mock_async_method_caller.cc
@@ -10,10 +10,6 @@ using ::testing::_;
namespace cryptohome {
-const char MockAsyncMethodCaller::kFakeAttestationEnrollRequest[] = "enrollreq";
-const char MockAsyncMethodCaller::kFakeAttestationCertRequest[] = "certreq";
-const char MockAsyncMethodCaller::kFakeAttestationCert[] = "cert";
-
MockAsyncMethodCaller::MockAsyncMethodCaller()
: success_(false), return_code_(cryptohome::MOUNT_ERROR_NONE) {
}
@@ -38,40 +34,10 @@ void MockAsyncMethodCaller::SetUp(bool success, MountError return_code) {
ON_CALL(*this, AsyncRemove(_, _))
.WillByDefault(
WithArgs<1>(Invoke(this, &MockAsyncMethodCaller::DoCallback)));
- ON_CALL(*this, AsyncTpmAttestationCreateEnrollRequest(_))
- .WillByDefault(
- WithArgs<0>(Invoke(this,
- &MockAsyncMethodCaller::FakeCreateEnrollRequest)));
- ON_CALL(*this, AsyncTpmAttestationEnroll(_, _))
- .WillByDefault(
- WithArgs<1>(Invoke(this, &MockAsyncMethodCaller::DoCallback)));
- ON_CALL(*this, AsyncTpmAttestationCreateCertRequest(_, _))
- .WillByDefault(
- WithArgs<1>(Invoke(this,
- &MockAsyncMethodCaller::FakeCreateCertRequest)));
- ON_CALL(*this, AsyncTpmAttestationFinishCertRequest(_, _))
- .WillByDefault(
- WithArgs<1>(Invoke(this,
- &MockAsyncMethodCaller::FakeFinishCertRequest)));
}
void MockAsyncMethodCaller::DoCallback(Callback callback) {
callback.Run(success_, return_code_);
}
-void MockAsyncMethodCaller::FakeCreateEnrollRequest(
- const DataCallback& callback) {
- callback.Run(success_, kFakeAttestationEnrollRequest);
-}
-
-void MockAsyncMethodCaller::FakeCreateCertRequest(
- const DataCallback& callback) {
- callback.Run(success_, kFakeAttestationCertRequest);
-}
-
-void MockAsyncMethodCaller::FakeFinishCertRequest(
- const DataCallback& callback) {
- callback.Run(success_, kFakeAttestationCert);
-}
-
} // namespace cryptohome
diff --git a/chromeos/cryptohome/mock_async_method_caller.h b/chromeos/cryptohome/mock_async_method_caller.h
index 2e8d352..37bc0c44 100644
--- a/chromeos/cryptohome/mock_async_method_caller.h
+++ b/chromeos/cryptohome/mock_async_method_caller.h
@@ -16,10 +16,6 @@ namespace cryptohome {
class MockAsyncMethodCaller : public AsyncMethodCaller {
public:
- static const char kFakeAttestationEnrollRequest[];
- static const char kFakeAttestationCertRequest[];
- static const char kFakeAttestationCert[];
-
MockAsyncMethodCaller();
virtual ~MockAsyncMethodCaller();
@@ -54,10 +50,6 @@ class MockAsyncMethodCaller : public AsyncMethodCaller {
MountError return_code_;
void DoCallback(Callback callback);
- // Default fakes for attestation calls.
- void FakeCreateEnrollRequest(const DataCallback& callback);
- void FakeCreateCertRequest(const DataCallback& callback);
- void FakeFinishCertRequest(const DataCallback& callback);
DISALLOW_COPY_AND_ASSIGN(MockAsyncMethodCaller);
};