Index: components/browser_context_keyed_service/browser_context_dependency_manager.h |
diff --git a/components/browser_context_keyed_service/browser_context_dependency_manager.h b/components/browser_context_keyed_service/browser_context_dependency_manager.h |
index 6b2ba2620c5c8de943dac6502c4541666f1f2a3e..d51b5d8f081180d45c87924ed9b683ef9fe63888 100644 |
--- a/components/browser_context_keyed_service/browser_context_dependency_manager.h |
+++ b/components/browser_context_keyed_service/browser_context_dependency_manager.h |
@@ -68,6 +68,13 @@ class BROWSER_CONTEXT_KEYED_SERVICE_EXPORT BrowserContextDependencyManager { |
// mode. This will NOTREACHED() whenever the user is trying to access a stale |
// BrowserContext*. |
void AssertBrowserContextWasntDestroyed(content::BrowserContext* context); |
+ |
+ // Marks |context| as live (i.e., not stale). This method can be called as a |
+ // safeguard against |AssertBrowserContextWasntDestroyed()| checks going off |
+ // due to |context| aliasing a BrowserContext instance from a prior test |
+ // (i.e., 0xWhatever might be created, be destroyed, and then a new |
+ // BrowserContext object might be created at 0xWhatever). |
+ void MarkBrowserContextLiveForTesting(content::BrowserContext* context); |
#endif |
static BrowserContextDependencyManager* GetInstance(); |