Index: chrome/browser/task_management/providers/web_contents/renderer_task.cc |
diff --git a/chrome/browser/task_management/providers/web_contents/renderer_task.cc b/chrome/browser/task_management/providers/web_contents/renderer_task.cc |
index ca30ac750dd15e99591707ebeb60063e23cd64a9..4c2ce607b8050ee7dbc14f19abe748cb25bc0172 100644 |
--- a/chrome/browser/task_management/providers/web_contents/renderer_task.cc |
+++ b/chrome/browser/task_management/providers/web_contents/renderer_task.cc |
@@ -11,8 +11,6 @@ |
#include "chrome/browser/favicon/favicon_utils.h" |
#include "chrome/browser/process_resource_usage.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/task_management/task_manager_observer.h" |
#include "chrome/grit/generated_resources.h" |
#include "content/public/browser/render_process_host.h" |
@@ -44,15 +42,7 @@ base::string16 GetRendererProfileName( |
const content::RenderProcessHost* render_process_host) { |
Profile* profile = |
Profile::FromBrowserContext(render_process_host->GetBrowserContext()); |
- DCHECK(profile); |
- ProfileInfoCache& cache = |
- g_browser_process->profile_manager()->GetProfileInfoCache(); |
- size_t index = |
- cache.GetIndexOfProfileWithPath(profile->GetOriginalProfile()->GetPath()); |
- if (index != std::string::npos) |
- return cache.GetNameOfProfileAtIndex(index); |
- |
- return base::string16(); |
+ return Task::GetProfileNameFromProfile(profile); |
} |
inline bool IsRendererResourceSamplingDisabled(int64 flags) { |