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

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

Issue 2675293003: Push API: Don't wait for network when unsubscribing (Closed)
Patch Set: Address peter's review comments 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 | « components/gcm_driver/gcm_client_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ccf16b7bda650def96ca177b762e5a54c178311b 100644
--- a/components/gcm_driver/instance_id/instance_id.h
+++ b/components/gcm_driver/instance_id/instance_id.h
@@ -27,21 +27,26 @@ 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.
// Other errors.
- UNKNOWN_ERROR
+ UNKNOWN_ERROR = 7,
+
+ // Used for UMA. Keep LAST_RESULT up to date and sync with histograms.xml.
+ LAST_RESULT = UNKNOWN_ERROR
};
// Asynchronous callbacks. Must not synchronously delete |this| (using
« no previous file with comments | « components/gcm_driver/gcm_client_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698