| OLD | NEW |
| 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 // 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 COMPONENTS_METRICS_METRICS_SERVICE_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ | 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 10 | 10 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void RecordCompletedSessionEnd(); | 172 void RecordCompletedSessionEnd(); |
| 173 | 173 |
| 174 #if defined(OS_ANDROID) || defined(OS_IOS) | 174 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 175 // Called when the application is going into background mode. | 175 // Called when the application is going into background mode. |
| 176 void OnAppEnterBackground(); | 176 void OnAppEnterBackground(); |
| 177 | 177 |
| 178 // Called when the application is coming out of background mode. | 178 // Called when the application is coming out of background mode. |
| 179 void OnAppEnterForeground(); | 179 void OnAppEnterForeground(); |
| 180 #else | 180 #else |
| 181 // Set the dirty flag, which will require a later call to LogCleanShutdown(). | 181 // Set the dirty flag, which will require a later call to LogCleanShutdown(). |
| 182 static void LogNeedForCleanShutdown(PrefService* local_state); | 182 void LogNeedForCleanShutdown(); |
| 183 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 183 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 184 | 184 |
| 185 static void SetExecutionPhase(ExecutionPhase execution_phase, | 185 static void SetExecutionPhase(ExecutionPhase execution_phase, |
| 186 PrefService* local_state); | 186 PrefService* local_state); |
| 187 | 187 |
| 188 // Saves in the preferences if the crash report registration was successful. | 188 // Saves in the preferences if the crash report registration was successful. |
| 189 // This count is eventually send via UMA logs. | 189 // This count is eventually send via UMA logs. |
| 190 void RecordBreakpadRegistration(bool success); | 190 void RecordBreakpadRegistration(bool success); |
| 191 | 191 |
| 192 // Saves in the preferences if the browser is running under a debugger. | 192 // Saves in the preferences if the browser is running under a debugger. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, | 456 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
| 457 PermutedEntropyCacheClearedWhenLowEntropyReset); | 457 PermutedEntropyCacheClearedWhenLowEntropyReset); |
| 458 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 458 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
| 459 | 459 |
| 460 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 460 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 461 }; | 461 }; |
| 462 | 462 |
| 463 } // namespace metrics | 463 } // namespace metrics |
| 464 | 464 |
| 465 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 465 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |