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

Unified Diff: chromeos/dbus/fake_cryptohome_client.h

Issue 34303002: chromeos: Wait for service to be available when getting system salt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 7 years, 2 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/dbus/cryptohome_client.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_cryptohome_client.h
diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h
index 4f045ec68d80338948ea60fa2042037fd813e5a2..705da3a6852a0cf7d8e35b81057a174856fc7030 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -23,6 +23,8 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
const AsyncCallStatusHandler& handler,
const AsyncCallStatusWithDataHandler& data_handler) OVERRIDE;
virtual void ResetAsyncCallStatusHandlers() OVERRIDE;
+ virtual void WaitForServiceToBeAvailable(
+ const WaitForServiceToBeAvailableCallback& callback) OVERRIDE;
virtual void IsMounted(const BoolDBusMethodCallback& callback) OVERRIDE;
virtual bool Unmount(bool* success) OVERRIDE;
virtual void AsyncCheckKey(const std::string& username,
@@ -151,6 +153,9 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
const std::string& payload,
const BoolDBusMethodCallback& callback) OVERRIDE;
+ // Changes the behavior of WaitForServiceToBeAvailable().
satorux1 2013/10/22 05:08:10 Please document that setting this true runs pendin
hashimoto 2013/10/22 05:11:53 Done.
+ void SetServiceIsAvailable(bool is_available);
+
// Sets the unmount result of Unmount() call.
void set_unmount_result(bool result) {
unmount_result_= result;
@@ -169,12 +174,16 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
void ReturnAsyncMethodResultInternal(const AsyncMethodCallback& callback,
bool returns_data);
+ bool service_is_available_;
int async_call_id_;
AsyncCallStatusHandler async_call_status_handler_;
AsyncCallStatusWithDataHandler async_call_status_data_handler_;
int tpm_is_ready_counter_;
bool unmount_result_;
+ std::vector<WaitForServiceToBeAvailableCallback>
+ pending_wait_for_service_to_be_available_callbacks_;
+
// A stub store for InstallAttributes, mapping an attribute name to the
// associated data blob. Used to implement InstallAttributesSet and -Get.
std::map<std::string, std::vector<uint8> > install_attrs_;
« no previous file with comments | « chromeos/dbus/cryptohome_client.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698