summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_cryptohome_client.cc
diff options
context:
space:
mode:
authorharuki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 05:46:57 +0000
committerharuki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 05:46:57 +0000
commit55d32d31c679c3b235e26ce2a2010114aeacc7cc (patch)
treec1a1e3079ebd4502427802b1040b7eac58ef6cd7 /chromeos/dbus/fake_cryptohome_client.cc
parent730887575428caca3863a29f27d431e5f83daf47 (diff)
downloadchromium_src-55d32d31c679c3b235e26ce2a2010114aeacc7cc.zip
chromium_src-55d32d31c679c3b235e26ce2a2010114aeacc7cc.tar.gz
chromium_src-55d32d31c679c3b235e26ce2a2010114aeacc7cc.tar.bz2
Retrial: Use MockDBusThreadManagerWithoutGMock for LoginUtilsTest
Removed the expectations which implement the fake behaviors. Provided Fake* implmentations have the same bahavior. BUG=239333 TEST=trybots R=satorux@chromium.org Review URL: https://codereview.chromium.org/14651021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_cryptohome_client.cc')
-rw-r--r--chromeos/dbus/fake_cryptohome_client.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/chromeos/dbus/fake_cryptohome_client.cc b/chromeos/dbus/fake_cryptohome_client.cc
index 59262b0..16f9a1c 100644
--- a/chromeos/dbus/fake_cryptohome_client.cc
+++ b/chromeos/dbus/fake_cryptohome_client.cc
@@ -86,15 +86,15 @@ void FakeCryptohomeClient::AsyncMount(const std::string& username,
const std::string& key, int flags,
const AsyncMethodCallback& callback) {
DCHECK(!callback.is_null());
- DCHECK(!handler_.is_null());
MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, 1 /* async_id */));
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(handler_,
- 1, // async_id
- true, // return_status
- cryptohome::MOUNT_ERROR_NONE));
+ if (!handler_.is_null())
+ MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(handler_,
+ 1, // async_id
+ true, // return_status
+ cryptohome::MOUNT_ERROR_NONE));
}
void FakeCryptohomeClient::AsyncMountGuest(
@@ -228,19 +228,19 @@ void FakeCryptohomeClient::GetSanitizedUsername(
const std::string& username,
const StringDBusMethodCallback& callback) {
DCHECK(!callback.is_null());
- DCHECK(!handler_.is_null());
MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(callback,
chromeos::DBUS_METHOD_CALL_SUCCESS,
username));
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(data_handler_,
- 1, // async_id
- true, // return_status
- username));
+ if (!data_handler_.is_null())
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(data_handler_,
+ 1, // async_id
+ true, // return_status
+ username));
}
void FakeCryptohomeClient::TpmAttestationSignEnterpriseChallenge(