| 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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 
| 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 254 | 254 | 
| 255   // Registers with the server to access the provided service. | 255   // Registers with the server to access the provided service. | 
| 256   // Delegate::OnRegisterFinished will be called asynchronously upon completion. | 256   // Delegate::OnRegisterFinished will be called asynchronously upon completion. | 
| 257   // |registration_info|: the specific information required for the | 257   // |registration_info|: the specific information required for the | 
| 258   //                      registration. For GCM, it will contain app id and | 258   //                      registration. For GCM, it will contain app id and | 
| 259   //                      sender IDs. For InstanceID, it will contain app_id, | 259   //                      sender IDs. For InstanceID, it will contain app_id, | 
| 260   //                      authorized entity and scope. | 260   //                      authorized entity and scope. | 
| 261   virtual void Register( | 261   virtual void Register( | 
| 262       const linked_ptr<RegistrationInfo>& registration_info) = 0; | 262       const linked_ptr<RegistrationInfo>& registration_info) = 0; | 
| 263 | 263 | 
|  | 264   // Checks that the provided |registration_id| (aka token for Instance ID | 
|  | 265   // registrations) matches the stored registration info. Also checks sender IDs | 
|  | 266   // match for GCM registrations. | 
|  | 267   virtual bool ValidateRegistration( | 
|  | 268       const linked_ptr<RegistrationInfo>& registration_info, | 
|  | 269       const std::string& registration_id) = 0; | 
|  | 270 | 
| 264   // Unregisters from the server to stop accessing the provided service. | 271   // Unregisters from the server to stop accessing the provided service. | 
| 265   // Delegate::OnUnregisterFinished will be called asynchronously upon | 272   // Delegate::OnUnregisterFinished will be called asynchronously upon | 
| 266   // completion. | 273   // completion. | 
| 267   // |registration_info|: the specific information required for the | 274   // |registration_info|: the specific information required for the | 
| 268   //                      registration. For GCM, it will contain app id (sender | 275   //                      registration. For GCM, it will contain app id (sender | 
| 269   //                      IDs can be ingored). For InstanceID, it will contain | 276   //                      IDs can be ingored). For InstanceID, it will contain | 
| 270   //                      app id, authorized entity and scope. | 277   //                      app id, authorized entity and scope. | 
| 271   virtual void Unregister( | 278   virtual void Unregister( | 
| 272       const linked_ptr<RegistrationInfo>& registration_info) = 0; | 279       const linked_ptr<RegistrationInfo>& registration_info) = 0; | 
| 273 | 280 | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 332   // to be set, and allows that component to later revoke the setting. It should | 339   // to be set, and allows that component to later revoke the setting. It should | 
| 333   // be unique. | 340   // be unique. | 
| 334   virtual void AddHeartbeatInterval(const std::string& scope, | 341   virtual void AddHeartbeatInterval(const std::string& scope, | 
| 335                                     int interval_ms) = 0; | 342                                     int interval_ms) = 0; | 
| 336   virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; | 343   virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; | 
| 337 }; | 344 }; | 
| 338 | 345 | 
| 339 }  // namespace gcm | 346 }  // namespace gcm | 
| 340 | 347 | 
| 341 #endif  // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 348 #endif  // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 
| OLD | NEW | 
|---|