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

Unified Diff: components/gcm_driver/instance_id/instance_id.h

Issue 2675293003: Push API: Don't wait for network when unsubscribing (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
Index: components/gcm_driver/instance_id/instance_id.h
diff --git a/components/gcm_driver/instance_id/instance_id.h b/components/gcm_driver/instance_id/instance_id.h
index 52c1adb07b26dd50ecb91559e229024b5912bc5d..bc3d82e7dbfb2dfa864377755dc6dd1f944c65d0 100644
--- a/components/gcm_driver/instance_id/instance_id.h
+++ b/components/gcm_driver/instance_id/instance_id.h
@@ -27,21 +27,27 @@ extern const char kGCMScope[];
// Instance ID is managed by the InstanceIDDriver.
class InstanceID {
public:
+ // Used in UMA. Can add enum values, but never renumber or delete and reuse.
enum Result {
// Successful operation.
- SUCCESS,
+ SUCCESS = 0,
// Invalid parameter.
- INVALID_PARAMETER,
+ INVALID_PARAMETER = 1,
// Instance ID is disabled.
- DISABLED,
+ DISABLED = 2,
// Previous asynchronous operation is still pending to finish.
- ASYNC_OPERATION_PENDING,
+ ASYNC_OPERATION_PENDING = 3,
// Network socket error.
- NETWORK_ERROR,
+ NETWORK_ERROR = 4,
// Problem at the server.
- SERVER_ERROR,
+ SERVER_ERROR = 5,
+ // 6 is omitted, in case we ever merge this enum with GCMClient::Result.
Peter Beverloo 2017/02/07 18:11:08 :)
johnme 2017/02/08 14:14:36 Acknowledged.
// Other errors.
- UNKNOWN_ERROR
+ UNKNOWN_ERROR = 7,
+
+ // Used for UMA. Keep LAST_RESULT up to date and sync with histograms.xml.
+
Peter Beverloo 2017/02/07 18:11:08 micro nit^2: no newline
johnme 2017/02/08 14:14:36 Done.
+ LAST_RESULT = UNKNOWN_ERROR
};
// Asynchronous callbacks. Must not synchronously delete |this| (using

Powered by Google App Engine
This is Rietveld 408576698