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

Unified Diff: content/common/push_messaging_param_traits.cc

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Fix include 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
« no previous file with comments | « content/common/push_messaging.mojom ('k') | content/public/browser/push_messaging_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bc4f3d41174162b71ee1d089844374279bf2f007 100644
--- a/content/common/push_messaging_param_traits.cc
+++ b/content/common/push_messaging_param_traits.cc
@@ -101,6 +101,12 @@ static_assert(
content::mojom::PushRegistrationStatus::SENDER_ID_MISMATCH),
"PushRegistrationStatus enums must match, SENDER_ID_MISMATCH");
+static_assert(
+ content::PushRegistrationStatus::PUSH_REGISTRATION_STATUS_STORAGE_CORRUPT ==
+ static_cast<content::PushRegistrationStatus>(
+ content::mojom::PushRegistrationStatus::STORAGE_CORRUPT),
+ "PushRegistrationStatus enums must match, STORAGE_CORRUPT");
+
static_assert(content::PushRegistrationStatus::PUSH_REGISTRATION_STATUS_LAST ==
static_cast<content::PushRegistrationStatus>(
content::mojom::PushRegistrationStatus::LAST),
@@ -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");
+ content::mojom::PushGetRegistrationStatus::STORAGE_CORRUPT),
+ "PushGetRegistrationStatus enums must match, STORAGE_CORRUPT");
static_assert(
content::PushGetRegistrationStatus::PUSH_GETREGISTRATION_STATUS_LAST ==
« no previous file with comments | « content/common/push_messaging.mojom ('k') | content/public/browser/push_messaging_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698