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

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

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rebase to ToT Created 3 years, 9 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 159af5ed933d15fa881047716aea9a61c3faa0cf..8465c18f9ec51e20c6b9f8375370a3948b743030 100644
--- a/chrome/browser/chromeos/note_taking_helper.cc
+++ b/chrome/browser/chromeos/note_taking_helper.cc
@@ -186,12 +186,12 @@ void NoteTakingHelper::LaunchAppForNewNote(Profile* profile,
}
void NoteTakingHelper::OnIntentFiltersUpdated() {
- if (android_enabled_)
+ if (play_store_enabled_)
UpdateAndroidApps();
}
void NoteTakingHelper::OnArcPlayStoreEnabledChanged(bool enabled) {
- android_enabled_ = enabled;
+ play_store_enabled_ = enabled;
if (!enabled) {
android_apps_.clear();
android_apps_received_ = false;
@@ -221,7 +221,7 @@ NoteTakingHelper::NoteTakingHelper()
// Track profiles so we can observe their extension registries.
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED,
content::NotificationService::AllBrowserContextsAndSources());
- android_enabled_ = false;
+ play_store_enabled_ = false;
for (Profile* profile :
g_browser_process->profile_manager()->GetLoadedProfiles()) {
extension_registry_observer_.Add(
@@ -229,7 +229,7 @@ NoteTakingHelper::NoteTakingHelper()
// Check if the profile has already enabled Google Play Store.
// IsArcPlayStoreEnabledForProfile() can return true only for the primary
// profile.
- android_enabled_ |= arc::IsArcPlayStoreEnabledForProfile(profile);
+ play_store_enabled_ |= arc::IsArcPlayStoreEnabledForProfile(profile);
}
// Watch for changes of Google Play Store enabled state.
@@ -246,12 +246,12 @@ NoteTakingHelper::NoteTakingHelper()
// If the ARC intent helper is ready, get the Android apps. Otherwise,
// UpdateAndroidApps() will be called when ArcServiceManager calls
// OnIntentFiltersUpdated().
- if (android_enabled_ &&
- arc::ArcServiceManager::Get()
- ->arc_bridge_service()
- ->intent_helper()
- ->has_instance())
+ if (play_store_enabled_ && arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->intent_helper()
+ ->has_instance()) {
UpdateAndroidApps();
+ }
}
NoteTakingHelper::~NoteTakingHelper() {
@@ -318,7 +318,7 @@ void NoteTakingHelper::UpdateAndroidApps() {
void NoteTakingHelper::OnGotAndroidApps(
std::vector<arc::mojom::IntentHandlerInfoPtr> handlers) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- if (!android_enabled_)
+ if (!play_store_enabled_)
return;
android_apps_.clear();
« no previous file with comments | « chrome/browser/chromeos/note_taking_helper.h ('k') | chrome/browser/chromeos/note_taking_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698