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 #ifndef GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 SUCCESS, // Registration completed successfully. | 44 SUCCESS, // Registration completed successfully. |
45 INVALID_PARAMETERS, // One of request paramteres was invalid. | 45 INVALID_PARAMETERS, // One of request paramteres was invalid. |
46 INVALID_SENDER, // One of the provided senders was invalid. | 46 INVALID_SENDER, // One of the provided senders was invalid. |
47 AUTHENTICATION_FAILED, // Authentication failed. | 47 AUTHENTICATION_FAILED, // Authentication failed. |
48 DEVICE_REGISTRATION_ERROR, // Chrome is not properly registered. | 48 DEVICE_REGISTRATION_ERROR, // Chrome is not properly registered. |
49 UNKNOWN_ERROR, // Unknown error. | 49 UNKNOWN_ERROR, // Unknown error. |
50 URL_FETCHING_FAILED, // URL fetching failed. | 50 URL_FETCHING_FAILED, // URL fetching failed. |
51 HTTP_NOT_OK, // HTTP status was not OK. | 51 HTTP_NOT_OK, // HTTP status was not OK. |
52 NO_RESPONSE_BODY, // No response body. | 52 NO_RESPONSE_BODY, // No response body. |
53 REACHED_MAX_RETRIES, // Reached maximum number of retries. | 53 REACHED_MAX_RETRIES, // Reached maximum number of retries. |
| 54 RESPONSE_PARSING_FAILED, // Registration response parsing failed. |
| 55 INTERNAL_SERVER_ERROR, // Internal server error during request. |
| 56 QUOTA_EXCEEDED, // Registration quota exceeded. |
| 57 TOO_MANY_REGISTRATIONS, // Max registrations per device exceeded. |
54 // NOTE: always keep this entry at the end. Add new status types only | 58 // NOTE: always keep this entry at the end. Add new status types only |
55 // immediately above this line. Make sure to update the corresponding | 59 // immediately above this line. Make sure to update the corresponding |
56 // histogram enum accordingly. | 60 // histogram enum accordingly. |
57 STATUS_COUNT | 61 STATUS_COUNT |
58 }; | 62 }; |
59 | 63 |
60 // Callback completing the registration request. | 64 // Callback completing the registration request. |
61 typedef base::Callback<void(Status status, | 65 typedef base::Callback<void(Status status, |
62 const std::string& registration_id)> | 66 const std::string& registration_id)> |
63 RegistrationCallback; | 67 RegistrationCallback; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 std::string source_to_record_; | 153 std::string source_to_record_; |
150 | 154 |
151 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; | 155 base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; |
152 | 156 |
153 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); | 157 DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); |
154 }; | 158 }; |
155 | 159 |
156 } // namespace gcm | 160 } // namespace gcm |
157 | 161 |
158 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ | 162 #endif // GOOGLE_APIS_GCM_ENGINE_REGISTRATION_REQUEST_H_ |
OLD | NEW |