OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 RESTORE_FROM_AUTH_CODE, | 57 RESTORE_FROM_AUTH_CODE, |
58 }; | 58 }; |
59 | 59 |
60 class Observer { | 60 class Observer { |
61 public: | 61 public: |
62 virtual ~Observer() {} | 62 virtual ~Observer() {} |
63 | 63 |
64 // Raised when merge session state changes. | 64 // Raised when merge session state changes. |
65 virtual void OnSessionRestoreStateChanged(Profile* user_profile, | 65 virtual void OnSessionRestoreStateChanged(Profile* user_profile, |
66 SessionRestoreState state) {} | 66 SessionRestoreState state) {} |
| 67 |
| 68 // Raised when a new OAuth2 refresh token is avaialble. |
| 69 virtual void OnNewRefreshTokenAvaiable(Profile* user_profile) {} |
| 70 |
67 // Raised when session's GAIA credentials (SID+LSID) are available to | 71 // Raised when session's GAIA credentials (SID+LSID) are available to |
68 // other signed in services. | 72 // other signed in services. |
69 virtual void OnSessionAuthenticated(Profile* user_profile) {} | 73 virtual void OnSessionAuthenticated(Profile* user_profile) {} |
70 }; | 74 }; |
71 | 75 |
72 explicit OAuth2LoginManager(Profile* user_profile); | 76 explicit OAuth2LoginManager(Profile* user_profile); |
73 virtual ~OAuth2LoginManager(); | 77 virtual ~OAuth2LoginManager(); |
74 | 78 |
75 void AddObserver(OAuth2LoginManager::Observer* observer); | 79 void AddObserver(OAuth2LoginManager::Observer* observer); |
76 void RemoveObserver(OAuth2LoginManager::Observer* observer); | 80 void RemoveObserver(OAuth2LoginManager::Observer* observer); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // TODO(zelidrag|gspencer): Figure out how to get rid of ProfileHelper so we | 204 // TODO(zelidrag|gspencer): Figure out how to get rid of ProfileHelper so we |
201 // can change the line below to ObserverList<Observer, true>. | 205 // can change the line below to ObserverList<Observer, true>. |
202 ObserverList<Observer, false> observer_list_; | 206 ObserverList<Observer, false> observer_list_; |
203 | 207 |
204 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); | 208 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); |
205 }; | 209 }; |
206 | 210 |
207 } // namespace chromeos | 211 } // namespace chromeos |
208 | 212 |
209 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ | 213 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
OLD | NEW |