OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // TransientDeviceIds keep track of transient IDs for removable devices, so | 5 // TransientDeviceIds keep track of transient IDs for removable devices, so |
6 // persistent device IDs are not exposed to renderers. Once a removable device | 6 // persistent device IDs are not exposed to renderers. Once a removable device |
7 // gets mapped to a transient ID, the mapping remains valid for the duration of | 7 // gets mapped to a transient ID, the mapping remains valid for the duration of |
8 // TransientDeviceIds' lifetime. | 8 // TransientDeviceIds' lifetime. |
9 | 9 |
10 #ifndef CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_ | 10 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_TRANSIENT_DEVICE_IDS_H_ |
11 #define CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_ | 11 #define CHROME_BROWSER_SYSTEM_MONITOR_TRANSIENT_DEVICE_IDS_H_ |
12 | 12 |
13 #include <map> | 13 #include <map> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
18 | 18 |
19 namespace chrome { | 19 namespace chrome { |
20 | 20 |
21 class TransientDeviceIds { | 21 class TransientDeviceIds { |
(...skipping 13 matching lines...) Expand all Loading... |
35 DeviceIdToTransientIdMap id_map_; | 35 DeviceIdToTransientIdMap id_map_; |
36 uint64 next_transient_id_; | 36 uint64 next_transient_id_; |
37 | 37 |
38 base::ThreadChecker thread_checker_; | 38 base::ThreadChecker thread_checker_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(TransientDeviceIds); | 40 DISALLOW_COPY_AND_ASSIGN(TransientDeviceIds); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace chrome | 43 } // namespace chrome |
44 | 44 |
45 #endif // CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_ | 45 #endif // CHROME_BROWSER_SYSTEM_MONITOR_TRANSIENT_DEVICE_IDS_H_ |
OLD | NEW |