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

Unified Diff: sandbox/win/src/win2k_threadpool.h

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 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 | « sandbox/win/src/unload_dll_test.cc ('k') | sandbox/win/src/win2k_threadpool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/win2k_threadpool.h
diff --git a/sandbox/win/src/win2k_threadpool.h b/sandbox/win/src/win2k_threadpool.h
deleted file mode 100644
index c4d539dd7feeea395b9df87bba7d62f328b3f06a..0000000000000000000000000000000000000000
--- a/sandbox/win/src/win2k_threadpool.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef SANDBOX_SRC_WIN2K_THREADPOOL_H_
-#define SANDBOX_SRC_WIN2K_THREADPOOL_H_
-
-#include <stddef.h>
-
-#include <algorithm>
-#include <list>
-#include "base/macros.h"
-#include "sandbox/win/src/crosscall_server.h"
-
-namespace sandbox {
-
-// Win2kThreadPool a simple implementation of a thread provider as required
-// for the sandbox IPC subsystem. See sandbox\crosscall_server.h for the details
-// and requirements of this interface.
-//
-// Implementing the thread provider as a thread pool is desirable in the case
-// of shared memory IPC because it can generate a large number of waitable
-// events: as many as channels. A thread pool does not create a thread per
-// event, instead maintains a few idle threads but can create more if the need
-// arises.
-//
-// This implementation simply thunks to the nice thread pool API of win2k.
-class Win2kThreadPool : public ThreadProvider {
- public:
- Win2kThreadPool();
- ~Win2kThreadPool() override;
-
- bool RegisterWait(const void* cookie,
- HANDLE waitable_object,
- CrossCallIPCCallback callback,
- void* context) override;
-
- bool UnRegisterWaits(void* cookie) override;
-
- // Returns the total number of wait objects associated with
- // the thread pool.
- size_t OutstandingWaits();
-
- private:
- // record to keep track of a wait and its associated cookie.
- struct PoolObject {
- const void* cookie;
- HANDLE wait;
- };
- // The list of pool wait objects.
- typedef std::list<PoolObject> PoolObjects;
- PoolObjects pool_objects_;
- // This lock protects the list of pool wait objects.
- CRITICAL_SECTION lock_;
-
- DISALLOW_COPY_AND_ASSIGN(Win2kThreadPool);
-};
-
-} // namespace sandbox
-
-#endif // SANDBOX_SRC_WIN2K_THREADPOOL_H_
« no previous file with comments | « sandbox/win/src/unload_dll_test.cc ('k') | sandbox/win/src/win2k_threadpool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698