New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 910779 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 19
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 556939



Sign in to add a comment

Remove linked_ptr from GCM

Project Member Reported by a...@chromium.org, Dec 1

Issue description

linked_ptr is obsolete and we're removing it.

components/gcm_driver uses it in a very strange way. registration_info.h has:

typedef std::map<linked_ptr<RegistrationInfo>,
                std::string,
                RegistrationInfoComparer> RegistrationInfoMap;

which is rather confusing. Usually you map from a simple type to a complicated one, but here the linked_ptr is the key. I don't know how to easily convert this. Perhaps a set<pair<unique_ptr<RegistrationInfo>, string>>?
 
Owner: rayankans@chromium.org
Rayan's willing to take a look, thanks!
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3da434f6eb132dedb7e782082ee61fce62b6cb0c

commit 3da434f6eb132dedb7e782082ee61fce62b6cb0c
Author: Rayan Kanso <rayankans@chromium.org>
Date: Wed Dec 19 17:09:39 2018

Remove linked_ptr from GCM driver code.

This change basically replaces linked_ptr w/scoped_refptr.

We can't use the object itself since it's abstract, and a unique_ptr is
not ideal since there are points where we need to pass the ptr to
multiple systems.

Bug:  910779 
Change-Id: I33d0a4f9c945eb1eadb2c28d3bda8b9dea1ee4c6
Reviewed-on: https://chromium-review.googlesource.com/c/1379769
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617860}
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/fake_gcm_client.cc
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/fake_gcm_client.h
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_client.h
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_client_impl.cc
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_client_impl.h
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_client_impl_unittest.cc
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_driver_desktop.cc
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/gcm_driver_desktop.h
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/registration_info.cc
[modify] https://crrev.com/3da434f6eb132dedb7e782082ee61fce62b6cb0c/components/gcm_driver/registration_info.h

Status: Fixed (was: Assigned)

Sign in to add a comment