summaryrefslogtreecommitdiffstats
path: root/extensions/browser/process_manager.h
diff options
context:
space:
mode:
authorrdevlin.cronin <rdevlin.cronin@chromium.org>2015-02-09 16:48:15 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-10 00:49:01 +0000
commit3d426152c0d6844645523bd0a13cece6bd7d2254 (patch)
tree7e3e10252e0e52bcaa9da3ef35dc6b49a2bdcd99 /extensions/browser/process_manager.h
parent68d6c1aac1ea03b5b496ff01785fae90ab3e475d (diff)
downloadchromium_src-3d426152c0d6844645523bd0a13cece6bd7d2254.zip
chromium_src-3d426152c0d6844645523bd0a13cece6bd7d2254.tar.gz
chromium_src-3d426152c0d6844645523bd0a13cece6bd7d2254.tar.bz2
[Extensions] Make ProcessManager::GetSiteInstanceForUrl return ref ptr
ProcessManager::GetSiteInstanceForUrl calls through into SiteInstance::GetRelatedSiteInstance(), which has the appropriate comment "Callers should ensure that this SiteInstance becomes ref counted, by storing it in a scoped_refptr." This implies that GetSiteInstanceForUrl should return a refptr (as, probably, should GetRelatedSiteInstance, but that's a bigger change). (Discovered by a test failing on asan for leaking a site instance.) BUG=456858 TBR=mtomasz@chromium.org (micro file manager change) Review URL: https://codereview.chromium.org/890603005 Cr-Commit-Position: refs/heads/master@{#315457}
Diffstat (limited to 'extensions/browser/process_manager.h')
-rw-r--r--extensions/browser/process_manager.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index 2bfcb60e4..60056a1 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -73,13 +73,10 @@ class ProcessManager : public KeyedService,
ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id);
// Returns the SiteInstance that the given URL belongs to.
- // Callers should wrap the result in a scoped_refptr to ensure the
- // SiteInstance becomes refcounted.
- // TODO(devlin): The above comment clearly indicates that this should just
- // return a refptr. Update callers.
// TODO(aa): This only returns correct results for extensions and packaged
// apps, not hosted apps.
- virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url);
+ virtual scoped_refptr<content::SiteInstance> GetSiteInstanceForURL(
+ const GURL& url);
// If the view isn't keeping the lazy background page alive, increments the
// keepalive count to do so.