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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/bpf_dsl/test_trap_registry.cc
diff --git a/sandbox/linux/bpf_dsl/test_trap_registry.cc b/sandbox/linux/bpf_dsl/test_trap_registry.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eaf8e3440bc351984bca7d44f00e5beb87c9264e
--- /dev/null
+++ b/sandbox/linux/bpf_dsl/test_trap_registry.cc
@@ -0,0 +1,28 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sandbox/linux/bpf_dsl/test_trap_registry.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace sandbox {
+namespace bpf_dsl {
+
+TestTrapRegistry::TestTrapRegistry() : map_() {}
+TestTrapRegistry::~TestTrapRegistry() {}
+
+uint16_t TestTrapRegistry::Add(TrapFnc fnc, const void* aux, bool safe) {
+ EXPECT_TRUE(safe);
+
+ const uint16_t next_id = map_.size() + 1;
+ return map_.insert(std::make_pair(Key(fnc, aux), next_id)).first->second;
+}
+
+bool TestTrapRegistry::EnableUnsafeTraps() {
+ ADD_FAILURE() << "Unimplemented";
+ return false;
+}
+
+} // namespace bpf_dsl
+} // namespace sandbox
« 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