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

Unified Diff: content/common/handle_enumerator.h

Issue 7888024: Move handle dumpage to the renderer process (so that it works correctly) and factor out redundant... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
Index: content/common/handle_enumerator.h
===================================================================
--- content/common/handle_enumerator.h (revision 0)
+++ content/common/handle_enumerator.h (revision 0)
@@ -0,0 +1,54 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
jam 2011/09/19 17:10:48 nit: you should "svn mv" these files so that file
Cris Neckar 2011/09/20 01:22:15 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_HANDLE_ENUMERATOR_H_
+#define CONTENT_COMMON_HANDLE_ENUMERATOR_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/process.h"
+#include "base/string16.h"
+
+namespace content {
+
+enum HandleType {
+ ProcessHandle,
+ ThreadHandle,
+ FileHandle,
+ DirectoryHandle,
+ KeyHandle,
+ WindowStationHandle,
+ DesktopHandle,
+ ServiceHandle,
+ EventHandle,
+ MutexHandle,
+ SemaphoreHandle,
+ TimerHandle,
+ NamedPipeHandle,
+ JobHandle,
+ FileMapHandle,
+ AlpcPortHandle,
+ OtherHandle
+};
+
+static HandleType StringToHandleType(const string16& type);
+
+static string16 GetAccessString(HandleType handle_type, ACCESS_MASK access);
+
+class HandleEnumerator : public base::RefCountedThreadSafe<HandleEnumerator> {
+ public:
+ explicit HandleEnumerator(bool all_handles):
+ all_handles_(all_handles) { }
+
+ void EnumerateHandles();
+
+ private:
+ bool all_handles_;
+
+ DISALLOW_COPY_AND_ASSIGN(HandleEnumerator);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_HANDLE_ENUMERATOR_H_
+

Powered by Google App Engine
This is Rietveld 408576698