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

Unified Diff: chrome/browser/task_manager/sampling/task_group.cc

Issue 2649063003: Revert of Query NaCl processes' GDB debug port on the correct thread. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « chrome/browser/task_manager/sampling/task_group.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/sampling/task_group.cc
diff --git a/chrome/browser/task_manager/sampling/task_group.cc b/chrome/browser/task_manager/sampling/task_group.cc
index d7fab26f8d64944db4aa3da4f1b4d03a783e06c9..a7a0d11116ec0b15b4f361873cfdc146174b294e 100644
--- a/chrome/browser/task_manager/sampling/task_group.cc
+++ b/chrome/browser/task_manager/sampling/task_group.cc
@@ -26,12 +26,11 @@
const int kBackgroundRefreshTypesMask =
REFRESH_TYPE_CPU | REFRESH_TYPE_MEMORY | REFRESH_TYPE_IDLE_WAKEUPS |
#if defined(OS_WIN)
- REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME |
+ REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME |
#endif // defined(OS_WIN)
#if defined(OS_LINUX)
- REFRESH_TYPE_FD_COUNT |
+ REFRESH_TYPE_FD_COUNT |
#endif // defined(OS_LINUX)
- REFRESH_TYPE_NACL ||
REFRESH_TYPE_PRIORITY;
#if defined(OS_WIN)
@@ -177,8 +176,7 @@
}
#endif // defined(OS_WIN)
-// 4- Refresh the NACL debug stub port (if enabled). This calls out to
-// NaClBrowser on the browser's IO thread, completing asynchronously.
+ // 4- Refresh the NACL debug stub port (if enabled).
#if !defined(DISABLE_NACL)
if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_NACL,
refresh_flags) &&
@@ -257,24 +255,13 @@
#endif // defined(OS_WIN)
}
+void TaskGroup::RefreshNaClDebugStubPort(int child_process_unique_id) {
#if !defined(DISABLE_NACL)
-void TaskGroup::RefreshNaClDebugStubPort(int child_process_unique_id) {
nacl::NaClBrowser* nacl_browser = nacl::NaClBrowser::GetInstance();
- content::BrowserThread::PostTaskAndReplyWithResult(
- content::BrowserThread::IO, FROM_HERE,
- base::Bind(&nacl::NaClBrowser::GetProcessGdbDebugStubPort,
- base::Unretained(nacl_browser), child_process_unique_id),
- base::Bind(&TaskGroup::OnRefreshNaClDebugStubPortDone,
- weak_ptr_factory_.GetWeakPtr()));
-}
-
-void TaskGroup::OnRefreshNaClDebugStubPortDone(int nacl_debug_stub_port) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
- nacl_debug_stub_port_ = nacl_debug_stub_port;
- OnBackgroundRefreshTypeFinished(REFRESH_TYPE_NACL);
-}
+ nacl_debug_stub_port_ =
+ nacl_browser->GetProcessGdbDebugStubPort(child_process_unique_id);
#endif // !defined(DISABLE_NACL)
+}
void TaskGroup::OnCpuRefreshDone(double cpu_usage) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
« no previous file with comments | « chrome/browser/task_manager/sampling/task_group.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698