Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2806)

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698