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

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

Issue 1310773006: Update sandbox/linux from upstream (Closed) Base URL: ssh://ssh.github.com/domokit/mojo.git@master
Patch Set: Update to 3909ebfa69566f7374a6900e63cd4d3c73a35378 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