Disable InstantExtendedTest.UpdateSearchQueryOnBackNavigation, InstantExtendedTest...
[chromium-blink-merge.git] / content / common / handle_enumerator_win.h
blob4a749e1e53377a7eab9a643cc93e03b484373769
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_HANDLE_ENUMERATOR_WIN_H_
6 #define CONTENT_COMMON_HANDLE_ENUMERATOR_WIN_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/process.h"
10 #include "base/strings/string16.h"
12 namespace content {
14 enum HandleType {
15 ProcessHandle,
16 ThreadHandle,
17 FileHandle,
18 DirectoryHandle,
19 KeyHandle,
20 WindowStationHandle,
21 DesktopHandle,
22 ServiceHandle,
23 EventHandle,
24 MutexHandle,
25 SemaphoreHandle,
26 TimerHandle,
27 NamedPipeHandle,
28 JobHandle,
29 FileMapHandle,
30 AlpcPortHandle,
31 OtherHandle
34 static HandleType StringToHandleType(const string16& type);
36 static string16 GetAccessString(HandleType handle_type, ACCESS_MASK access);
38 class HandleEnumerator : public base::RefCountedThreadSafe<HandleEnumerator> {
39 public:
40 explicit HandleEnumerator(bool all_handles):
41 all_handles_(all_handles) { }
43 void EnumerateHandles();
45 private:
46 bool all_handles_;
48 DISALLOW_COPY_AND_ASSIGN(HandleEnumerator);
51 } // namespace content
53 #endif // CONTENT_COMMON_HANDLE_ENUMERATOR_WIN_H_