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

Unified Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 7831003: Add Profile data to the Task Manager on OS Mac. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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/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_;
}
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.h ('k') | chrome/browser/ui/cocoa/task_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698