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

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

Issue 1292753009: sandbox/linux: move ErrorCode into bpf_dsl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bpf_dsl-deps
Patch Set: Rebase and cleanup test code Created 5 years, 4 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
(Empty)
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.
4
5 #include "sandbox/linux/bpf_dsl/test_trap_registry.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace sandbox {
10 namespace bpf_dsl {
11
12 TestTrapRegistry::TestTrapRegistry() : map_() {}
13 TestTrapRegistry::~TestTrapRegistry() {}
14
15 uint16_t TestTrapRegistry::Add(TrapFnc fnc, const void* aux, bool safe) {
16 EXPECT_TRUE(safe);
17
18 const uint16_t next_id = map_.size() + 1;
19 return map_.insert(std::make_pair(Key(fnc, aux), next_id)).first->second;
20 }
21
22 bool TestTrapRegistry::EnableUnsafeTraps() {
23 ADD_FAILURE() << "Unimplemented";
24 return false;
25 }
26
27 } // namespace bpf_dsl
28 } // 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