summaryrefslogtreecommitdiff
path: root/chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h')
-rw-r--r--chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h b/chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h
new file mode 100644
index 00000000000..4936f70c168
--- /dev/null
+++ b/chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h
@@ -0,0 +1,34 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_PERFORMANCE_MANAGER_MECHANISMS_TCMALLOC_TUNABLES_IMPL_H_
+#define CHROME_RENDERER_PERFORMANCE_MANAGER_MECHANISMS_TCMALLOC_TUNABLES_IMPL_H_
+
+#include "base/macros.h"
+#include "chrome/common/performance_manager/mojom/tcmalloc.mojom.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
+
+namespace performance_manager {
+namespace mechanism {
+
+class TcmallocTunablesImpl : public tcmalloc::mojom::TcmallocTunables {
+ public:
+ ~TcmallocTunablesImpl() override;
+ TcmallocTunablesImpl();
+
+ static void Create(
+ mojo::PendingReceiver<tcmalloc::mojom::TcmallocTunables> receiver);
+
+ protected:
+ // TcmallocTunables impl:
+ void SetMaxTotalThreadCacheBytes(uint32_t size_bytes) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TcmallocTunablesImpl);
+};
+
+} // namespace mechanism
+} // namespace performance_manager
+
+#endif // CHROME_RENDERER_PERFORMANCE_MANAGER_MECHANISMS_TCMALLOC_TUNABLES_IMPL_H_