Index: chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc |
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc |
index b16be53fae7ce7f5afdf5cbd8eade4c8bb50b80f..f72fd3caf918c575123af8ead81354f348ebf5a7 100644 |
--- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc |
+++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc |
@@ -82,10 +82,14 @@ bool BrailleDisplayPrivateAPI::IsProfileActive() { |
Profile* active_profile; |
chromeos::ScreenLocker* screen_locker = |
chromeos::ScreenLocker::default_screen_locker(); |
- if (screen_locker && screen_locker->locked()) |
+ if (screen_locker && screen_locker->locked()) { |
active_profile = chromeos::ProfileHelper::GetSigninProfile(); |
- else |
- active_profile = ProfileManager::GetDefaultProfile(); |
+ } else { |
+ // Since we are creating one instance per profile / user, we should be fine |
+ // comparing against the active user. That said - if we ever change that, |
+ // this code will need to be changed. |
+ active_profile = ProfileManager::GetActiveUserProfile(); |
+ } |
return profile_->IsSameProfile(active_profile); |
#else // !defined(OS_CHROMEOS) |
return true; |