| 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 3cd96b70091ec8e1a8da4c828ab11d99754eca16..1d33269c03629bcd0ca951eb53e3fe31368c7e9d 100644
|
| --- a/components/gcm_driver/instance_id/instance_id_driver.cc
|
| +++ b/components/gcm_driver/instance_id/instance_id_driver.cc
|
| @@ -33,12 +33,22 @@ InstanceIDDriver::~InstanceIDDriver() {
|
| }
|
|
|
| InstanceID* InstanceIDDriver::GetInstanceID(const std::string& app_id) {
|
| + return GetInstanceID(app_id, true /* use_subtype */);
|
| +}
|
| +
|
| +InstanceID* InstanceIDDriver::GetInstanceIDForExtensions(
|
| + const std::string& app_id) {
|
| + return GetInstanceID(app_id, false /* use_subtype */);
|
| +}
|
| +
|
| +InstanceID* InstanceIDDriver::GetInstanceID(const std::string& app_id,
|
| + bool use_subtype) {
|
| auto iter = instance_id_map_.find(app_id);
|
| if (iter != instance_id_map_.end())
|
| return iter->second.get();
|
|
|
| std::unique_ptr<InstanceID> instance_id =
|
| - InstanceID::Create(app_id, gcm_driver_);
|
| + InstanceID::CreateInternal(app_id, use_subtype, gcm_driver_);
|
| InstanceID* instance_id_ptr = instance_id.get();
|
| instance_id_map_.insert(std::make_pair(app_id, std::move(instance_id)));
|
| return instance_id_ptr;
|
|
|