| Index: chrome/browser/background/background_mode_manager.cc
|
| ===================================================================
|
| --- chrome/browser/background/background_mode_manager.cc (revision 118523)
|
| +++ 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"
|
| @@ -384,10 +385,11 @@
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // 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) {
|
| + 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.
|
| @@ -404,7 +406,11 @@
|
| }
|
|
|
| void BackgroundModeManager::OnProfileWillBeRemoved(
|
| - const string16& profile_name) {
|
| + const FilePath& profile_path) {
|
| + ProfileInfoCache& cache =
|
| + g_browser_process->profile_manager()->GetProfileInfoCache();
|
| + string16 profile_name = cache.GetNameOfProfileAtIndex(
|
| + cache.GetIndexOfProfileWithPath(profile_path));
|
| // Remove the profile from our map of profiles.
|
| BackgroundModeInfoMap::iterator it =
|
| GetBackgroundModeIterator(profile_name);
|
| @@ -415,12 +421,18 @@
|
| }
|
| }
|
|
|
| -void BackgroundModeManager::OnProfileWasRemoved(const string16& profile_name) {
|
| +void BackgroundModeManager::OnProfileWasRemoved(
|
| + const FilePath& profile_path,
|
| + const string16& profile_name) {
|
| }
|
|
|
| void BackgroundModeManager::OnProfileNameChanged(
|
| - const string16& old_profile_name,
|
| - const string16& new_profile_name) {
|
| + const FilePath& profile_path,
|
| + const string16& old_profile_name) {
|
| + ProfileInfoCache& cache =
|
| + g_browser_process->profile_manager()->GetProfileInfoCache();
|
| + string16 new_profile_name = cache.GetNameOfProfileAtIndex(
|
| + cache.GetIndexOfProfileWithPath(profile_path));
|
| BackgroundModeInfoMap::const_iterator it =
|
| GetBackgroundModeIterator(old_profile_name);
|
| // We check that the returned iterator is valid due to unittests, but really
|
| @@ -433,10 +445,7 @@
|
| }
|
|
|
| void BackgroundModeManager::OnProfileAvatarChanged(
|
| - const string16& profile_name,
|
| - const string16& profile_base_dir,
|
| - const FilePath& profile_path,
|
| - const gfx::Image* avatar_image) {
|
| + const FilePath& profile_path) {
|
|
|
| }
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|