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
3 // found in the LICENSE file.
5 #include "sandbox/linux/bpf_dsl/test_trap_registry.h"
7 #include "testing/gtest/include/gtest/gtest.h"
12 TestTrapRegistry::TestTrapRegistry() : map_() {}
13 TestTrapRegistry::~TestTrapRegistry() {}
15 uint16_t TestTrapRegistry::Add(TrapFnc fnc
, const void* aux
, bool safe
) {
18 const uint16_t next_id
= map_
.size() + 1;
19 return map_
.insert(std::make_pair(Key(fnc
, aux
), next_id
)).first
->second
;
22 bool TestTrapRegistry::EnableUnsafeTraps() {
23 ADD_FAILURE() << "Unimplemented";
27 } // namespace bpf_dsl
28 } // namespace sandbox