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

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

Issue 2708693002: Add DCHECK to make sure Profile instance is same. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 017ecaa23967ecdede358b9d5744db36615be9a9..8013781b33e53b38ec244248c3bc05a4e199ca9e 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
@@ -263,8 +263,14 @@ void ArcAppListPrefs::StartPrefs() {
arc::ArcSessionManager* arc_session_manager = arc::ArcSessionManager::Get();
CHECK(arc_session_manager);
- if (arc_session_manager->profile())
+ 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_session_manager->IsArcPlayStoreEnabled());
+ }
arc_session_manager->AddObserver(this);
app_instance_holder_->AddObserver(this);
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698