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

Unified Diff: chrome/browser/background/background_mode_manager.cc

Issue 8539043: Refactor ProfileInfoCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
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) {
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/profiles/avatar_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698