Fix some lint errors in url_request_context_adapter
[chromium-blink-merge.git] / sandbox / linux / bpf_dsl / bpf_dsl_impl.h
blob1772c39d03c97e6c515a38979ce22ef651cb5dc0
1 // Copyright 2014 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 #ifndef SANDBOX_LINUX_BPF_DSL_BPF_DSL_IMPL_H_
6 #define SANDBOX_LINUX_BPF_DSL_BPF_DSL_IMPL_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "sandbox/sandbox_export.h"
12 namespace sandbox {
13 class ErrorCode;
14 class SandboxBPF;
16 namespace bpf_dsl {
17 namespace internal {
19 // Internal interface implemented by BoolExpr implementations.
20 class BoolExprImpl : public base::RefCounted<BoolExprImpl> {
21 public:
22 BoolExprImpl() {}
23 virtual ErrorCode Compile(SandboxBPF* sb,
24 ErrorCode true_ec,
25 ErrorCode false_ec) const = 0;
27 protected:
28 virtual ~BoolExprImpl() {}
30 private:
31 friend class base::RefCounted<BoolExprImpl>;
32 DISALLOW_COPY_AND_ASSIGN(BoolExprImpl);
35 // Internal interface implemented by ResultExpr implementations.
36 class ResultExprImpl : public base::RefCounted<ResultExprImpl> {
37 public:
38 ResultExprImpl() {}
39 virtual ErrorCode Compile(SandboxBPF* sb) const = 0;
40 virtual bool HasUnsafeTraps() const;
42 protected:
43 virtual ~ResultExprImpl() {}
45 private:
46 friend class base::RefCounted<ResultExprImpl>;
47 DISALLOW_COPY_AND_ASSIGN(ResultExprImpl);
50 } // namespace internal
51 } // namespace bpf_dsl
52 } // namespace sandbox
54 #endif // SANDBOX_LINUX_BPF_DSL_BPF_DSL_IMPL_H_