Chromium Code Reviews| Index: components/gcm_driver/instance_id/instance_id.h |
| diff --git a/components/gcm_driver/instance_id/instance_id.h b/components/gcm_driver/instance_id/instance_id.h |
| index 9adf0e5def2604150b45e9a3f99fdbe5614cc9ee..62286314359ddd5b97077ea6d643d2d1e55917f1 100644 |
| --- a/components/gcm_driver/instance_id/instance_id.h |
| +++ b/components/gcm_driver/instance_id/instance_id.h |
| @@ -15,6 +15,7 @@ |
| namespace gcm { |
| class GCMDriver; |
| +class InstanceIDHandler; |
| } // namespace gcm |
| namespace instance_id { |
| @@ -57,7 +58,7 @@ class InstanceID { |
| // Creator. |
| // |app_id|: identifies the application that uses the Instance ID. |
| // |gcm_driver|: driver to access the GCM functionalities needed to support |
| - // Instance ID. |
| + // Instance ID. Its InstanceIDHandler must outlive this class. |
| static scoped_ptr<InstanceID> Create(const std::string& app_id, |
| gcm::GCMDriver* gcm_driver); |
| @@ -106,10 +107,12 @@ class InstanceID { |
| std::string app_id() const { return app_id_; } |
| protected: |
| - explicit InstanceID(const std::string& app_id); |
| + InstanceID(const std::string& app_id, gcm::GCMDriver* gcm_driver); |
|
Peter Beverloo
2016/03/10 21:11:23
As discussed, let's limit knowledge and have this
johnme
2016/03/11 15:56:04
Done.
|
| void NotifyTokenRefresh(bool update_id); |
| + gcm::InstanceIDHandler* handler_; // Not owned. |
|
Peter Beverloo
2016/03/10 21:11:23
Per the styleguide:
""Limit the use of protected
johnme
2016/03/11 15:56:04
Done.
|
| + |
| private: |
| std::string app_id_; |
| TokenRefreshCallback token_refresh_callback_; |