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

Unified Diff: chromeos/cryptohome/mock_homedir_methods.cc

Issue 517653002: Make CryptohomeAuthenticator's Login*() methods work with pre-hashed keys (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_3_367847_add_sha256_key_type
Patch Set: Addressed comments. Created 6 years, 3 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
« no previous file with comments | « chromeos/cryptohome/mock_homedir_methods.h ('k') | chromeos/login/auth/cryptohome_authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/cryptohome/mock_homedir_methods.cc
diff --git a/chromeos/cryptohome/mock_homedir_methods.cc b/chromeos/cryptohome/mock_homedir_methods.cc
index 0cb4a387bc30838bce3cc57cee66a047767ba398..db6edb5f81134bb0b0f13583581a2f7346190ad3 100644
--- a/chromeos/cryptohome/mock_homedir_methods.cc
+++ b/chromeos/cryptohome/mock_homedir_methods.cc
@@ -4,6 +4,8 @@
#include "chromeos/cryptohome/mock_homedir_methods.h"
+#include "base/memory/scoped_vector.h"
+#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/cryptohome/mock_async_method_caller.h"
using ::testing::Invoke;
@@ -20,6 +22,8 @@ MockHomedirMethods::~MockHomedirMethods() {}
void MockHomedirMethods::SetUp(bool success, MountError return_code) {
success_ = success;
return_code_ = return_code;
+ ON_CALL(*this, GetKeyDataEx(_, _, _)).WillByDefault(
+ WithArgs<2>(Invoke(this, &MockHomedirMethods::DoGetDataCallback)));
ON_CALL(*this, CheckKeyEx(_, _, _)).WillByDefault(
WithArgs<2>(Invoke(this, &MockHomedirMethods::DoCallback)));
ON_CALL(*this, MountEx(_, _, _, _)).WillByDefault(
@@ -36,6 +40,10 @@ void MockHomedirMethods::DoCallback(const Callback& callback) {
callback.Run(success_, return_code_);
}
+void MockHomedirMethods::DoGetDataCallback(const GetKeyDataCallback& callback) {
+ callback.Run(success_, return_code_, ScopedVector<RetrievedKeyData>());
+}
+
void MockHomedirMethods::DoMountCallback(const MountCallback& callback) {
callback.Run(
success_, return_code_, MockAsyncMethodCaller::kFakeSanitizedUsername);
« no previous file with comments | « chromeos/cryptohome/mock_homedir_methods.h ('k') | chromeos/login/auth/cryptohome_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698