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

Unified Diff: chrome/browser/chromeos/note_taking_helper.cc

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Address comments. 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/chromeos/note_taking_helper.cc
diff --git a/chrome/browser/chromeos/note_taking_helper.cc b/chrome/browser/chromeos/note_taking_helper.cc
index ef5a08ff8fa02c68db3622fff9bd578405302fb5..4b7fdf1925dfe56d653d3df3cdcda022bf02445e 100644
--- a/chrome/browser/chromeos/note_taking_helper.cc
+++ b/chrome/browser/chromeos/note_taking_helper.cc
@@ -221,16 +221,20 @@ NoteTakingHelper::NoteTakingHelper()
// Track profiles so we can observe their extension registries.
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED,
content::NotificationService::AllBrowserContextsAndSources());
+ android_enabled_ = false;
for (Profile* profile :
g_browser_process->profile_manager()->GetLoadedProfiles()) {
extension_registry_observer_.Add(
extensions::ExtensionRegistry::Get(profile));
+ // Check if the profile has already enabled Google Play Store.
+ // IsArcPlayStoreEnabledForProfile() can return true only for the primary
+ // profile.
+ android_enabled_ |= arc::IsArcPlayStoreEnabledForProfile(profile);
}
- // Check if the primary profile has already enabled ARC and watch for changes.
+ // Watch for changes of Google Play Store enabled state.
auto session_manager = arc::ArcSessionManager::Get();
session_manager->AddObserver(this);
- android_enabled_ = session_manager->IsArcPlayStoreEnabled();
// ArcIntentHelperBridge will notify us about changes to the list of available
// Android apps.

Powered by Google App Engine
This is Rietveld 408576698