base, net: Fix disabling tracing

This commit is contained in:
klzgrad 2024-10-07 15:57:25 +08:00
parent 43de46832a
commit 5f03b61ace
3 changed files with 8 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#include <string> #include <string>
#include "base/trace_event/memory_usage_estimator.h"
#include "base/trace_event/trace_event_stub.h" #include "base/trace_event/trace_event_stub.h"
namespace base { namespace base {
@ -20,6 +21,9 @@ MemoryDumpProvider::~MemoryDumpProvider() = default;
// static // static
constexpr const char* const MemoryDumpManager::kTraceCategory; constexpr const char* const MemoryDumpManager::kTraceCategory;
template size_t EstimateMemoryUsage(const std::string&);
template size_t EstimateMemoryUsage(const std::u16string&);
} // namespace trace_event } // namespace trace_event
} // namespace base } // namespace base

View File

@ -12,9 +12,9 @@
#ifndef NET_BASE_TRACE_EVENT_STUB_H_ #ifndef NET_BASE_TRACE_EVENT_STUB_H_
#define NET_BASE_TRACE_EVENT_STUB_H_ #define NET_BASE_TRACE_EVENT_STUB_H_
#import "base/base_export.h" #include "base/base_export.h"
#import "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#import "base/trace_event/trace_event_stub.h" #include "base/trace_event/trace_event_stub.h"
namespace base::trace_event { namespace base::trace_event {

View File

@ -8,7 +8,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "net/base/cronet_buildflags.h" #include "net/base/cronet_buildflags.h"
#if BUILDFLAG(CRONET_BUILD) && !BUILDFLAG(IS_APPLE) #if BUILDFLAG(CRONET_BUILD)
#include "net/base/trace_event_stub.h" // IWYU pragma: export #include "net/base/trace_event_stub.h" // IWYU pragma: export
#endif // BUILDFLAG(CRONET_BUILD) && !BUILDFLAG(IS_APPLE) #endif // BUILDFLAG(CRONET_BUILD) && !BUILDFLAG(IS_APPLE)