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

Unified Diff: base/threading/worker_pool_win.cc

Issue 8565024: base: Refactor PendingTask out of MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add new files. Created 9 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: base/threading/worker_pool_win.cc
diff --git a/base/threading/worker_pool_win.cc b/base/threading/worker_pool_win.cc
index 944447633f1f0ec1ddd5848740c63ba6f0e6a39b..796ac5269f598eb9d36a231a117b8f73fa511708 100644
--- a/base/threading/worker_pool_win.cc
+++ b/base/threading/worker_pool_win.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/debug/trace_event.h"
#include "base/logging.h"
+#include "base/pending_task.h"
#include "base/task.h"
#include "base/tracked_objects.h"
@@ -14,29 +15,6 @@ namespace base {
namespace {
-struct PendingTask {
- PendingTask(
- const tracked_objects::Location& posted_from,
- const base::Closure& task)
- : posted_from(posted_from),
- task(task) {
- birth_tally = tracked_objects::ThreadData::TallyABirthIfActive(posted_from);
- time_posted = tracked_objects::ThreadData::Now();
- }
-
- // Counter for location where the Closure was posted from.
- tracked_objects::Births* birth_tally;
-
- // Time the task was posted.
- tracked_objects::TrackedTime time_posted;
-
- // The site this PendingTask was posted from.
- tracked_objects::Location posted_from;
-
- // The task to run.
- base::Closure task;
-};
-
DWORD CALLBACK WorkItemCallback(void* param) {
PendingTask* pending_task = static_cast<PendingTask*>(param);
UNSHIPPED_TRACE_EVENT2("task", "WorkItemCallback::Run",

Powered by Google App Engine
This is Rietveld 408576698