| Index: components/gcm_driver/instance_id/instance_id_impl.cc
|
| diff --git a/components/gcm_driver/instance_id/instance_id_impl.cc b/components/gcm_driver/instance_id/instance_id_impl.cc
|
| index 667008fdd2622eb341e7a1e01f8ad02ce97ebcf5..a6c6b97a1b76eb8bcdf6d35dbcf8f073c4f12a12 100644
|
| --- a/components/gcm_driver/instance_id/instance_id_impl.cc
|
| +++ b/components/gcm_driver/instance_id/instance_id_impl.cc
|
| @@ -49,15 +49,15 @@ InstanceID::Result GCMClientResultToInstanceIDResult(
|
| } // namespace
|
|
|
| // static
|
| -std::unique_ptr<InstanceID> InstanceID::Create(
|
| - const std::string& app_id,
|
| - gcm::InstanceIDHandler* handler) {
|
| - return base::WrapUnique(new InstanceIDImpl(app_id, handler));
|
| +std::unique_ptr<InstanceID> InstanceID::Create(const std::string& app_id,
|
| + gcm::GCMDriver* gcm_driver) {
|
| + return base::WrapUnique(new InstanceIDImpl(app_id, gcm_driver));
|
| }
|
|
|
| InstanceIDImpl::InstanceIDImpl(const std::string& app_id,
|
| - gcm::InstanceIDHandler* handler)
|
| - : InstanceID(app_id), handler_(handler), weak_ptr_factory_(this) {
|
| + gcm::GCMDriver* gcm_driver)
|
| + : InstanceID(app_id, gcm_driver), weak_ptr_factory_(this) {
|
| + handler_ = gcm_driver->GetInstanceIDHandlerInternal();
|
| DCHECK(handler_);
|
| handler_->GetInstanceIDData(
|
| app_id, base::Bind(&InstanceIDImpl::GetInstanceIDDataCompleted,
|
| @@ -135,9 +135,9 @@ void InstanceIDImpl::DoGetToken(
|
| weak_ptr_factory_.GetWeakPtr(), callback));
|
| }
|
|
|
| -void InstanceIDImpl::DeleteToken(const std::string& authorized_entity,
|
| - const std::string& scope,
|
| - const DeleteTokenCallback& callback) {
|
| +void InstanceIDImpl::DeleteTokenImpl(const std::string& authorized_entity,
|
| + const std::string& scope,
|
| + const DeleteTokenCallback& callback) {
|
| DCHECK(!authorized_entity.empty());
|
| DCHECK(!scope.empty());
|
|
|
| @@ -169,7 +169,7 @@ void InstanceIDImpl::DoDeleteToken(
|
| weak_ptr_factory_.GetWeakPtr(), callback));
|
| }
|
|
|
| -void InstanceIDImpl::DeleteID(const DeleteIDCallback& callback) {
|
| +void InstanceIDImpl::DeleteIDImpl(const DeleteIDCallback& callback) {
|
| if (!delayed_task_controller_.CanRunTaskWithoutDelay()) {
|
| delayed_task_controller_.AddTask(
|
| base::Bind(&InstanceIDImpl::DoDeleteID,
|
|
|