Chromium Code Reviews| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc |
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc |
| index e99b5a03e2a0d5374db31469c3d412e4394f5e51..d3232c7026b375415490747998a1cfa2d5caabf5 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc |
| @@ -50,9 +50,8 @@ ArcAppListPrefsFactory::~ArcAppListPrefsFactory() { |
| KeyedService* ArcAppListPrefsFactory::BuildServiceInstanceFor( |
| content::BrowserContext* context) const { |
| Profile* profile = static_cast<Profile*>(context); |
| - if (!arc::IsArcAllowedForProfile(profile)) |
| - return nullptr; |
| + // Profiles are always treated as allowed to ARC in sync integration test. |
|
lgcheng
2017/02/24 01:31:20
We can replace this test check with arc:util api i
|
| if (is_sync_test_) { |
| sync_test_app_instance_holders_[context].reset( |
| new arc::InstanceHolder<arc::mojom::AppInstance>()); |
|
hidehiko
2017/02/24 18:22:27
As you're here, could you use base::MakeUnique()?
lgcheng
2017/02/25 01:40:38
Done.
|
| @@ -60,6 +59,9 @@ KeyedService* ArcAppListPrefsFactory::BuildServiceInstanceFor( |
| profile, sync_test_app_instance_holders_[context].get()); |
| } |
| + if (!arc::IsArcAllowedForProfile(profile)) |
| + return nullptr; |
| + |
| auto* arc_service_manager = arc::ArcServiceManager::Get(); |
| if (!arc_service_manager) |
| return nullptr; |