Index: chrome/browser/background/background_mode_manager.cc |
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc |
index de712502a53e4d6fbeeb0badb6d767ccd4e95afc..e143e7caf22a2442c60782f87861a0b30ce8fada 100644 |
--- a/chrome/browser/background/background_mode_manager.cc |
+++ b/chrome/browser/background/background_mode_manager.cc |
@@ -328,11 +328,11 @@ void BackgroundModeManager::OnApplicationListChanged(Profile* profile) { |
// Update the profile cache with the fact whether background apps are running |
// for this profile. |
- size_t profile_index = profile_cache_->GetIndexOfProfileWithPath( |
- profile->GetPath()); |
- if (profile_index != std::string::npos) { |
- profile_cache_->SetBackgroundStatusOfProfileAtIndex( |
- profile_index, GetBackgroundAppCountForProfile(profile) != 0); |
+ ProfileInfoEntry entry; |
+ if (profile_cache_->GetInfoForProfile(profile->GetPath(), &entry)) { |
+ entry.set_is_running_background_apps( |
+ GetBackgroundAppCountForProfile(profile) != 0); |
+ profile_cache_->SetInfoForProfile(entry); |
} |
if (count == 0) { |