Home
last modified time | relevance | path

Searched refs:ScopedResource (Results 1 – 9 of 9) sorted by relevance

/external/perfetto/include/perfetto/ext/base/
Dscoped_file.h48 class ScopedResource {
50 explicit ScopedResource(T t = InvalidValue) : t_(t) {} in t_()
51 ScopedResource(ScopedResource&& other) noexcept { in ScopedResource() function
55 ScopedResource& operator=(ScopedResource&& other) {
76 ~ScopedResource() { reset(InvalidValue); } in ~ScopedResource()
79 ScopedResource(const ScopedResource&) = delete;
80 ScopedResource& operator=(const ScopedResource&) = delete;
85 using ScopedFile = ScopedResource<int, close, -1>;
100 using ScopedDir = ScopedResource<DIR*, closedir, nullptr>;
103 using ScopedFstream = ScopedResource<FILE*, fclose, nullptr>;
/external/chromium-trace/catapult/systrace/atrace_helper/jni/
Dfile_utils.h22 struct ScopedResource { struct
23 explicit ScopedResource(RESOURCE_TYPE r) : r_(r) { CHECK(r); } in ScopedResource() argument
24 ~ScopedResource() { CLOSE_FN(r_); } in ~ScopedResource() argument
28 using ScopedFD = ScopedResource<int, close>; argument
29 using ScopedDir = ScopedResource<DIR*, closedir>;
/external/perfetto/src/perfetto_cmd/
Dpacket_writer_unittest.cc97 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
125 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
158 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
171 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
187 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
240 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
277 base::ScopedResource<FILE*, fclose, nullptr> f( in TEST()
/external/perfetto/src/trace_processor/sqlite/
Dscoped_db.h34 using ScopedDb = base::ScopedResource<sqlite3*, sqlite3_close, nullptr>;
35 using ScopedStmt = base::ScopedResource<sqlite3_stmt*,
Dquery_constraints.h58 using SqliteString = base::ScopedResource<char*, FreeSqliteString, nullptr>;
/external/perfetto/src/profiling/memory/
Dheapprofd_end_to_end_test.cc78 base::ScopedResource<std::string*, SetModeProperty, nullptr> EnableFork() { in EnableFork()
81 return base::ScopedResource<std::string*, SetModeProperty, nullptr>( in EnableFork()
85 base::ScopedResource<std::string*, SetModeProperty, nullptr> DisableFork() { in DisableFork()
88 return base::ScopedResource<std::string*, SetModeProperty, nullptr>( in DisableFork()
101 base::ScopedResource<std::string*, SetModeProperty, nullptr> EnableFork() { in EnableFork()
105 base::ScopedResource<std::string*, SetModeProperty, nullptr> DisableFork() { in DisableFork()
198 base::ScopedResource<std::string*, SetModeProperty, nullptr> fork_prop_{
Dclient.cc104 base::ScopedResource<pthread_attr_t*, pthread_attr_destroy, nullptr> cleanup( in GetThreadStackBase()
154 base::ScopedResource<int, UnsetDumpable, kNop, false> unset_dumpable(kNop); in CreateAndHandshake()
/external/perfetto/src/base/
Dwatchdog_unittest.cc131 base::ScopedResource<const struct sigaction*, RestoreSIGABRT, nullptr> in TEST()
Dunix_socket_unittest.cc697 base::ScopedResource<const struct sigaction*, RollbackSigaction, nullptr> in TEST_F()