Chromium Code Reviews| Index: components/keyed_service/content/browser_context_keyed_base_factory.cc |
| diff --git a/components/keyed_service/content/browser_context_keyed_base_factory.cc b/components/keyed_service/content/browser_context_keyed_base_factory.cc |
| index fe461ffb8f076eedac08a3d9db6c94048cd6b16a..7c2d8b797c54c8592e6685996e1bb26ec5e710d4 100644 |
| --- a/components/keyed_service/content/browser_context_keyed_base_factory.cc |
| +++ b/components/keyed_service/content/browser_context_keyed_base_factory.cc |
| @@ -18,12 +18,9 @@ BrowserContextKeyedBaseFactory::~BrowserContextKeyedBaseFactory() { |
| content::BrowserContext* BrowserContextKeyedBaseFactory::GetBrowserContextToUse( |
| content::BrowserContext* context) const { |
| + // TODO(crbug.com/701326): This DCHECK should be moved to GetContextToUse(). |
| DCHECK(CalledOnValidThread()); |
| -#ifndef NDEBUG |
| - AssertContextWasntDestroyed(context); |
|
Paweł Hajdan Jr.
2017/03/21 13:03:24
Why do we remove this assertion?
sense (YandexTeam)
2017/03/22 07:38:21
All this assertions from GetBrowserContextToUse()
|
| -#endif |
| - |
| // Safe default for the Incognito mode: no service. |
| if (context->IsOffTheRecord()) |
| return NULL; |
| @@ -52,6 +49,7 @@ void BrowserContextKeyedBaseFactory::BrowserContextDestroyed( |
| base::SupportsUserData* BrowserContextKeyedBaseFactory::GetContextToUse( |
| base::SupportsUserData* context) const { |
| + AssertContextWasntDestroyed(context); |
| return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context)); |
| } |