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

Side by Side Diff: sandbox/linux/bpf_dsl/test_trap_registry.h

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_ 5 #ifndef SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_
6 #define SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_ 6 #define SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/macros.h"
13 #include "sandbox/linux/bpf_dsl/trap_registry.h" 14 #include "sandbox/linux/bpf_dsl/trap_registry.h"
14 15
15 namespace sandbox { 16 namespace sandbox {
16 namespace bpf_dsl { 17 namespace bpf_dsl {
17 18
18 class TestTrapRegistry : public TrapRegistry { 19 class TestTrapRegistry : public TrapRegistry {
19 public: 20 public:
20 TestTrapRegistry(); 21 TestTrapRegistry();
21 virtual ~TestTrapRegistry(); 22 virtual ~TestTrapRegistry();
22 23
23 uint16_t Add(TrapFnc fnc, const void* aux, bool safe) override; 24 uint16_t Add(TrapFnc fnc, const void* aux, bool safe) override;
24 bool EnableUnsafeTraps() override; 25 bool EnableUnsafeTraps() override;
25 26
26 private: 27 private:
27 using Key = std::pair<TrapFnc, const void*>; 28 using Key = std::pair<TrapFnc, const void*>;
28 29
29 std::map<Key, uint16_t> map_; 30 std::map<Key, uint16_t> map_;
30 31
31 DISALLOW_COPY_AND_ASSIGN(TestTrapRegistry); 32 DISALLOW_COPY_AND_ASSIGN(TestTrapRegistry);
32 }; 33 };
33 34
34 } // namespace bpf_dsl 35 } // namespace bpf_dsl
35 } // namespace sandbox 36 } // namespace sandbox
36 37
37 #endif // SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_ 38 #endif // SANDBOX_LINUX_BPF_DSL_TEST_TRAP_REGISTRY_H_
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/syscall_set_unittest.cc ('k') | sandbox/linux/bpf_dsl/test_trap_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698