Chromium Code Reviews| Index: components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc |
| diff --git a/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc b/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc |
| index 03c99158b48d02580038250909832a0115ea49e4..7778de8abeec12788420809f63bc2abe467f9326 100644 |
| --- a/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc |
| +++ b/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc |
| @@ -49,12 +49,9 @@ RefcountedBrowserContextKeyedServiceFactory::GetServiceForBrowserContext( |
| content::BrowserContext* |
| RefcountedBrowserContextKeyedServiceFactory::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?
|
| -#endif |
| - |
| // Safe default for Incognito mode: no service. |
| if (context->IsOffTheRecord()) |
| return nullptr; |
| @@ -97,6 +94,7 @@ bool RefcountedBrowserContextKeyedServiceFactory::IsOffTheRecord( |
| base::SupportsUserData* |
| RefcountedBrowserContextKeyedServiceFactory::GetContextToUse( |
| base::SupportsUserData* context) const { |
| + AssertContextWasntDestroyed(context); |
| return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context)); |
| } |