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

Unified Diff: chrome/browser/task_management/providers/web_contents/renderer_task.cc

Issue 1439213004: Fix various TaskManager bugs and add new enhancements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: auto*& --> auto* Created 5 years, 1 month 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_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) {
« no previous file with comments | « chrome/browser/task_management/providers/task.cc ('k') | chrome/browser/task_management/sampling/task_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698