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

Unified Diff: chromeos/dbus/fake_cryptohome_client.h

Issue 39443002: settings: Add async system salt retrieval logic in DeviceOAuth2TokenServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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/cryptohome/system_salt_getter.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 3c960e8f4ccb1f9dc46150dd8a0fe9878748fb27..450678bd003feb4d535c2d7fe6b91ae6abd95e00 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -162,6 +162,13 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
unmount_result_= result;
}
+ // Sets the system salt which will be returned from GetSystemSalt(). By
+ // default, GetSystemSalt() returns the value generated by
+ // GetStubSystemSalt().
+ void set_system_salt(const std::vector<uint8>& system_salt) {
+ system_salt_ = system_salt;
+ }
+
// Returns the stub system salt as raw bytes. (not as a string encoded in the
// format used by SystemSaltGetter::ConvertRawSaltToHexString()).
static std::vector<uint8> GetStubSystemSalt();
@@ -181,6 +188,7 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient {
AsyncCallStatusWithDataHandler async_call_status_data_handler_;
int tpm_is_ready_counter_;
bool unmount_result_;
+ std::vector<uint8> system_salt_;
std::vector<WaitForServiceToBeAvailableCallback>
pending_wait_for_service_to_be_available_callbacks_;
« no previous file with comments | « chromeos/cryptohome/system_salt_getter.cc ('k') | chromeos/dbus/fake_cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698