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

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: Fix compile 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
« no previous file with comments | « no previous file | components/browser_context_keyed_service/browser_context_dependency_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | components/browser_context_keyed_service/browser_context_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698