Index: chrome/browser/task_manager/task_manager_resource_providers.cc |
=================================================================== |
--- chrome/browser/task_manager/task_manager_resource_providers.cc (revision 99168) |
+++ chrome/browser/task_manager/task_manager_resource_providers.cc (working copy) |
@@ -22,6 +22,8 @@ |
#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/browser/favicon/favicon_tab_helper.h" |
#include "chrome/browser/prerender/prerender_manager.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/tab_contents/background_contents.h" |
#include "chrome/browser/tab_contents/tab_util.h" |
@@ -263,6 +265,14 @@ |
return l10n_util::GetStringFUTF16(message_id, tab_title); |
} |
+string16 TaskManagerTabContentsResource::GetProfileName() const { |
+ ProfileInfoCache& cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ Profile* profile = tab_contents_->profile()->GetOriginalProfile(); |
+ return cache.GetNameOfProfileAtIndex( |
+ cache.GetIndexOfProfileWithPath(profile->GetPath())); |
+} |
+ |
SkBitmap TaskManagerTabContentsResource::GetIcon() const { |
if (IsPrerendering()) |
return *prerender_icon_; |
@@ -494,6 +504,9 @@ |
return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_BACKGROUND_PREFIX, title); |
} |
+string16 TaskManagerBackgroundContentsResource::GetProfileName() const { |
+ return string16(); |
+} |
SkBitmap TaskManagerBackgroundContentsResource::GetIcon() const { |
return *default_icon_; |
@@ -725,6 +738,10 @@ |
return title_; |
} |
+string16 TaskManagerChildProcessResource::GetProfileName() const { |
+ return string16(); |
+} |
+ |
SkBitmap TaskManagerChildProcessResource::GetIcon() const { |
return *default_icon_; |
} |
@@ -1013,6 +1030,14 @@ |
return title_; |
} |
+string16 TaskManagerExtensionProcessResource::GetProfileName() const { |
+ ProfileInfoCache& cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ Profile* profile = extension_host_->profile()->GetOriginalProfile(); |
+ return cache.GetNameOfProfileAtIndex( |
+ cache.GetIndexOfProfileWithPath(profile->GetPath())); |
+} |
+ |
SkBitmap TaskManagerExtensionProcessResource::GetIcon() const { |
return *default_icon_; |
} |
@@ -1239,6 +1264,10 @@ |
return title_; |
} |
+string16 TaskManagerBrowserProcessResource::GetProfileName() const { |
+ return string16(); |
+} |
+ |
SkBitmap TaskManagerBrowserProcessResource::GetIcon() const { |
return *default_icon_; |
} |