When the GCM server handles registration/unregistration requests, it can
return several specific error names that Chrome's GCM Engine was lumping
together as UNKNOWN_ERROR. This patch splits them out into distinct enum
values, so we'll be able to compare their occurrence rates using UMA and
get more precise bug reports from users reading chrome://gcm-internals.
UNKNOWN_ERROR should no longer occur... until GCM next add new error
types anyway.
The patch also removes some code duplication between
GCMUnregistrationRequestHandler and InstanceIDDeleteTokenRequestHandler,
but it stops short of merging RegistrationRequest and
UnregistrationRequest since this patch may need to be merged to m55.
There should be minimal functional changes, except that we will no
longer auto-retry QUOTA_EXCEEDED and TOO_MANY_REGISTRATIONS registration
errors, which were unlikely to succeed when retried anyway.
BUG=623062
Review-Url: https://codereview.chromium.org/2434243002
Cr-Commit-Position: refs/heads/master@{#429254}