summaryrefslogtreecommitdiff
path: root/chromium/chrome/renderer/performance_manager/mechanisms/tcmalloc_tunables_impl.h
blob: 4936f70c1688a16cce9899f7182e77890e4738ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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_