| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_INSTANCE_ID_INSTANCE_ID_IMPL_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_ | 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const std::string& scope, | 70 const std::string& scope, |
| 71 const std::string& token, | 71 const std::string& token, |
| 72 const ValidateTokenCallback& callback); | 72 const ValidateTokenCallback& callback); |
| 73 void DoDeleteToken(const std::string& authorized_entity, | 73 void DoDeleteToken(const std::string& authorized_entity, |
| 74 const std::string& scope, | 74 const std::string& scope, |
| 75 const DeleteTokenCallback& callback); | 75 const DeleteTokenCallback& callback); |
| 76 void DoDeleteID(const DeleteIDCallback& callback); | 76 void DoDeleteID(const DeleteIDCallback& callback); |
| 77 | 77 |
| 78 gcm::InstanceIDHandler* Handler(); | 78 gcm::InstanceIDHandler* Handler(); |
| 79 | 79 |
| 80 // Asynchronously runs task once delayed_task_controller_ is ready. |
| 81 void RunWhenReady(base::Closure task); |
| 82 |
| 80 gcm::GCMDelayedTaskController delayed_task_controller_; | 83 gcm::GCMDelayedTaskController delayed_task_controller_; |
| 81 | 84 |
| 82 // The generated Instance ID. | 85 // The generated Instance ID. |
| 83 std::string id_; | 86 std::string id_; |
| 84 | 87 |
| 85 // The time when the Instance ID has been generated. | 88 // The time when the Instance ID has been generated. |
| 86 base::Time creation_time_; | 89 base::Time creation_time_; |
| 87 | 90 |
| 88 base::WeakPtrFactory<InstanceIDImpl> weak_ptr_factory_; | 91 base::WeakPtrFactory<InstanceIDImpl> weak_ptr_factory_; |
| 89 | 92 |
| 90 DISALLOW_COPY_AND_ASSIGN(InstanceIDImpl); | 93 DISALLOW_COPY_AND_ASSIGN(InstanceIDImpl); |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 } // namespace instance_id | 96 } // namespace instance_id |
| 94 | 97 |
| 95 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_ | 98 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_ |
| OLD | NEW |