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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // chrome::BrowserListObserver: | 67 // chrome::BrowserListObserver: |
68 // This will never be called on Android. | 68 // This will never be called on Android. |
69 virtual void OnBrowserAdded(Browser* browser) OVERRIDE; | 69 virtual void OnBrowserAdded(Browser* browser) OVERRIDE; |
70 | 70 |
71 // SigninManagerFactory::Observer: | 71 // SigninManagerFactory::Observer: |
72 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE; | 72 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE; |
73 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE; | 73 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE; |
74 | 74 |
75 // SigninManagerBase::Observer: | 75 // SigninManagerBase::Observer: |
76 virtual void GoogleSigninSucceeded(const std::string& username, | 76 virtual void GoogleSigninSucceeded(const std::string& account_id, |
| 77 const std::string& username, |
77 const std::string& password) OVERRIDE; | 78 const std::string& password) OVERRIDE; |
78 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; | 79 virtual void GoogleSignedOut(const std::string& account_id, |
| 80 const std::string& username) OVERRIDE; |
79 | 81 |
80 // Obtain sign-in status and add observers. | 82 // Obtain sign-in status and add observers. |
81 void Initialize(); | 83 void Initialize(); |
82 | 84 |
83 // Update the sign-in status based on all currently opened profiles. Called by | 85 // Update the sign-in status based on all currently opened profiles. Called by |
84 // ComputeCurrentSigninStatus at class construction and right after each UMA | 86 // ComputeCurrentSigninStatus at class construction and right after each UMA |
85 // log upload. |total_count| is the number of opened profiles and | 87 // log upload. |total_count| is the number of opened profiles and |
86 // |signed_in_count| represents the number of signed-in profiles among those | 88 // |signed_in_count| represents the number of signed-in profiles among those |
87 // |total_count| profiles. | 89 // |total_count| profiles. |
88 void UpdateInitialSigninStatus(size_t total_count, size_t signed_in_count); | 90 void UpdateInitialSigninStatus(size_t total_count, size_t signed_in_count); |
(...skipping 17 matching lines...) Expand all Loading... |
106 | 108 |
107 // Whether the instance is for testing or not. | 109 // Whether the instance is for testing or not. |
108 bool is_test_; | 110 bool is_test_; |
109 | 111 |
110 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; | 112 base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_; |
111 | 113 |
112 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); | 114 DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); |
113 }; | 115 }; |
114 | 116 |
115 #endif // CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ | 117 #endif // CHROME_BROWSER_METRICS_SIGNIN_STATUS_METRICS_PROVIDER_H_ |
OLD | NEW |