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

Unified Diff: components/browser_context_keyed_service/browser_context_dependency_manager.h

Issue 159763004: Eliminate potential for flaky crash in BCKSFactory::SetTestingFactory(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: 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..bffd9270a680ec30bc19a070673defffec780b00 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,11 @@ 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);
+
+ // Indicates that |context| is live (i.e., not stale). Called as a safeguard
+ // against |AssertBrowserContextWasntDestroyed()| checks going off due to
+ // |context| aliasing a BrowserContext instance from a prior test.
+ void MarkBrowserContextLiveForTesting(content::BrowserContext* context);
#endif
static BrowserContextDependencyManager* GetInstance();

Powered by Google App Engine
This is Rietveld 408576698