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

Unified Diff: content/common/push_messaging_param_traits.cc

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Address peter's review comments Created 3 years, 9 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
Index: content/common/push_messaging_param_traits.cc
diff --git a/content/common/push_messaging_param_traits.cc b/content/common/push_messaging_param_traits.cc
index d336d0c4ac6c0c530914bda70c7ef78bbae22a49..7090a48ece7a63c0899ef022f97ef71d5c82aeca 100644
--- a/content/common/push_messaging_param_traits.cc
+++ b/content/common/push_messaging_param_traits.cc
@@ -95,6 +95,12 @@ static_assert(
"PushRegistrationStatus enums must match, MANIFEST_EMPTY_OR_MISSING");
static_assert(
+ content::PushRegistrationStatus::PUSH_REGISTRATION_STATUS_STORAGE_CORRUPT ==
+ static_cast<content::PushRegistrationStatus>(
+ content::mojom::PushRegistrationStatus::STORAGE_CORRUPT),
+ "PushRegistrationStatus enums must match, STORAGE_CORRUPT");
nasko 2017/03/31 21:48:43 Please keep the ordering of these the same as the
johnme 2017/04/03 13:54:28 Oops, done.
+
+static_assert(
content::PushRegistrationStatus::
PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH ==
static_cast<content::PushRegistrationStatus>(
@@ -185,10 +191,10 @@ static_assert(
static_assert(
content::PushGetRegistrationStatus::
- PUSH_GETREGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE ==
+ PUSH_GETREGISTRATION_STATUS_STORAGE_CORRUPT ==
static_cast<content::PushGetRegistrationStatus>(
- content::mojom::PushGetRegistrationStatus::PUBLIC_KEY_UNAVAILABLE),
- "PushGetRegistrationStatus enums must match, PUBLIC_KEY_UNAVAILABLE");
nasko 2017/03/31 21:48:43 Why was this enum value removed? It is still prese
johnme 2017/04/03 13:54:27 No, the patch comments out PUSH_GETREGISTRATION_ST
nasko 2017/04/03 14:10:37 I meant that specific one, however the comment at
+ content::mojom::PushGetRegistrationStatus::STORAGE_CORRUPT),
+ "PushGetRegistrationStatus enums must match, STORAGE_CORRUPT");
static_assert(
content::PushGetRegistrationStatus::PUSH_GETREGISTRATION_STATUS_LAST ==

Powered by Google App Engine
This is Rietveld 408576698