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

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

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Pure 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.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())

Powered by Google App Engine
This is Rietveld 408576698