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

Unified Diff: components/gcm_driver/instance_id/instance_id_impl.cc

Issue 2427633005: Improve GCM enum switch type safety (Closed)
Patch Set: Rebase Created 4 years, 2 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_stats_recorder_impl.cc ('k') | google_apis/gcm/engine/account_mapping.cc » ('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_impl.cc
diff --git a/components/gcm_driver/instance_id/instance_id_impl.cc b/components/gcm_driver/instance_id/instance_id_impl.cc
index 8e7e726ff4548986ac59333c295dfbbfde628c40..b10451fe0f7e41ede15a901481317a30710b07a9 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.cc
+++ b/components/gcm_driver/instance_id/instance_id_impl.cc
@@ -29,19 +29,19 @@ InstanceID::Result GCMClientResultToInstanceIDResult(
return InstanceID::SUCCESS;
case gcm::GCMClient::INVALID_PARAMETER:
return InstanceID::INVALID_PARAMETER;
- case gcm::GCMClient::ASYNC_OPERATION_PENDING:
- return InstanceID::ASYNC_OPERATION_PENDING;
case gcm::GCMClient::GCM_DISABLED:
return InstanceID::DISABLED;
+ case gcm::GCMClient::ASYNC_OPERATION_PENDING:
+ return InstanceID::ASYNC_OPERATION_PENDING;
case gcm::GCMClient::NETWORK_ERROR:
return InstanceID::NETWORK_ERROR;
case gcm::GCMClient::SERVER_ERROR:
return InstanceID::SERVER_ERROR;
case gcm::GCMClient::UNKNOWN_ERROR:
return InstanceID::UNKNOWN_ERROR;
- default:
- NOTREACHED() << "Unexpected value of result cannot be converted: "
- << result;
+ case gcm::GCMClient::TTL_EXCEEDED:
+ NOTREACHED();
+ break;
}
return InstanceID::UNKNOWN_ERROR;
}
« no previous file with comments | « components/gcm_driver/gcm_stats_recorder_impl.cc ('k') | google_apis/gcm/engine/account_mapping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698