Chromium Code Reviews| Index: components/keyed_service/core/keyed_service_base_factory.cc |
| diff --git a/components/keyed_service/core/keyed_service_base_factory.cc b/components/keyed_service/core/keyed_service_base_factory.cc |
| index 9f0991d7d6183ab7b58fbff10fe138053786de2d..48643305759bcc97660622b7d38adfefcfbbbdfa 100644 |
| --- a/components/keyed_service/core/keyed_service_base_factory.cc |
| +++ b/components/keyed_service/core/keyed_service_base_factory.cc |
| @@ -79,19 +79,18 @@ KeyedServiceBaseFactory::GetAssociatedPrefRegistry( |
| return registry; |
| } |
| -#ifndef NDEBUG |
| void KeyedServiceBaseFactory::AssertContextWasntDestroyed( |
| base::SupportsUserData* context) const { |
| - DCHECK(CalledOnValidThread()); |
| + // TODO(crbug.com/701326): We should DCHECK(CalledOnValidThread()) here, but |
|
Paweł Hajdan Jr.
2017/03/21 13:03:24
Could you explain more why this wasn't detected ea
sense (YandexTeam)
2017/03/22 07:38:21
This wasn't called if GetBrowserContextToUse() in
|
| + // currently some code doesn't do service getting on the main thread. |
| + // This needs to be fixed and DCHECK should be restored here. |
| dependency_manager_->AssertContextWasntDestroyed(context); |
| } |
| -void KeyedServiceBaseFactory::MarkContextLiveForTesting( |
| - base::SupportsUserData* context) { |
| +void KeyedServiceBaseFactory::MarkContextLive(base::SupportsUserData* context) { |
| DCHECK(CalledOnValidThread()); |
| - dependency_manager_->MarkContextLiveForTesting(context); |
| + dependency_manager_->MarkContextLive(context); |
| } |
| -#endif |
| bool KeyedServiceBaseFactory::ServiceIsCreatedWithContext() const { |
| return false; |