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

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

Issue 9020013: Refactor ProfileInfoCacheObserver interface and usage thereof. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: init Created 9 years 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
===================================================================
--- chrome/browser/background/background_mode_manager.cc (revision 115334)
+++ chrome/browser/background/background_mode_manager.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/status_icons/status_icon.h"
#include "chrome/browser/status_icons/status_tray.h"
#include "chrome/browser/ui/browser_list.h"
@@ -386,10 +387,12 @@
///////////////////////////////////////////////////////////////////////////////
// BackgroundModeManager, ProfileInfoCacheObserver overrides
-void BackgroundModeManager::OnProfileAdded(const string16& profile_name,
- const string16& profile_base_dir,
- const FilePath& profile_path,
- const gfx::Image* avatar_image) {
+void BackgroundModeManager::OnProfileAdded(const FilePath& profile_path,
+ const string16& profile_base_dir) {
+ ProfileInfoCache& cache =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
+ string16 profile_name = cache.GetNameOfProfileAtIndex(
+ cache.GetIndexOfProfileWithPath(profile_path));
// At this point, the profile should be registered with the background mode
// manager, but when it's actually added to the cache is when its name is
// set so we need up to update that with the background_mode_data.
@@ -435,10 +438,8 @@
}
void BackgroundModeManager::OnProfileAvatarChanged(
- const string16& profile_name,
- const string16& profile_base_dir,
const FilePath& profile_path,
- const gfx::Image* avatar_image) {
+ const string16& profile_base_dir) {
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698