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

Side by Side Diff: chrome/browser/metrics/chrome_metrics_service_client.h

Issue 2566083002: Add peak memory usage metric
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 #endif 196 #endif
197 197
198 // The DriveMetricsProvider instance that was registered with MetricsService. 198 // The DriveMetricsProvider instance that was registered with MetricsService.
199 // Has the same lifetime as |metrics_service_|. 199 // Has the same lifetime as |metrics_service_|.
200 metrics::DriveMetricsProvider* drive_metrics_provider_; 200 metrics::DriveMetricsProvider* drive_metrics_provider_;
201 201
202 // The MemoryGrowthTracker instance that tracks memory usage growth in 202 // The MemoryGrowthTracker instance that tracks memory usage growth in
203 // MemoryDetails. 203 // MemoryDetails.
204 MemoryGrowthTracker memory_growth_tracker_; 204 MemoryGrowthTracker memory_growth_tracker_;
205 205
206 // The PeakMemoryUsageTracker instance that tracks peak memory usage in
207 // MemoryDetails.
208 PeakMemoryUsageTracker peak_memory_usage_tracker_;
209
206 // Callback to determine whether or not a cellular network is currently being 210 // Callback to determine whether or not a cellular network is currently being
207 // used. 211 // used.
208 base::Callback<void(bool*)> cellular_callback_; 212 base::Callback<void(bool*)> cellular_callback_;
209 213
210 // Time of this object's creation. 214 // Time of this object's creation.
211 const base::TimeTicks start_time_; 215 const base::TimeTicks start_time_;
212 216
213 // Subscription for receiving callbacks that a URL was opened from the 217 // Subscription for receiving callbacks that a URL was opened from the
214 // omnibox. 218 // omnibox.
215 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> 219 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription>
216 omnibox_url_opened_subscription_; 220 omnibox_url_opened_subscription_;
217 221
218 // Whether this client has already uploaded profiler data during this session. 222 // Whether this client has already uploaded profiler data during this session.
219 // Profiler data is uploaded at most once per session. 223 // Profiler data is uploaded at most once per session.
220 bool has_uploaded_profiler_data_; 224 bool has_uploaded_profiler_data_;
221 225
222 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 226 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
223 227
224 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 228 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
225 }; 229 };
226 230
227 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 231 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698