OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_ |
| 6 #define CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_ |
| 7 |
| 8 #include "content/browser/memory/swap_metrics_observer.h" |
| 9 |
| 10 #include "base/mac/scoped_mach_port.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 class SwapMetricsObserverMac : public SwapMetricsObserver { |
| 15 public: |
| 16 SwapMetricsObserverMac(); |
| 17 ~SwapMetricsObserverMac() override; |
| 18 |
| 19 protected: |
| 20 void UpdateMetricsInternal(base::TimeDelta interval) override; |
| 21 |
| 22 private: |
| 23 base::mac::ScopedMachSendRight host_; |
| 24 |
| 25 uint64_t last_swapins_ = 0; |
| 26 uint64_t last_swapouts_ = 0; |
| 27 uint64_t last_decompressions_ = 0; |
| 28 uint64_t last_compressions_ = 0; |
| 29 }; |
| 30 |
| 31 } // namespace content |
| 32 |
| 33 #endif // CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_ |
OLD | NEW |