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

Unified Diff: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/BUILD.gn ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
index c56c81911fa83936e8c2e8b4fd383d5c99080ec9..b3d9126bdb90700698f6c69bc775508f50b73caa 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc
@@ -759,26 +759,29 @@ class InitializedOpenBroker {
allowed_files.push_back("/proc/allowed");
allowed_files.push_back("/proc/cpuinfo");
- broker_process_.reset(
- new BrokerProcess(EPERM, allowed_files, std::vector<std::string>()));
+ broker_process_.reset(new syscall_broker::BrokerProcess(
+ EPERM, allowed_files, std::vector<std::string>()));
BPF_ASSERT(broker_process() != NULL);
BPF_ASSERT(broker_process_->Init(base::Bind(&NoOpCallback)));
initialized_ = true;
}
bool initialized() { return initialized_; }
- class BrokerProcess* broker_process() { return broker_process_.get(); }
+ class syscall_broker::BrokerProcess* broker_process() {
+ return broker_process_.get();
+ }
private:
bool initialized_;
- scoped_ptr<class BrokerProcess> broker_process_;
+ scoped_ptr<class syscall_broker::BrokerProcess> broker_process_;
DISALLOW_COPY_AND_ASSIGN(InitializedOpenBroker);
};
intptr_t BrokerOpenTrapHandler(const struct arch_seccomp_data& args,
void* aux) {
BPF_ASSERT(aux);
- BrokerProcess* broker_process = static_cast<BrokerProcess*>(aux);
+ syscall_broker::BrokerProcess* broker_process =
+ static_cast<syscall_broker::BrokerProcess*>(aux);
switch (args.nr) {
case __NR_faccessat: // access is a wrapper of faccessat in android
BPF_ASSERT(static_cast<int>(args.args[0]) == AT_FDCWD);
@@ -824,7 +827,7 @@ class DenyOpenPolicy : public Policy {
#endif
case __NR_openat:
// We get a InitializedOpenBroker class, but our trap handler wants
- // the BrokerProcess object.
+ // the syscall_broker::BrokerProcess object.
return Trap(BrokerOpenTrapHandler, iob_->broker_process());
default:
return Allow();
@@ -844,7 +847,7 @@ BPF_TEST(SandboxBPF,
DenyOpenPolicy,
InitializedOpenBroker /* (*BPF_AUX) */) {
BPF_ASSERT(BPF_AUX->initialized());
- BrokerProcess* broker_process = BPF_AUX->broker_process();
+ syscall_broker::BrokerProcess* broker_process = BPF_AUX->broker_process();
BPF_ASSERT(broker_process != NULL);
// First, use the broker "manually"
« no previous file with comments | « sandbox/linux/BUILD.gn ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698