| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ | 6 #define CHROME_BROWSER_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // GoogleServiceAuthError::AuthErrorNone() then the merge succeeeded. | 32 // GoogleServiceAuthError::AuthErrorNone() then the merge succeeeded. |
| 33 virtual void MergeSessionCompleted(const std::string& account_id, | 33 virtual void MergeSessionCompleted(const std::string& account_id, |
| 34 const GoogleServiceAuthError& error) = 0; | 34 const GoogleServiceAuthError& error) = 0; |
| 35 protected: | 35 protected: |
| 36 virtual ~Observer() {} | 36 virtual ~Observer() {} |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 GoogleAutoLoginHelper(Profile* profile, Observer* observer); | 39 GoogleAutoLoginHelper(Profile* profile, Observer* observer); |
| 40 virtual ~GoogleAutoLoginHelper(); | 40 virtual ~GoogleAutoLoginHelper(); |
| 41 | 41 |
| 42 void LogIn(); | |
| 43 void LogIn(const std::string& account_id); | 42 void LogIn(const std::string& account_id); |
| 44 | 43 |
| 45 // Add or remove observers of this helper. | 44 // Add or remove observers of this helper. |
| 46 void AddObserver(Observer* observer); | 45 void AddObserver(Observer* observer); |
| 47 void RemoveObserver(Observer* observer); | 46 void RemoveObserver(Observer* observer); |
| 48 | 47 |
| 49 // Cancel all login requests. | 48 // Cancel all login requests. |
| 50 void CancelAll(); | 49 void CancelAll(); |
| 51 | 50 |
| 52 private: | 51 private: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 std::deque<std::string> accounts_; | 75 std::deque<std::string> accounts_; |
| 77 | 76 |
| 78 // List of observers to notify when merge session completes. | 77 // List of observers to notify when merge session completes. |
| 79 // Makes sure list is empty on destruction. | 78 // Makes sure list is empty on destruction. |
| 80 ObserverList<Observer, true> observer_list_; | 79 ObserverList<Observer, true> observer_list_; |
| 81 | 80 |
| 82 DISALLOW_COPY_AND_ASSIGN(GoogleAutoLoginHelper); | 81 DISALLOW_COPY_AND_ASSIGN(GoogleAutoLoginHelper); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 #endif // CHROME_BROWSER_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ | 84 #endif // CHROME_BROWSER_SIGNIN_GOOGLE_AUTO_LOGIN_HELPER_H_ |
| OLD | NEW |