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

Unified Diff: extensions/browser/browser_context_keyed_api_factory.h

Issue 1232603002: This patch improves the way that GuestViewManager tracks the destruction of GuestView embedders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment by kalman@. Created 5 years, 5 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: extensions/browser/browser_context_keyed_api_factory.h
diff --git a/extensions/browser/browser_context_keyed_api_factory.h b/extensions/browser/browser_context_keyed_api_factory.h
index fc0add240e066d5b81ea510ee7b1d2e4d44872b4..ad87e22d84b0754f0c23b46d36380ecea9dcf325 100644
--- a/extensions/browser/browser_context_keyed_api_factory.h
+++ b/extensions/browser/browser_context_keyed_api_factory.h
@@ -76,6 +76,11 @@ class BrowserContextKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
T::GetFactoryInstance()->GetServiceForBrowserContext(context, true));
}
+ static T* GetIfExists(content::BrowserContext* context) {
+ return static_cast<T*>(
+ T::GetFactoryInstance()->GetServiceForBrowserContext(context, false));
+ }
+
// Declare dependencies on other factories.
// By default, ExtensionSystemFactory is the only dependency; however,
// specializations can override this. Declare your specialization in
« no previous file with comments | « extensions/browser/api/declarative/rules_registry_service.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698