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

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

Issue 1785613006: Make GCMDriver::GetInstanceIDHandler protected, to avoid misuse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address peter's nits Created 4 years, 9 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_driver.cc
diff --git a/components/gcm_driver/instance_id/instance_id_driver.cc b/components/gcm_driver/instance_id/instance_id_driver.cc
index 9ec01c46b39266d835cd4d58604207f07dc775c8..374be2244a51c26945eddc7c0807fe702c45b07d 100644
--- a/components/gcm_driver/instance_id/instance_id_driver.cc
+++ b/components/gcm_driver/instance_id/instance_id_driver.cc
@@ -6,6 +6,7 @@
#include "base/metrics/field_trial.h"
#include "build/build_config.h"
+#include "components/gcm_driver/gcm_driver.h"
#include "components/gcm_driver/instance_id/instance_id.h"
namespace instance_id {
@@ -41,7 +42,9 @@ InstanceID* InstanceIDDriver::GetInstanceID(const std::string& app_id) {
if (iter != instance_id_map_.end())
return iter->second.get();
- scoped_ptr<InstanceID> instance_id = InstanceID::Create(app_id, gcm_driver_);
+ gcm::InstanceIDHandler* handler = gcm_driver_->GetInstanceIDHandlerInternal();
+
+ scoped_ptr<InstanceID> instance_id = InstanceID::Create(app_id, handler);
InstanceID* instance_id_ptr = instance_id.get();
instance_id_map_.insert(std::make_pair(app_id, std::move(instance_id)));
return instance_id_ptr;
« no previous file with comments | « components/gcm_driver/instance_id/instance_id_driver.h ('k') | components/gcm_driver/instance_id/instance_id_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698