diff options
Diffstat (limited to 'extensions/browser/info_map.cc')
-rw-r--r-- | extensions/browser/info_map.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/extensions/browser/info_map.cc b/extensions/browser/info_map.cc index 3f55ceb..7122eb0 100644 --- a/extensions/browser/info_map.cc +++ b/extensions/browser/info_map.cc @@ -44,6 +44,10 @@ InfoMap::InfoMap() : signin_process_id_(-1) {} const ProcessMap& InfoMap::process_map() const { return process_map_; } +const ProcessMap& InfoMap::worker_process_map() const { + return worker_process_map_; +} + void InfoMap::AddExtension(const Extension* extension, base::Time install_time, bool incognito_enabled, @@ -124,6 +128,19 @@ void InfoMap::UnregisterAllExtensionsInProcess(int process_id) { process_map_.RemoveAllFromProcess(process_id); } +void InfoMap::RegisterExtensionWorkerProcess(const std::string& extension_id, + int process_id, + int site_instance_id) { + if (!worker_process_map_.Insert(extension_id, process_id, site_instance_id)) { + NOTREACHED() << "Duplicate extension worker process registration for: " + << extension_id << "," << process_id << "."; + } +} + +void InfoMap::UnregisterExtensionWorkerProcess(int process_id) { + worker_process_map_.RemoveAllFromProcess(process_id); +} + void InfoMap::GetExtensionsWithAPIPermissionForSecurityOrigin( const GURL& origin, int process_id, |