Chromium Code Reviews| 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 CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 class SigninStatusMetricsProvider : public metrics::MetricsProvider, | 27 class SigninStatusMetricsProvider : public metrics::MetricsProvider, |
| 28 public chrome::BrowserListObserver, | 28 public chrome::BrowserListObserver, |
| 29 public SigninManagerBase::Observer, | 29 public SigninManagerBase::Observer, |
| 30 public SigninManagerFactory::Observer { | 30 public SigninManagerFactory::Observer { |
| 31 public: | 31 public: |
| 32 virtual ~SigninStatusMetricsProvider(); | 32 virtual ~SigninStatusMetricsProvider(); |
| 33 | 33 |
| 34 // Record the collected sign-in status into a histogram and re-check current | 34 // Record the collected sign-in status into a histogram and re-check current |
| 35 // sign-in status to get prepared for the next UMA session. Called by | 35 // sign-in status to get prepared for the next UMA session. Called by |
| 36 // MetricsServiceClient when it is collecting final metrics. | 36 // MetricsServiceClient when it is collecting final metrics. |
| 37 void RecordSigninStatusHistogram(); | 37 virtual void OnCollectFinalMetrics(); |
|
Alexei Svitkine (slow)
2014/10/15 21:39:02
Nit: OVERRIDE and add change comment to:
// metri
| |
| 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 SigninStatusMetricsProvider* CreateInstance(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // The boolean |is_test| indicates whether or not this is an instance for | 43 // The boolean |is_test| indicates whether or not this is an instance for |
| 44 // testing purpose. If so, skip the initialization. Except for testing | 44 // testing purpose. If so, skip the initialization. Except for testing |
| 45 // purpose, this class's instance should be created through the static | 45 // purpose, this class's instance should be created through the static |
| 46 // CreateInstance() method. | 46 // CreateInstance() method. |
| 47 explicit SigninStatusMetricsProvider(bool is_test); | 47 explicit SigninStatusMetricsProvider(bool is_test); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 | 113 |
| 114 // Whether the instance is for testing or not. | 114 // Whether the instance is for testing or not. |
| 115 bool is_test_; | 115 bool is_test_; |
| 116 | 116 |
| 117 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; | 117 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); | 119 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 #endif // CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 122 #endif // CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
| OLD | NEW |