| 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class SigninStatusMetricsProvider : public SigninStatusMetricsProviderBase, | 30 class SigninStatusMetricsProvider : public SigninStatusMetricsProviderBase, |
| 31 public SigninManagerBase::Observer { | 31 public SigninManagerBase::Observer { |
| 32 public: | 32 public: |
| 33 ~SigninStatusMetricsProvider() override; | 33 ~SigninStatusMetricsProvider() override; |
| 34 | 34 |
| 35 // SigninStatusMetricsProviderBase: | 35 // SigninStatusMetricsProviderBase: |
| 36 void ProvideGeneralMetrics( | 36 void ProvideGeneralMetrics( |
| 37 metrics::ChromeUserMetricsExtension* uma_proto) override; | 37 metrics::ChromeUserMetricsExtension* uma_proto) override; |
| 38 | 38 |
| 39 // Factory method, creates a new instance of this class. | 39 // Factory method, creates a new instance of this class. |
| 40 static SigninStatusMetricsProvider* CreateInstance( | 40 static std::unique_ptr<SigninStatusMetricsProvider> CreateInstance( |
| 41 std::unique_ptr<SigninStatusMetricsProviderDelegate> delegate); | 41 std::unique_ptr<SigninStatusMetricsProviderDelegate> delegate); |
| 42 | 42 |
| 43 // Update the sign-in status when a SigninManager is created. | 43 // Update the sign-in status when a SigninManager is created. |
| 44 void OnSigninManagerCreated(SigninManagerBase* manager); | 44 void OnSigninManagerCreated(SigninManagerBase* manager); |
| 45 | 45 |
| 46 // Update the sign-in status when a SigninManager is shut down. | 46 // Update the sign-in status when a SigninManager is shut down. |
| 47 void OnSigninManagerShutdown(SigninManagerBase* manager); | 47 void OnSigninManagerShutdown(SigninManagerBase* manager); |
| 48 | 48 |
| 49 // Updates the initial sign-in status. For testing purpose only. | 49 // Updates the initial sign-in status. For testing purpose only. |
| 50 void UpdateInitialSigninStatusForTesting(size_t total_count, | 50 void UpdateInitialSigninStatusForTesting(size_t total_count, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // Whether the instance is for testing or not. | 98 // Whether the instance is for testing or not. |
| 99 bool is_test_; | 99 bool is_test_; |
| 100 | 100 |
| 101 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; | 101 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); | 103 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 106 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| OLD | NEW |