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

Unified 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, 8 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/bpf_dsl.cc ('k') | sandbox/linux/bpf_dsl/bpf_dsl_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/bpf_dsl/bpf_dsl_forward.h
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_forward.h b/sandbox/linux/bpf_dsl/bpf_dsl_forward.h
index 183038990a8be40bfb1b9a8477e79fa8bec30115..10477c9b311115d71d7e2356777ca92164cbfa45 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl_forward.h
+++ b/sandbox/linux/bpf_dsl/bpf_dsl_forward.h
@@ -5,7 +5,8 @@
#ifndef SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
#define SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
-#include "base/memory/ref_counted.h"
+#include <memory>
+
#include "sandbox/sandbox_export.h"
namespace sandbox {
@@ -20,8 +21,8 @@ class ResultExprImpl;
class BoolExprImpl;
}
-typedef scoped_refptr<const internal::ResultExprImpl> ResultExpr;
-typedef scoped_refptr<const internal::BoolExprImpl> BoolExpr;
+using ResultExpr = std::shared_ptr<const internal::ResultExprImpl>;
+using BoolExpr = std::shared_ptr<const internal::BoolExprImpl>;
template <typename T>
class Arg;
@@ -34,9 +35,11 @@ class Caser;
} // namespace bpf_dsl
} // namespace sandbox
+namespace std {
extern template class SANDBOX_EXPORT
- scoped_refptr<const sandbox::bpf_dsl::internal::BoolExprImpl>;
+ shared_ptr<const sandbox::bpf_dsl::internal::BoolExprImpl>;
extern template class SANDBOX_EXPORT
- scoped_refptr<const sandbox::bpf_dsl::internal::ResultExprImpl>;
+ shared_ptr<const sandbox::bpf_dsl::internal::ResultExprImpl>;
+} // namespace std
#endif // SANDBOX_LINUX_BPF_DSL_BPF_DSL_FORWARD_H_
« 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