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

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

Issue 2777253002: chromeos: Update note-taking apps when ARC-enabled profile added. (Closed)
Patch Set: add TODO 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/note_taking_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8465c18f9ec51e20c6b9f8375370a3948b743030..0d93bb2d5412b14f6a682b1d83c3394664d6e00b 100644
--- a/chrome/browser/chromeos/note_taking_helper.cc
+++ b/chrome/browser/chromeos/note_taking_helper.cc
@@ -391,10 +391,20 @@ void NoteTakingHelper::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_ADDED);
- auto* registry = extensions::ExtensionRegistry::Get(
- content::Source<Profile>(source).ptr());
+ Profile* profile = content::Source<Profile>(source).ptr();
+ DCHECK(profile);
+
+ auto* registry = extensions::ExtensionRegistry::Get(profile);
DCHECK(!extension_registry_observer_.IsObserving(registry));
extension_registry_observer_.Add(registry);
+
+ // TODO(derat): Remove this once OnArcPlayStoreEnabledChanged() is always
+ // called after an ARC-enabled user logs in: http://b/36655474
+ if (!play_store_enabled_ && arc::IsArcPlayStoreEnabledForProfile(profile)) {
+ play_store_enabled_ = true;
+ for (auto& observer : observers_)
+ observer.OnAvailableNoteTakingAppsUpdated();
+ }
}
void NoteTakingHelper::OnExtensionLoaded(
« no previous file with comments | « no previous file | chrome/browser/chromeos/note_taking_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698