Chromium Code Reviews| Index: chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
| diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
| index 9d89d8b3688a90334ad6da86867c4f3f491a5d00..c587ec1334c6c39bfaec473e612150d6167fa0ee 100644 |
| --- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
| +++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
| @@ -25,6 +25,15 @@ |
| namespace app_list { |
| +namespace { |
| +bool used_in_testing = false; |
|
xiyuan
2016/06/14 21:42:50
nit: used_in_testing -> use_in_testing to be consi
khmel
2016/06/15 17:01:19
Done.
|
| +} |
| + |
| +// static |
| +void AppListSyncableServiceFactory::SetUseInTesting() { |
|
xiyuan
2016/06/14 21:42:50
nit: either move this down after BuildInstanceFor,
khmel
2016/06/15 17:01:19
Done.
|
| + used_in_testing = true; |
| +} |
| + |
| // static |
| AppListSyncableService* AppListSyncableServiceFactory::GetForProfile( |
| Profile* profile) { |
| @@ -97,7 +106,7 @@ bool AppListSyncableServiceFactory::ServiceIsCreatedWithBrowserContext() const { |
| } |
| bool AppListSyncableServiceFactory::ServiceIsNULLWhileTesting() const { |
| - return true; |
| + return !used_in_testing; |
| } |
| } // namespace app_list |