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

Unified Diff: base/worker_pool_win.cc

Issue 6079009: Move some misc thread-related stuff from base to base/thread and into the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « base/worker_pool_unittest.cc ('k') | chrome/browser/jankometer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/worker_pool_win.cc
===================================================================
--- base/worker_pool_win.cc (revision 70312)
+++ base/worker_pool_win.cc (working copy)
@@ -1,36 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/worker_pool.h"
-
-#include "base/logging.h"
-#include "base/task.h"
-
-namespace {
-
-DWORD CALLBACK WorkItemCallback(void* param) {
- Task* task = static_cast<Task*>(param);
- task->Run();
- delete task;
- return 0;
-}
-
-} // namespace
-
-bool WorkerPool::PostTask(const tracked_objects::Location& from_here,
- Task* task, bool task_is_slow) {
- task->SetBirthPlace(from_here);
-
- ULONG flags = 0;
- if (task_is_slow)
- flags |= WT_EXECUTELONGFUNCTION;
-
- if (!QueueUserWorkItem(WorkItemCallback, task, flags)) {
- DLOG(ERROR) << "QueueUserWorkItem failed: " << GetLastError();
- delete task;
- return false;
- }
-
- return true;
-}
« no previous file with comments | « base/worker_pool_unittest.cc ('k') | chrome/browser/jankometer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698