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

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

Issue 2777253002: chromeos: Update note-taking apps when ARC-enabled profile added. (Closed)
Patch Set: 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..b4e003a1587722edc666b95312feaeedf15f9683 100644
--- a/chrome/browser/chromeos/note_taking_helper.cc
+++ b/chrome/browser/chromeos/note_taking_helper.cc
@@ -391,10 +391,18 @@ 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);
+
+ if (!play_store_enabled_ && arc::IsArcPlayStoreEnabledForProfile(profile)) {
Yusuke Sato 2017/03/27 21:38:47 +1 for adding a TODO here. TODO(hidehiko) should b
Daniel Erat 2017/03/27 22:04:16 Done.
+ play_store_enabled_ = true;
+ for (auto& observer : observers_)
+ observer.OnAvailableNoteTakingAppsUpdated();
Daniel Erat 2017/03/27 19:25:23 this notification is since we're now waiting for a
+ }
}
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