Index: base/process/process_handle.cc |
diff --git a/base/process/process_handle.cc b/base/process/process_handle.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..676095926fb6bef3dac82bfde80f90643b5e7f16 |
--- /dev/null |
+++ b/base/process/process_handle.cc |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2013 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/process/process_handle.h" |
+ |
+#include <unistd.h> |
mdempsky
2015/06/15 21:53:09
I don't see any use of unistd.h? (I also don't th
rickyz (no longer on Chrome)
2015/06/15 22:09:46
Oops, removed.
|
+ |
+namespace base { |
+ |
+namespace { |
+uint32 g_unique_id = kInvalidUniqueId; |
+} // namespace |
+ |
+uint32 GetUniqueIdForProcess() { |
+ if (g_unique_id == kInvalidUniqueId) { |
+ return static_cast<uint32>(GetCurrentProcId()); |
+ } |
+ |
+ return g_unique_id; |
+} |
+ |
+void SetUniqueIdForProcess(uint32 unique_id) { |
+ g_unique_id = unique_id; |
+} |
+ |
+} // namespace base |