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

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

Issue 2344273002: Remove stl_util's STLDeleteContainerPairSecondPointers from extensions. (Closed)
Patch Set: devlin 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2c6b52d0b2482cf6c6c1ac675bb4c45bcf0c1863 100644
--- a/chrome/browser/extensions/api/messaging/message_service.h
+++ b/chrome/browser/extensions/api/messaging/message_service.h
@@ -185,21 +185,21 @@ class MessageService : public BrowserContextKeyedAPI {
struct OpenChannelParams;
// A map of channel ID to its channel object.
- typedef std::map<int, MessageChannel*> MessageChannelMap;
+ using MessageChannelMap = std::map<int, std::unique_ptr<MessageChannel>>;
- typedef std::pair<int, Message> PendingMessage;
- typedef std::vector<PendingMessage> PendingMessagesQueue;
+ using PendingMessage = std::pair<int, Message>;
+ using PendingMessagesQueue = std::vector<PendingMessage>;
// A set of channel IDs waiting to complete opening, and any pending messages
// queued to be sent on those channels.
- typedef std::map<int, PendingMessagesQueue> PendingChannelMap;
+ using PendingChannelMap = std::map<int, PendingMessagesQueue>;
// A map of channel ID to information about the extension that is waiting
// for that channel to open. Used for lazy background pages.
- typedef std::string ExtensionID;
- typedef std::pair<content::BrowserContext*, ExtensionID>
- PendingLazyBackgroundPageChannel;
- typedef std::map<int, PendingLazyBackgroundPageChannel>
- PendingLazyBackgroundPageChannelMap;
+ using ExtensionID = std::string;
+ using PendingLazyBackgroundPageChannel =
+ std::pair<content::BrowserContext*, ExtensionID>;
+ using PendingLazyBackgroundPageChannelMap =
+ std::map<int, PendingLazyBackgroundPageChannel>;
// Common implementation for opening a channel configured by |params|.
//
@@ -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.
« no previous file with comments | « no previous file | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698