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

Side by Side Diff: components/signin/core/browser/signin_status_metrics_provider.h

Issue 2609213002: SigninStatusMetricsProvider factory returns a std::unique_ptr<>. (Closed)
Patch Set: Created 3 years, 11 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 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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698