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

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

Issue 658903002: Starting a refactor to allow adding metrics on upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused includes Created 6 years, 2 months 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_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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | chrome/browser/metrics/signin_status_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698