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

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

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | Created 6 years, 10 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 edf2df247188c2821c4ef236ca1d5afbb5bf09e4..3f51469e20c067aae055278ef41e15d5ad032a14 100644
--- a/chrome/browser/extensions/api/messaging/message_service.h
+++ b/chrome/browser/extensions/api/messaging/message_service.h
@@ -109,14 +109,14 @@ class MessageService : public ProfileKeyedAPI,
// NOTE: this can be called from any thread.
static void AllocatePortIdPair(int* port1, int* port2);
- explicit MessageService(Profile* profile);
+ explicit MessageService(content::BrowserContext* context);
virtual ~MessageService();
// ProfileKeyedAPI implementation.
static ProfileKeyedAPIFactory<MessageService>* GetFactoryInstance();
// Convenience method to get the MessageService for a browser context.
- static MessageService* Get(content::BrowserContext* profile);
+ static MessageService* Get(content::BrowserContext* context);
// Given an extension's ID, opens a channel between the given renderer "port"
// and every listening context owned by that extension. |channel_name| is
@@ -175,7 +175,8 @@ class MessageService : public ProfileKeyedAPI,
// 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<Profile*, ExtensionID> PendingLazyBackgroundPageChannel;
+ typedef std::pair<content::BrowserContext*, ExtensionID>
+ PendingLazyBackgroundPageChannel;
typedef std::map<int, PendingLazyBackgroundPageChannel>
PendingLazyBackgroundPageChannelMap;
@@ -219,7 +220,7 @@ class MessageService : public ProfileKeyedAPI,
// to open a channel. Returns true if a task was queued.
// Takes ownership of |params| if true is returned.
bool MaybeAddPendingLazyBackgroundPageOpenChannelTask(
- Profile* profile,
+ content::BrowserContext* context,
const Extension* extension,
OpenChannelParams* params);

Powered by Google App Engine
This is Rietveld 408576698