| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file defines a service that collects information about the user | 5 // This file defines a service that collects information about the user |
| 6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Save the pending_log_text_ persistently in a pref for transmission when we | 223 // Save the pending_log_text_ persistently in a pref for transmission when we |
| 224 // next run. Note that IF this text is "too large," we just dicard it. | 224 // next run. Note that IF this text is "too large," we just dicard it. |
| 225 void PushPendingLogTextToUnsentOngoingLogs(); | 225 void PushPendingLogTextToUnsentOngoingLogs(); |
| 226 | 226 |
| 227 // Start timer for next log transmission. | 227 // Start timer for next log transmission. |
| 228 void StartLogTransmissionTimer(); | 228 void StartLogTransmissionTimer(); |
| 229 | 229 |
| 230 // Internal function to collect process memory information. | 230 // Internal function to collect process memory information. |
| 231 void LogTransmissionTimerDone(); | 231 void LogTransmissionTimerDone(); |
| 232 | 232 |
| 233 // Do not call OnMemoryDetailCollectionDone() or | 233 // Do not call OnHistogramSynchronizationDone() directly. |
| 234 // OnHistogramSynchronizationDone() directly. | |
| 235 // Use StartLogTransmissionTimer() to schedule a call. | 234 // Use StartLogTransmissionTimer() to schedule a call. |
| 236 void OnMemoryDetailCollectionDone(); | |
| 237 void OnHistogramSynchronizationDone(); | 235 void OnHistogramSynchronizationDone(); |
| 238 | 236 |
| 239 // Takes whatever log should be uploaded next (according to the state_) | 237 // Takes whatever log should be uploaded next (according to the state_) |
| 240 // and makes it the pending log. If pending_log_ is not NULL, | 238 // and makes it the pending log. If pending_log_ is not NULL, |
| 241 // MakePendingLog does nothing and returns. | 239 // MakePendingLog does nothing and returns. |
| 242 void MakePendingLog(); | 240 void MakePendingLog(); |
| 243 | 241 |
| 244 // Determines from state_ and permissions set out by the server and by | 242 // Determines from state_ and permissions set out by the server and by |
| 245 // the user whether the pending_log_ should be sent or discarded. Called by | 243 // the user whether the pending_log_ should be sent or discarded. Called by |
| 246 // TryToStartTransmission. | 244 // TryToStartTransmission. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); | 496 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); |
| 499 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); | 497 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); |
| 500 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); | 498 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); |
| 501 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); | 499 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); |
| 502 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); | 500 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); |
| 503 | 501 |
| 504 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 502 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 505 }; | 503 }; |
| 506 | 504 |
| 507 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 505 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |