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

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

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 4 years, 12 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 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 #include "sandbox/linux/bpf_dsl/test_trap_registry.h" 5 #include "sandbox/linux/bpf_dsl/test_trap_registry.h"
6 6
7 #include <stdint.h>
8
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace sandbox { 11 namespace sandbox {
10 namespace bpf_dsl { 12 namespace bpf_dsl {
11 13
12 TestTrapRegistry::TestTrapRegistry() : map_() {} 14 TestTrapRegistry::TestTrapRegistry() : map_() {}
13 TestTrapRegistry::~TestTrapRegistry() {} 15 TestTrapRegistry::~TestTrapRegistry() {}
14 16
15 uint16_t TestTrapRegistry::Add(TrapFnc fnc, const void* aux, bool safe) { 17 uint16_t TestTrapRegistry::Add(TrapFnc fnc, const void* aux, bool safe) {
16 EXPECT_TRUE(safe); 18 EXPECT_TRUE(safe);
17 19
18 const uint16_t next_id = map_.size() + 1; 20 const uint16_t next_id = map_.size() + 1;
19 return map_.insert(std::make_pair(Key(fnc, aux), next_id)).first->second; 21 return map_.insert(std::make_pair(Key(fnc, aux), next_id)).first->second;
20 } 22 }
21 23
22 bool TestTrapRegistry::EnableUnsafeTraps() { 24 bool TestTrapRegistry::EnableUnsafeTraps() {
23 ADD_FAILURE() << "Unimplemented"; 25 ADD_FAILURE() << "Unimplemented";
24 return false; 26 return false;
25 } 27 }
26 28
27 } // namespace bpf_dsl 29 } // namespace bpf_dsl
28 } // namespace sandbox 30 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/test_trap_registry.h ('k') | sandbox/linux/bpf_dsl/test_trap_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698