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

Unified Diff: chrome/browser/extensions/api/instance_id/instance_id_api.cc

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new files Created 5 years, 7 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: chrome/browser/extensions/api/instance_id/instance_id_api.cc
diff --git a/chrome/browser/extensions/api/instance_id/instance_id_api.cc b/chrome/browser/extensions/api/instance_id/instance_id_api.cc
index c57b4ed6bda2860edebe6f18b89e2e43976bfaa3..6707f4cfe723f3910774ffd30cfbffdba11cc501 100644
--- a/chrome/browser/extensions/api/instance_id/instance_id_api.cc
+++ b/chrome/browser/extensions/api/instance_id/instance_id_api.cc
@@ -19,6 +19,7 @@ namespace {
// Error messages.
const char kInvalidParameter[] = "Function was called with invalid parameters.";
const char kDisabled[] = "Instance ID is currently disabled.";
+const char kAsyncOperationPending[] = "Asynchronous operation is pending.";
const char kNetworkError[] = "Network error occurred.";
const char kServerError[] = "Server error occurred.";
const char kUnknownError[] = "Unknown error occurred.";
@@ -29,6 +30,8 @@ const char* InstanceIDResultToError(instance_id::InstanceID::Result result) {
return kInvalidParameter;
case instance_id::InstanceID::DISABLED:
return kDisabled;
+ case instance_id::InstanceID::ASYNC_OPERATION_PENDING:
+ return kAsyncOperationPending;
case instance_id::InstanceID::NETWORK_ERROR:
return kNetworkError;
case instance_id::InstanceID::SERVER_ERROR:

Powered by Google App Engine
This is Rietveld 408576698