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

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

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

Powered by Google App Engine
This is Rietveld 408576698