| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "google_apis/gcm/engine/unregistration_request.h" | 5 #include "google_apis/gcm/engine/unregistration_request.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Request constants. | 29 // Request constants. |
| 30 const char kAppIdKey[] = "app"; | 30 const char kAppIdKey[] = "app"; |
| 31 const char kDeleteKey[] = "delete"; | 31 const char kDeleteKey[] = "delete"; |
| 32 const char kDeleteValue[] = "true"; | 32 const char kDeleteValue[] = "true"; |
| 33 const char kDeviceIdKey[] = "device"; | 33 const char kDeviceIdKey[] = "device"; |
| 34 const char kLoginHeader[] = "AidLogin"; | 34 const char kLoginHeader[] = "AidLogin"; |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 UnregistrationRequest::RequestInfo::RequestInfo( | 38 UnregistrationRequest::RequestInfo::RequestInfo(uint64_t android_id, |
| 39 uint64 android_id, | 39 uint64_t security_token, |
| 40 uint64 security_token, | 40 const std::string& app_id) |
| 41 const std::string& app_id) | 41 : android_id(android_id), security_token(security_token), app_id(app_id) { |
| 42 : android_id(android_id), | |
| 43 security_token(security_token), | |
| 44 app_id(app_id) { | |
| 45 DCHECK(android_id != 0UL); | 42 DCHECK(android_id != 0UL); |
| 46 DCHECK(security_token != 0UL); | 43 DCHECK(security_token != 0UL); |
| 47 } | 44 } |
| 48 | 45 |
| 49 UnregistrationRequest::RequestInfo::~RequestInfo() {} | 46 UnregistrationRequest::RequestInfo::~RequestInfo() {} |
| 50 | 47 |
| 51 UnregistrationRequest::CustomRequestHandler::CustomRequestHandler() {} | 48 UnregistrationRequest::CustomRequestHandler::CustomRequestHandler() {} |
| 52 | 49 |
| 53 UnregistrationRequest::CustomRequestHandler::~CustomRequestHandler() {} | 50 UnregistrationRequest::CustomRequestHandler::~CustomRequestHandler() {} |
| 54 | 51 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta()); | 202 custom_request_handler_->ReportUMAs(status, 0, base::TimeDelta()); |
| 206 } | 203 } |
| 207 | 204 |
| 208 // status == SUCCESS || INVALID_PARAMETERS || UNKNOWN_ERROR || | 205 // status == SUCCESS || INVALID_PARAMETERS || UNKNOWN_ERROR || |
| 209 // REACHED_MAX_RETRIES | 206 // REACHED_MAX_RETRIES |
| 210 | 207 |
| 211 callback_.Run(status); | 208 callback_.Run(status); |
| 212 } | 209 } |
| 213 | 210 |
| 214 } // namespace gcm | 211 } // namespace gcm |
| OLD | NEW |