| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| index 78512a0c0193e24f2dd0c8aa44b01fcd69cc693d..51c72104b79f6dbbd3d40abd59aea78d6a0384e4 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| @@ -265,19 +265,23 @@ ArcAppListPrefs::~ArcAppListPrefs() {
|
| }
|
|
|
| void ArcAppListPrefs::StartPrefs() {
|
| - arc::ArcSessionManager* arc_session_manager = arc::ArcSessionManager::Get();
|
| - CHECK(arc_session_manager);
|
| -
|
| - if (arc_session_manager->profile()) {
|
| - // Note: If ArcSessionManager has profile, it should be as same as the one
|
| - // this instance has, because ArcAppListPrefsFactory creates an instance
|
| - // only if the given Profile meets ARC's requirement.
|
| - // Anyway, just in case, check it here.
|
| - DCHECK_EQ(profile_, arc_session_manager->profile());
|
| - OnArcPlayStoreEnabledChanged(
|
| - arc::IsArcPlayStoreEnabledForProfile(profile_));
|
| + // Don't tie ArcAppListPrefs created with sync test profie in sync integration
|
| + // test to ArcSessionManager.
|
| + if (!ArcAppListPrefsFactory::IsFactorySetForSyncTest()) {
|
| + arc::ArcSessionManager* arc_session_manager = arc::ArcSessionManager::Get();
|
| + CHECK(arc_session_manager);
|
| +
|
| + if (arc_session_manager->profile()) {
|
| + // Note: If ArcSessionManager has profile, it should be as same as the one
|
| + // this instance has, because ArcAppListPrefsFactory creates an instance
|
| + // only if the given Profile meets ARC's requirement.
|
| + // Anyway, just in case, check it here.
|
| + DCHECK_EQ(profile_, arc_session_manager->profile());
|
| + OnArcPlayStoreEnabledChanged(
|
| + arc::IsArcPlayStoreEnabledForProfile(profile_));
|
| + }
|
| + arc_session_manager->AddObserver(this);
|
| }
|
| - arc_session_manager->AddObserver(this);
|
|
|
| app_instance_holder_->AddObserver(this);
|
| if (!app_instance_holder_->has_instance())
|
|
|