Commit b617a414 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Make key version in sync Javascript API mandatory

Follow up to crrev.com/c/1991432 where a new argument was introduced
but considered optional, to avoid breaking compatibility.

After a grace period, this patch makes the argument mandatory and issues
an error if a key version is not provided.

Change-Id: I494b7abbb336df2c5758e9d94db550cf8a100230
Bug: 1032485
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078542Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746762}
parent f0243401
...@@ -157,9 +157,8 @@ void SyncEncryptionKeysExtension::SetSyncEncryptionKeys(gin::Arguments* args) { ...@@ -157,9 +157,8 @@ void SyncEncryptionKeysExtension::SetSyncEncryptionKeys(gin::Arguments* args) {
int last_key_version = 0; int last_key_version = 0;
if (!args->GetNext(&last_key_version)) { if (!args->GetNext(&last_key_version)) {
DLOG(ERROR) << "No version provided"; DLOG(ERROR) << "No version provided";
// TODO(crbug.com/1032485): Be more strict here and issue an error if the args->ThrowError();
// version is not provided. return;
last_key_version = static_cast<int>(encryption_keys.size()) - 1;
} }
auto global_callback = auto global_callback =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment