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

Unified Diff: chromeos/dbus/fake_easy_unlock_client.cc

Issue 569813002: Minor cleanup in EasyUnlockClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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/dbus/fake_easy_unlock_client.h ('k') | chromeos/dbus/fake_easy_unlock_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_easy_unlock_client.cc
diff --git a/chromeos/dbus/fake_easy_unlock_client.cc b/chromeos/dbus/fake_easy_unlock_client.cc
index fe0aee1984a8bae46501119291406cf86328ed76..77d8cb007bbc97c22bcf1e3155dd176edf6f8d80 100644
--- a/chromeos/dbus/fake_easy_unlock_client.cc
+++ b/chromeos/dbus/fake_easy_unlock_client.cc
@@ -95,13 +95,7 @@ void FakeEasyUnlockClient::PerformECDHKeyAgreement(
void FakeEasyUnlockClient::CreateSecureMessage(
const std::string& payload,
- const std::string& key,
- const std::string& associated_data,
- const std::string& public_metadata,
- const std::string& verification_key_id,
- const std::string& decryption_key_id,
- const std::string& encryption_type,
- const std::string& signature_type,
+ const CreateSecureMessageOptions& options,
const DataCallback& callback) {
callback.Run(base::StringPrintf(
"{\"securemessage\": {"
@@ -115,21 +109,18 @@ void FakeEasyUnlockClient::CreateSecureMessage(
"\"signature_type\": \"%s\""
"}}",
payload.c_str(),
- key.c_str(),
- associated_data.c_str(),
- public_metadata.c_str(),
- verification_key_id.c_str(),
- decryption_key_id.c_str(),
- encryption_type.c_str(),
- signature_type.c_str()));
+ options.key.c_str(),
+ options.associated_data.c_str(),
+ options.public_metadata.c_str(),
+ options.verification_key_id.c_str(),
+ options.decryption_key_id.c_str(),
+ options.encryption_type.c_str(),
+ options.signature_type.c_str()));
}
void FakeEasyUnlockClient::UnwrapSecureMessage(
const std::string& message,
- const std::string& key,
- const std::string& associated_data,
- const std::string& encryption_type,
- const std::string& signature_type,
+ const UnwrapSecureMessageOptions& options,
const DataCallback& callback) {
// TODO(tbarzic): Verify that |message| is in the format returned by
// |CreateSecureMessage| and extract payload, metadata and
@@ -143,10 +134,10 @@ void FakeEasyUnlockClient::UnwrapSecureMessage(
"\"signature_type\": \"%s\""
"}}",
message.c_str(),
- key.c_str(),
- associated_data.c_str(),
- encryption_type.c_str(),
- signature_type.c_str()));
+ options.key.c_str(),
+ options.associated_data.c_str(),
+ options.encryption_type.c_str(),
+ options.signature_type.c_str()));
}
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/fake_easy_unlock_client.h ('k') | chromeos/dbus/fake_easy_unlock_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698