Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: components/gcm_driver/instance_id/instance_id_impl.cc

Issue 1923953002: Integrate InstanceID with GCM crypto provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid5default
Patch Set: Fix Android compile Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698