Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: content/browser/memory/swap_metrics_observer_mac.h

Issue 2852033002: Add SwapMetricsObserverMac (Closed)
Patch Set: kern_return_t Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/memory/swap_metrics_observer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/swap_metrics_observer_mac.h
diff --git a/content/browser/memory/swap_metrics_observer_mac.h b/content/browser/memory/swap_metrics_observer_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd34e0a4dda61daff6a041a2e26f3297ff8aff45
--- /dev/null
+++ b/content/browser/memory/swap_metrics_observer_mac.h
@@ -0,0 +1,33 @@
+// Copyright 2017 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 CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_
+#define CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_
+
+#include "content/browser/memory/swap_metrics_observer.h"
+
+#include "base/mac/scoped_mach_port.h"
+
+namespace content {
+
+class SwapMetricsObserverMac : public SwapMetricsObserver {
+ public:
+ SwapMetricsObserverMac();
+ ~SwapMetricsObserverMac() override;
+
+ protected:
+ void UpdateMetricsInternal(base::TimeDelta interval) override;
+
+ private:
+ base::mac::ScopedMachSendRight host_;
+
+ uint64_t last_swapins_ = 0;
+ uint64_t last_swapouts_ = 0;
+ uint64_t last_decompressions_ = 0;
+ uint64_t last_compressions_ = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEMORY_SWAP_METRICS_OBSERVER_MAC_H_
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/memory/swap_metrics_observer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698