Index: google_apis/gcm/engine/gcm_unregistration_request_handler.cc |
diff --git a/google_apis/gcm/engine/gcm_unregistration_request_handler.cc b/google_apis/gcm/engine/gcm_unregistration_request_handler.cc |
index 2e1fde66bc67c5577de1d4794bb58ba86498f18d..4e7907e7392653296d42011b51fbe9fb76ea8b98 100644 |
--- a/google_apis/gcm/engine/gcm_unregistration_request_handler.cc |
+++ b/google_apis/gcm/engine/gcm_unregistration_request_handler.cc |
@@ -21,8 +21,6 @@ const char kUnregistrationCallerValue[] = "false"; |
// Response constants. |
const char kDeletedPrefix[] = "deleted="; |
-const char kErrorPrefix[] = "Error="; |
-const char kInvalidParameters[] = "INVALID_PARAMETERS"; |
} // namespace |
@@ -38,13 +36,7 @@ void GCMUnregistrationRequestHandler::BuildRequestBody(std::string* body){ |
} |
UnregistrationRequest::Status GCMUnregistrationRequestHandler::ParseResponse( |
- const net::URLFetcher* source) { |
- std::string response; |
- if (!source->GetResponseAsString(&response)) { |
- DVLOG(1) << "Failed to get response body."; |
- return UnregistrationRequest::NO_RESPONSE_BODY; |
- } |
- |
+ std::string response) { |
DVLOG(1) << "Parsing unregistration response."; |
if (response.find(kDeletedPrefix) != std::string::npos) { |
std::string deleted_app_id = response.substr( |
@@ -54,14 +46,6 @@ UnregistrationRequest::Status GCMUnregistrationRequestHandler::ParseResponse( |
UnregistrationRequest::INCORRECT_APP_ID; |
} |
- 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; |
- } |
- |
DVLOG(1) << "Not able to parse a meaningful output from response body." |
<< response; |
return UnregistrationRequest::RESPONSE_PARSING_FAILED; |