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

Unified Diff: content/common/push_messaging.mojom

Issue 2715903002: Re-design Unsubscribe and getPermissionStatus mojo interfaces. (Closed)
Patch Set: Created 3 years, 10 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/child/push_messaging/push_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/push_messaging.mojom
diff --git a/content/common/push_messaging.mojom b/content/common/push_messaging.mojom
index ae843a2834682583c91d2a39be83a71068be1612..f4d83c27f0dc1b0f7970b24e4392f9dd643ffac0 100644
--- a/content/common/push_messaging.mojom
+++ b/content/common/push_messaging.mojom
@@ -134,12 +134,12 @@ interface PushMessaging {
array<uint8>? p256dh,
array<uint8>? auth);
- // It returns |did_unsubscribe| if is_success is true, and returns
- // |error_type| and |error_message| if is_success is false.
+ // We use the value of |error_type| as a flag. If |error_type| == Unknown, it
+ // means no error and returns |did_unsubscribe|. Else, it means there is an
+ // error and returns |error_type| and |error_message|.
Peter Beverloo 2017/02/24 15:55:35 What about renaming PushErrorType::UNKNOWN to Push
Unsubscribe(int64 service_worker_registration_id)
- => (bool is_success,
+ => (PushErrorType error_type,
bool did_unsubscribe,
- PushErrorType error_type,
string? error_message);
GetSubscription(int64 service_worker_registration_id)
@@ -149,13 +149,11 @@ interface PushMessaging {
array<uint8>? p256dh,
array<uint8>? auth);
- // It returns |status| if |is_success| is true and returns |error| if
- // |is_success| is false.
+ // We use the value of |error_type| as a flag. If |error_type| == Unknown, it
+ // means no error and returns |status|. Else, it means there is an error and
+ // returns |error_type|.
GetPermissionStatus(int64 service_worker_registration_id,
bool user_visible)
- => (bool is_success,
- // |status| is meaningful when (is_success == true)
- PushPermissionStatus status,
- // |error| is meaningful when (is_success == false)
- PushErrorType error);
+ => (PushErrorType error_type,
+ PushPermissionStatus status);
};
« no previous file with comments | « content/child/push_messaging/push_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698