Chromium Code Reviews| 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( |