Chromium Code Reviews| 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); |
| }; |