This source file includes following definitions.
- RunCallbackWithTrue
#include "chromeos/dbus/mock_cryptohome_client.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Invoke;
namespace chromeos {
namespace {
void RunCallbackWithTrue(const BoolDBusMethodCallback& callback) {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, true));
}
}
MockCryptohomeClient::MockCryptohomeClient() {
EXPECT_CALL(*this, Init(_)).Times(AnyNumber());
ON_CALL(*this, IsMounted(_))
.WillByDefault(Invoke(&RunCallbackWithTrue));
ON_CALL(*this, InstallAttributesIsReady(_))
.WillByDefault(Invoke(&RunCallbackWithTrue));
}
MockCryptohomeClient::~MockCryptohomeClient() {}
}