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

Side by Side Diff: sandbox/linux/bpf_dsl/bpf_dsl_forward.h

Issue 1892783002: bpf_dsl: replace scoped_refptr with std::shared_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix asan build Created 4 years, 7 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
« no previous file with comments | « sandbox/linux/bpf_dsl/bpf_dsl.cc ('k') | sandbox/linux/bpf_dsl/bpf_dsl_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_ 5 #ifndef SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
6 #define SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_ 6 #define SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include <memory>
9
9 #include "sandbox/sandbox_export.h" 10 #include "sandbox/sandbox_export.h"
10 11
11 namespace sandbox { 12 namespace sandbox {
12 namespace bpf_dsl { 13 namespace bpf_dsl {
13 14
14 // The bpf_dsl_forward.h header provides forward declarations for the 15 // The bpf_dsl_forward.h header provides forward declarations for the
15 // types defined in bpf_dsl.h. It's intended for use in user headers 16 // types defined in bpf_dsl.h. It's intended for use in user headers
16 // that need to reference bpf_dsl types, but don't require definitions. 17 // that need to reference bpf_dsl types, but don't require definitions.
17 18
18 namespace internal { 19 namespace internal {
19 class ResultExprImpl; 20 class ResultExprImpl;
20 class BoolExprImpl; 21 class BoolExprImpl;
21 } 22 }
22 23
23 typedef scoped_refptr<const internal::ResultExprImpl> ResultExpr; 24 using ResultExpr = std::shared_ptr<const internal::ResultExprImpl>;
24 typedef scoped_refptr<const internal::BoolExprImpl> BoolExpr; 25 using BoolExpr = std::shared_ptr<const internal::BoolExprImpl>;
25 26
26 template <typename T> 27 template <typename T>
27 class Arg; 28 class Arg;
28 29
29 class Elser; 30 class Elser;
30 31
31 template <typename T> 32 template <typename T>
32 class Caser; 33 class Caser;
33 34
34 } // namespace bpf_dsl 35 } // namespace bpf_dsl
35 } // namespace sandbox 36 } // namespace sandbox
36 37
38 namespace std {
37 extern template class SANDBOX_EXPORT 39 extern template class SANDBOX_EXPORT
38 scoped_refptr<const sandbox::bpf_dsl::internal::BoolExprImpl>; 40 shared_ptr<const sandbox::bpf_dsl::internal::BoolExprImpl>;
39 extern template class SANDBOX_EXPORT 41 extern template class SANDBOX_EXPORT
40 scoped_refptr<const sandbox::bpf_dsl::internal::ResultExprImpl>; 42 shared_ptr<const sandbox::bpf_dsl::internal::ResultExprImpl>;
43 } // namespace std
41 44
42 #endif // SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_ 45 #endif // SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/bpf_dsl.cc ('k') | sandbox/linux/bpf_dsl/bpf_dsl_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698