| Index: google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
| diff --git a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
| index 7e5d232cee00c3602962e0141ad5cac7781cd383..b3ef7a8cbeabc58482c4d352b8ebf08e6889da50 100644
|
| --- a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
| +++ b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
| @@ -24,8 +24,6 @@ const char kExtraScopeKey[] = "X-scope";
|
|
|
| // Response constants.
|
| const char kTokenPrefix[] = "token=";
|
| -const char kErrorPrefix[] = "Error=";
|
| -const char kInvalidParameters[] = "INVALID_PARAMETERS";
|
|
|
| } // namespace
|
|
|
| @@ -55,21 +53,7 @@ void InstanceIDDeleteTokenRequestHandler::BuildRequestBody(std::string* body){
|
|
|
| UnregistrationRequest::Status
|
| InstanceIDDeleteTokenRequestHandler::ParseResponse(
|
| - const net::URLFetcher* source) {
|
| - std::string response;
|
| - if (!source->GetResponseAsString(&response)) {
|
| - DVLOG(1) << "Failed to get response body.";
|
| - return UnregistrationRequest::NO_RESPONSE_BODY;
|
| - }
|
| -
|
| - if (response.find(kErrorPrefix) != std::string::npos) {
|
| - std::string error = response.substr(
|
| - response.find(kErrorPrefix) + arraysize(kErrorPrefix) - 1);
|
| - return error == kInvalidParameters ?
|
| - UnregistrationRequest::INVALID_PARAMETERS :
|
| - UnregistrationRequest::UNKNOWN_ERROR;
|
| - }
|
| -
|
| + const std::string& response) {
|
| if (response.find(kTokenPrefix) == std::string::npos)
|
| return UnregistrationRequest::RESPONSE_PARSING_FAILED;
|
|
|
|
|