cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / sandbox / linux / bpf_dsl / test_trap_registry.cc
blobeaf8e3440bc351984bca7d44f00e5beb87c9264e
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"
9 namespace sandbox {
10 namespace bpf_dsl {
12 TestTrapRegistry::TestTrapRegistry() : map_() {}
13 TestTrapRegistry::~TestTrapRegistry() {}
15 uint16_t TestTrapRegistry::Add(TrapFnc fnc, const void* aux, bool safe) {
16 EXPECT_TRUE(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";
24 return false;
27 } // namespace bpf_dsl
28 } // namespace sandbox