OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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. | |
4 | |
5 #include "base/process/process_handle.h" | |
6 | |
7 #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.
| |
8 | |
9 namespace base { | |
10 | |
11 namespace { | |
12 uint32 g_unique_id = kInvalidUniqueId; | |
13 } // namespace | |
14 | |
15 uint32 GetUniqueIdForProcess() { | |
16 if (g_unique_id == kInvalidUniqueId) { | |
17 return static_cast<uint32>(GetCurrentProcId()); | |
18 } | |
19 | |
20 return g_unique_id; | |
21 } | |
22 | |
23 void SetUniqueIdForProcess(uint32 unique_id) { | |
24 g_unique_id = unique_id; | |
25 } | |
26 | |
27 } // namespace base | |
OLD | NEW |