diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/instrumentation')
13 files changed, 118 insertions, 117 deletions
diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/BUILD.gn b/chromium/third_party/blink/renderer/platform/instrumentation/BUILD.gn index 814c58d21ff..b1837098104 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/BUILD.gn +++ b/chromium/third_party/blink/renderer/platform/instrumentation/BUILD.gn @@ -5,8 +5,6 @@ import("//third_party/blink/renderer/platform/platform.gni") blink_platform_sources("instrumentation") { - configs += [ "//build/config/compiler:noshadowing" ] - sources = [ "canvas_memory_dump_provider.cc", "canvas_memory_dump_provider.h", @@ -57,6 +55,7 @@ source_set("unit_tests") { deps = [ "//base", + "//base/allocator:buildflags", "//base/test:test_support", "//testing/gmock", "//testing/gtest", diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/canvas_memory_dump_provider.h b/chromium/third_party/blink/renderer/platform/instrumentation/canvas_memory_dump_provider.h index 809f97a6eaa..9aadd7b305c 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/canvas_memory_dump_provider.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/canvas_memory_dump_provider.h @@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_CANVAS_MEMORY_DUMP_PROVIDER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_CANVAS_MEMORY_DUMP_PROVIDER_H_ -#include "base/macros.h" #include "base/synchronization/lock.h" #include "base/trace_event/memory_dump_provider.h" #include "third_party/blink/renderer/platform/platform_export.h" @@ -28,6 +27,8 @@ class PLATFORM_EXPORT CanvasMemoryDumpProvider final public: static CanvasMemoryDumpProvider* Instance(); + CanvasMemoryDumpProvider(const CanvasMemoryDumpProvider&) = delete; + CanvasMemoryDumpProvider& operator=(const CanvasMemoryDumpProvider&) = delete; ~CanvasMemoryDumpProvider() override = default; // MemoryDumpProvider implementation. @@ -42,8 +43,6 @@ class PLATFORM_EXPORT CanvasMemoryDumpProvider final base::Lock lock_; WTF::HashSet<CanvasMemoryDumpClient*> clients_ GUARDED_BY(lock_); - - DISALLOW_COPY_AND_ASSIGN(CanvasMemoryDumpProvider); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/instance_counters_memory_dump_provider.h b/chromium/third_party/blink/renderer/platform/instrumentation/instance_counters_memory_dump_provider.h index 76f1d6388fe..f99e609fedd 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/instance_counters_memory_dump_provider.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/instance_counters_memory_dump_provider.h @@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_INSTANCE_COUNTERS_MEMORY_DUMP_PROVIDER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_INSTANCE_COUNTERS_MEMORY_DUMP_PROVIDER_H_ -#include "base/macros.h" #include "base/trace_event/memory_dump_provider.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" @@ -18,6 +17,10 @@ class PLATFORM_EXPORT InstanceCountersMemoryDumpProvider final public: static InstanceCountersMemoryDumpProvider* Instance(); + InstanceCountersMemoryDumpProvider( + const InstanceCountersMemoryDumpProvider&) = delete; + InstanceCountersMemoryDumpProvider& operator=( + const InstanceCountersMemoryDumpProvider&) = delete; ~InstanceCountersMemoryDumpProvider() override = default; // MemoryDumpProvider implementation. @@ -26,8 +29,6 @@ class PLATFORM_EXPORT InstanceCountersMemoryDumpProvider final private: InstanceCountersMemoryDumpProvider() = default; - - DISALLOW_COPY_AND_ASSIGN(InstanceCountersMemoryDumpProvider); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.h b/chromium/third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.h index 87c95698569..f0bf64922c0 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.h @@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_MEMORY_PRESSURE_LISTENER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_MEMORY_PRESSURE_LISTENER_H_ -#include "base/macros.h" #include "base/memory/memory_pressure_listener.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/platform_export.h" @@ -49,6 +48,10 @@ class PLATFORM_EXPORT MemoryPressureListenerRegistry final static void Initialize(); MemoryPressureListenerRegistry(); + MemoryPressureListenerRegistry(const MemoryPressureListenerRegistry&) = + delete; + MemoryPressureListenerRegistry& operator=( + const MemoryPressureListenerRegistry&) = delete; void RegisterThread(Thread*) LOCKS_EXCLUDED(threads_mutex_); void UnregisterThread(Thread*) LOCKS_EXCLUDED(threads_mutex_); @@ -74,8 +77,6 @@ class PLATFORM_EXPORT MemoryPressureListenerRegistry final HeapHashSet<WeakMember<MemoryPressureListener>> clients_; HashSet<Thread*> threads_ GUARDED_BY(threads_mutex_); Mutex threads_mutex_; - - DISALLOW_COPY_AND_ASSIGN(MemoryPressureListenerRegistry); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.h b/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.h index b5918c462e3..0748e6cc18f 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.h @@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_PARTITION_ALLOC_MEMORY_DUMP_PROVIDER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_PARTITION_ALLOC_MEMORY_DUMP_PROVIDER_H_ -#include "base/macros.h" #include "base/trace_event/memory_dump_provider.h" #include "third_party/blink/renderer/platform/platform_export.h" @@ -18,6 +17,10 @@ class PLATFORM_EXPORT PartitionAllocMemoryDumpProvider final public: static PartitionAllocMemoryDumpProvider* Instance(); + PartitionAllocMemoryDumpProvider(const PartitionAllocMemoryDumpProvider&) = + delete; + PartitionAllocMemoryDumpProvider& operator=( + const PartitionAllocMemoryDumpProvider&) = delete; ~PartitionAllocMemoryDumpProvider() override; // MemoryDumpProvider implementation. @@ -26,8 +29,6 @@ class PLATFORM_EXPORT PartitionAllocMemoryDumpProvider final private: PartitionAllocMemoryDumpProvider(); - - DISALLOW_COPY_AND_ASSIGN(PartitionAllocMemoryDumpProvider); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider_test.cc b/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider_test.cc index 7010e7b6d75..eb9c52c85a7 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider_test.cc +++ b/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider_test.cc @@ -4,6 +4,8 @@ #include "third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.h" +#include "base/allocator/buildflags.h" +#include "base/allocator/partition_allocator/partition_alloc_config.h" #include "base/test/metrics/histogram_tester.h" #include "base/trace_event/process_memory_dump.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/resource_coordinator/document_resource_coordinator.h b/chromium/third_party/blink/renderer/platform/instrumentation/resource_coordinator/document_resource_coordinator.h index f7214d58e1f..b5f655fe487 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/resource_coordinator/document_resource_coordinator.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/resource_coordinator/document_resource_coordinator.h @@ -7,7 +7,6 @@ #include <memory> -#include "base/macros.h" #include "components/performance_manager/public/mojom/coordination_unit.mojom-blink.h" #include "mojo/public/cpp/bindings/remote.h" #include "third_party/blink/renderer/platform/platform_export.h" @@ -29,6 +28,9 @@ class PLATFORM_EXPORT DocumentResourceCoordinator final { // Returns nullptr if instrumentation is not enabled. static std::unique_ptr<DocumentResourceCoordinator> MaybeCreate( const BrowserInterfaceBrokerProxy&); + DocumentResourceCoordinator(const DocumentResourceCoordinator&) = delete; + DocumentResourceCoordinator& operator=(const DocumentResourceCoordinator&) = + delete; ~DocumentResourceCoordinator(); void SetNetworkAlmostIdle(); @@ -49,8 +51,6 @@ class PLATFORM_EXPORT DocumentResourceCoordinator final { service_; bool had_form_interaction_ = false; - - DISALLOW_COPY_AND_ASSIGN(DocumentResourceCoordinator); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/memory_cache_dump_provider.h b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/memory_cache_dump_provider.h index 32e5523a9d0..f5b75d76781 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/memory_cache_dump_provider.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/memory_cache_dump_provider.h @@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_TRACING_MEMORY_CACHE_DUMP_PROVIDER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_TRACING_MEMORY_CACHE_DUMP_PROVIDER_H_ -#include "base/macros.h" #include "base/trace_event/memory_dump_provider.h" #include "base/trace_event/process_memory_dump.h" #include "third_party/blink/renderer/platform/heap/handle.h" @@ -34,6 +33,8 @@ class PLATFORM_EXPORT MemoryCacheDumpProvider final public: // This class is singleton since there is a global MemoryCache object. static MemoryCacheDumpProvider* Instance(); + MemoryCacheDumpProvider(const MemoryCacheDumpProvider&) = delete; + MemoryCacheDumpProvider& operator=(const MemoryCacheDumpProvider&) = delete; ~MemoryCacheDumpProvider() override; // base::trace_event::MemoryDumpProvider implementation. @@ -49,8 +50,6 @@ class PLATFORM_EXPORT MemoryCacheDumpProvider final MemoryCacheDumpProvider(); WeakPersistent<MemoryCacheDumpClient> client_; - - DISALLOW_COPY_AND_ASSIGN(MemoryCacheDumpProvider); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h index effbd5f6857..92647a6d04e 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h @@ -8,7 +8,6 @@ #include <memory> #include <string> -#include "base/macros.h" #include "base/trace_event/traced_value.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -20,6 +19,8 @@ class PLATFORM_EXPORT TracedValue : public base::trace_event::ConvertableToTraceFormat { public: TracedValue(); + TracedValue(const TracedValue&) = delete; + TracedValue& operator=(const TracedValue&) = delete; ~TracedValue() override; void EndDictionary(); @@ -59,8 +60,6 @@ class PLATFORM_EXPORT TracedValue bool AppendToProto(ProtoAppender* appender) final; void EstimateTraceMemoryOverhead( base::trace_event::TraceEventMemoryOverhead*) final; - - DISALLOW_COPY_AND_ASSIGN(TracedValue); }; // Thin wrapper around base::trace_event::TracedValueJSON. diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value_test.cc b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value_test.cc index d2043f9dd04..c4030c75404 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value_test.cc +++ b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/traced_value_test.cc @@ -25,17 +25,16 @@ TEST(TracedValueTest, FlatDictionary) { value->SetStringWithCopiedName("string", "string"); absl::optional<base::Value> parsed = ParseTracedValue(std::move(value)); - base::DictionaryValue* dictionary; - ASSERT_TRUE(parsed->GetAsDictionary(&dictionary)); - int int_value; - EXPECT_TRUE(dictionary->GetInteger("int", &int_value)); - EXPECT_EQ(2014, int_value); - double double_value; - EXPECT_TRUE(dictionary->GetDouble("double", &double_value)); - EXPECT_EQ(0.0, double_value); - std::string string_value; - EXPECT_TRUE(dictionary->GetString("string", &string_value)); - EXPECT_EQ("string", string_value); + ASSERT_TRUE(parsed->is_dict()); + absl::optional<int> int_value = parsed->FindIntKey("int"); + ASSERT_TRUE(int_value.has_value()); + EXPECT_EQ(2014, *int_value); + absl::optional<double> double_value = parsed->FindDoubleKey("double"); + ASSERT_TRUE(double_value.has_value()); + EXPECT_EQ(0.0, *double_value); + std::string* string_value = parsed->FindStringKey("string"); + ASSERT_NE(nullptr, string_value); + EXPECT_EQ("string", *string_value); } TEST(TracedValueTest, Hierarchy) { @@ -60,42 +59,43 @@ TEST(TracedValueTest, Hierarchy) { value->SetStringWithCopiedName("s0", "foo"); absl::optional<base::Value> parsed = ParseTracedValue(std::move(value)); - base::DictionaryValue* dictionary; - ASSERT_TRUE(parsed->GetAsDictionary(&dictionary)); - int i0; - EXPECT_TRUE(dictionary->GetInteger("i0", &i0)); - EXPECT_EQ(2014, i0); - int i1; - EXPECT_TRUE(dictionary->GetInteger("dict1.i1", &i1)); - EXPECT_EQ(2014, i1); - bool b2; - EXPECT_TRUE(dictionary->GetBoolean("dict1.dict2.b2", &b2)); - EXPECT_FALSE(b2); - std::string s1; - EXPECT_TRUE(dictionary->GetString("dict1.s1", &s1)); - EXPECT_EQ("foo", s1); - double d0; - EXPECT_TRUE(dictionary->GetDouble("d0", &d0)); - EXPECT_EQ(0.0, d0); - bool b0; - EXPECT_TRUE(dictionary->GetBoolean("b0", &b0)); - EXPECT_TRUE(b0); - base::ListValue* a1; - EXPECT_TRUE(dictionary->GetList("a1", &a1)); - int a1i0; - EXPECT_TRUE(a1->GetInteger(0, &a1i0)); - EXPECT_EQ(1, a1i0); - bool a1b1; - EXPECT_TRUE(a1->GetBoolean(1, &a1b1)); - EXPECT_TRUE(a1b1); - base::DictionaryValue* a1d2; - EXPECT_TRUE(a1->GetDictionary(2, &a1d2)); - int i2; - EXPECT_TRUE(a1d2->GetInteger("i2", &i2)); - EXPECT_EQ(3, i2); - std::string s0; - EXPECT_TRUE(dictionary->GetString("s0", &s0)); - EXPECT_EQ("foo", s0); + ASSERT_TRUE(parsed->is_dict()); + absl::optional<int> i0 = parsed->FindIntKey("i0"); + ASSERT_TRUE(i0.has_value()); + EXPECT_EQ(2014, *i0); + absl::optional<int> i1 = parsed->FindIntPath("dict1.i1"); + ASSERT_TRUE(i1.has_value()); + EXPECT_EQ(2014, *i1); + absl::optional<bool> b2 = parsed->FindBoolPath("dict1.dict2.b2"); + ASSERT_TRUE(b2.has_value()); + EXPECT_FALSE(*b2); + std::string* s1 = parsed->FindStringPath("dict1.s1"); + ASSERT_NE(nullptr, s1); + EXPECT_EQ("foo", *s1); + absl::optional<double> d0 = parsed->FindDoubleKey("d0"); + ASSERT_TRUE(d0.has_value()); + EXPECT_EQ(0.0, *d0); + absl::optional<bool> b0 = parsed->FindBoolKey("b0"); + ASSERT_TRUE(b0.has_value()); + EXPECT_TRUE(*b0); + base::Value* a1_value = parsed->FindListKey("a1"); + ASSERT_NE(nullptr, a1_value); + ASSERT_TRUE(a1_value->is_list()); + base::Value::ListView a1 = a1_value->GetList(); + absl::optional<int> a1i0 = a1[0].GetIfInt(); + ASSERT_TRUE(a1i0.has_value()); + EXPECT_EQ(1, *a1i0); + absl::optional<bool> a1b1 = a1[1].GetIfBool(); + ASSERT_TRUE(a1b1.has_value()); + EXPECT_TRUE(*a1b1); + const base::Value& a1d2 = a1[2]; + ASSERT_TRUE(a1d2.is_dict()); + absl::optional<int> i2 = a1d2.FindIntKey("i2"); + ASSERT_TRUE(i2.has_value()); + EXPECT_EQ(3, *i2); + std::string* s0 = parsed->FindStringKey("s0"); + ASSERT_NE(nullptr, s0); + EXPECT_EQ("foo", *s0); } TEST(TracedValueTest, Escape) { @@ -107,23 +107,22 @@ TEST(TracedValueTest, Escape) { value->SetStringWithCopiedName("\"s4\"", "value4"); absl::optional<base::Value> parsed = ParseTracedValue(std::move(value)); - base::DictionaryValue* dictionary; - ASSERT_TRUE(parsed->GetAsDictionary(&dictionary)); - std::string s0; - EXPECT_TRUE(dictionary->GetString("s0", &s0)); - EXPECT_EQ("value0\\", s0); - std::string s1; - EXPECT_TRUE(dictionary->GetString("s1", &s1)); - EXPECT_EQ("value\n1", s1); - std::string s2; - EXPECT_TRUE(dictionary->GetString("s2", &s2)); - EXPECT_EQ("\"value2\"", s2); - std::string s3; - EXPECT_TRUE(dictionary->GetString("s3\\", &s3)); - EXPECT_EQ("value3", s3); - std::string s4; - EXPECT_TRUE(dictionary->GetString("\"s4\"", &s4)); - EXPECT_EQ("value4", s4); + ASSERT_TRUE(parsed->is_dict()); + std::string* s0 = parsed->FindStringKey("s0"); + ASSERT_NE(nullptr, s0); + EXPECT_EQ("value0\\", *s0); + std::string* s1 = parsed->FindStringKey("s1"); + ASSERT_NE(nullptr, s1); + EXPECT_EQ("value\n1", *s1); + std::string* s2 = parsed->FindStringKey("s2"); + ASSERT_NE(nullptr, s2); + EXPECT_EQ("\"value2\"", *s2); + std::string* s3 = parsed->FindStringKey("s3\\"); + ASSERT_NE(nullptr, s3); + EXPECT_EQ("value3", *s3); + std::string* s4 = parsed->FindStringKey("\"s4\""); + ASSERT_NE(nullptr, s4); + EXPECT_EQ("value4", *s4); } TEST(TracedValueTest, NonCopiedNames) { @@ -143,27 +142,28 @@ TEST(TracedValueTest, NonCopiedNames) { value->EndArray(); absl::optional<base::Value> parsed = ParseTracedValue(std::move(value)); - base::DictionaryValue* dictionary; - ASSERT_TRUE(parsed->GetAsDictionary(&dictionary)); - int int_value; - EXPECT_TRUE(dictionary->GetInteger(int_str, &int_value)); - EXPECT_EQ(2014, int_value); - double double_value; - EXPECT_TRUE(dictionary->GetDouble(double_str, &double_value)); - EXPECT_EQ(0.0, double_value); - bool bool_value; - EXPECT_TRUE(dictionary->GetBoolean(bool_str, &bool_value)); - EXPECT_TRUE(bool_value); - std::string string_value; - EXPECT_TRUE(dictionary->GetString(string_str, &string_value)); - EXPECT_EQ("string", string_value); - base::ListValue* a1; - EXPECT_TRUE(dictionary->GetList(array_str, &a1)); - int el0, el1; - EXPECT_TRUE(a1->GetInteger(0, &el0)); - EXPECT_TRUE(a1->GetInteger(1, &el1)); - EXPECT_EQ(el0, 1); - EXPECT_EQ(el1, 2); + ASSERT_TRUE(parsed->is_dict()); + absl::optional<int> int_value = parsed->FindIntKey(int_str); + ASSERT_TRUE(int_value.has_value()); + EXPECT_EQ(2014, *int_value); + absl::optional<double> double_value = parsed->FindDoubleKey(double_str); + ASSERT_TRUE(double_value.has_value()); + EXPECT_EQ(0.0, *double_value); + absl::optional<bool> bool_value = parsed->FindBoolKey(bool_str); + ASSERT_TRUE(bool_value.has_value()); + EXPECT_TRUE(*bool_value); + std::string* string_value = parsed->FindStringKey(string_str); + ASSERT_NE(nullptr, string_value); + EXPECT_EQ("string", *string_value); + base::Value* a1_value = parsed->FindListKey(array_str); + ASSERT_TRUE(a1_value->is_list()); + base::Value::ListView a1 = a1_value->GetList(); + absl::optional<int> el0 = a1[0].GetIfInt(); + absl::optional<int> el1 = a1[1].GetIfInt(); + ASSERT_TRUE(el0.has_value()); + ASSERT_TRUE(el1.has_value()); + EXPECT_EQ(1, *el0); + EXPECT_EQ(2, *el1); } } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h index 80769b64ea2..5eced41f79a 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h @@ -7,7 +7,6 @@ #include <stdint.h> -#include "base/macros.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -30,6 +29,8 @@ class PLATFORM_EXPORT WebMemoryAllocatorDump final { public: explicit WebMemoryAllocatorDump( base::trace_event::MemoryAllocatorDump* memory_allocator_dump); + WebMemoryAllocatorDump(const WebMemoryAllocatorDump&) = delete; + WebMemoryAllocatorDump& operator=(const WebMemoryAllocatorDump&) = delete; // Adds a scalar attribute to the dump. // Arguments: @@ -53,8 +54,6 @@ class PLATFORM_EXPORT WebMemoryAllocatorDump final { private: base::trace_event::MemoryAllocatorDump* memory_allocator_dump_; // Not owned. blink::WebMemoryAllocatorDumpGuid guid_; - - DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDump); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h index 3e2c360fc25..7f8052811bb 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h @@ -9,7 +9,6 @@ #include <unordered_map> #include "base/gtest_prod_util.h" -#include "base/macros.h" #include "base/trace_event/heap_profiler_allocation_context.h" #include "base/trace_event/memory_dump_request_args.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h" @@ -51,6 +50,8 @@ class PLATFORM_EXPORT WebProcessMemoryDump final { // Creates a standalone WebProcessMemoryDump, which owns the underlying // ProcessMemoryDump. WebProcessMemoryDump(); + WebProcessMemoryDump(const WebProcessMemoryDump&) = delete; + WebProcessMemoryDump& operator=(const WebProcessMemoryDump&) = delete; // Wraps (without owning) an existing ProcessMemoryDump. explicit WebProcessMemoryDump( @@ -162,8 +163,6 @@ class PLATFORM_EXPORT WebProcessMemoryDump final { // Stores SkTraceMemoryDump for the current ProcessMemoryDump. Vector<std::unique_ptr<skia::SkiaTraceMemoryDumpImpl>> sk_trace_dump_list_; - - DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDump); }; } // namespace blink diff --git a/chromium/third_party/blink/renderer/platform/instrumentation/use_counter.h b/chromium/third_party/blink/renderer/platform/instrumentation/use_counter.h index dd28c71e98a..bd1ffcb80de 100644 --- a/chromium/third_party/blink/renderer/platform/instrumentation/use_counter.h +++ b/chromium/third_party/blink/renderer/platform/instrumentation/use_counter.h @@ -43,15 +43,17 @@ class UseCounter : public GarbageCollectedMixin { use_counter.CountUse(feature); } - public: UseCounter() = default; + UseCounter(const UseCounter&) = delete; + UseCounter& operator=(const UseCounter&) = delete; virtual ~UseCounter() = default; // Counts a use of the given feature. Repeated calls are ignored. virtual void CountUse(mojom::WebFeature feature) = 0; - private: - DISALLOW_COPY_AND_ASSIGN(UseCounter); + // Counts a use of the given feature which is being deprecated. Repeated + // calls are ignored. + virtual void CountDeprecation(mojom::WebFeature feature) = 0; }; } // namespace blink |