Index: extensions/browser/renderer_startup_helper.h |
diff --git a/extensions/browser/renderer_startup_helper.h b/extensions/browser/renderer_startup_helper.h |
index 94ec3833b955795135c84650f0b857268d8be0d4..cf490f50e57e425577ec12934435ec97ec4bb82e 100644 |
--- a/extensions/browser/renderer_startup_helper.h |
+++ b/extensions/browser/renderer_startup_helper.h |
@@ -47,7 +47,8 @@ class RendererStartupHelper : public KeyedService, |
const content::NotificationDetails& details) override; |
// Sends a message to the specified |process| activating the given extension |
- // once the process is initialized. |
+ // once the process is initialized. OnExtensionLoaded should have already been |
+ // called for the extension. |
void ActivateExtensionInProcess(const Extension& extension, |
content::RenderProcessHost* process); |
@@ -59,6 +60,8 @@ class RendererStartupHelper : public KeyedService, |
void OnExtensionLoaded(const Extension& extension); |
private: |
+ friend class RendererStartupHelperTest; |
+ |
// Initializes the specified process, informing it of system state and loaded |
// extensions. |
void InitializeProcess(content::RenderProcessHost* process); |
@@ -68,6 +71,10 @@ class RendererStartupHelper : public KeyedService, |
content::BrowserContext* browser_context_; // Not owned. |
+ // Tracks the set of loaded extensions and the processes they are loaded in. |
+ std::map<ExtensionId, std::set<content::RenderProcessHost*>> |
+ extension_process_map_; |
+ |
// The set of render processes that have had the initial batch of IPC messages |
// sent, including the set of loaded extensions. Further messages that |
// activate, load, or unload extensions should not be sent until after this |