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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.h

Issue 2344273002: Remove stl_util's STLDeleteContainerPairSecondPointers from extensions. (Closed)
Patch Set: fix Created 4 years, 3 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: chrome/browser/extensions/api/messaging/message_service.h
diff --git a/chrome/browser/extensions/api/messaging/message_service.h b/chrome/browser/extensions/api/messaging/message_service.h
index fa641f3be4af19e884d68bae9443c5256459e1e3..08e0c5970f6579d2c2b36e3851ab4907df689534 100644
--- a/chrome/browser/extensions/api/messaging/message_service.h
+++ b/chrome/browser/extensions/api/messaging/message_service.h
@@ -185,7 +185,7 @@ class MessageService : public BrowserContextKeyedAPI {
struct OpenChannelParams;
// A map of channel ID to its channel object.
- typedef std::map<int, MessageChannel*> MessageChannelMap;
+ typedef std::map<int, std::unique_ptr<MessageChannel>> MessageChannelMap;
Devlin 2016/09/16 20:23:19 nit: update to 'using' syntax since we're here?
Avi (use Gerrit) 2016/09/16 20:41:45 Done.
typedef std::pair<int, Message> PendingMessage;
typedef std::vector<PendingMessage> PendingMessagesQueue;
@@ -226,7 +226,8 @@ class MessageService : public BrowserContextKeyedAPI {
// Have MessageService take ownership of |channel|, and remove any pending
// channels with the same id.
- void AddChannel(MessageChannel* channel, int receiver_port_id);
+ void AddChannel(std::unique_ptr<MessageChannel> channel,
+ int receiver_port_id);
// If the channel is being opened from an incognito tab the user must allow
// the connection.

Powered by Google App Engine
This is Rietveld 408576698