| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // AuthWatcher watches authentication events and user open and close | 5 // AuthWatcher watches authentication events and user open and close |
| 6 // events and accordingly opens and closes shares. | 6 // events and accordingly opens and closes shares. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ | 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ |
| 9 #define CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ | 9 #define CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 AuthenticationTrigger trigger; | 65 AuthenticationTrigger trigger; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 class AuthWatcher { | 68 class AuthWatcher { |
| 69 public: | 69 public: |
| 70 // Normal progression is local -> gaia -> token. | 70 // Normal progression is local -> gaia -> token. |
| 71 enum Status { LOCALLY_AUTHENTICATED, GAIA_AUTHENTICATED, NOT_AUTHENTICATED }; | 71 enum Status { LOCALLY_AUTHENTICATED, GAIA_AUTHENTICATED, NOT_AUTHENTICATED }; |
| 72 typedef syncable::DirectoryManagerEvent DirectoryManagerEvent; | 72 typedef syncable::DirectoryManagerEvent DirectoryManagerEvent; |
| 73 typedef syncable::DirectoryManager DirectoryManager; | 73 typedef syncable::DirectoryManager DirectoryManager; |
| 74 typedef TalkMediator TalkMediator; | |
| 75 | 74 |
| 76 AuthWatcher(DirectoryManager* dirman, | 75 AuthWatcher(DirectoryManager* dirman, |
| 77 ServerConnectionManager* scm, | 76 ServerConnectionManager* scm, |
| 78 AllStatus* allstatus, | 77 AllStatus* allstatus, |
| 79 const std::string& user_agent, | 78 const std::string& user_agent, |
| 80 const std::string& service_id, | 79 const std::string& service_id, |
| 81 const std::string& gaia_url, | 80 const std::string& gaia_url, |
| 82 UserSettings* user_settings, | 81 UserSettings* user_settings, |
| 83 GaiaAuthenticator* gaia_auth, | 82 GaiaAuthenticator* gaia_auth, |
| 84 TalkMediator* talk_mediator); | 83 TalkMediator* talk_mediator); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 pthread_t thread_; | 194 pthread_t thread_; |
| 196 bool thread_handle_valid_; | 195 bool thread_handle_valid_; |
| 197 bool authenticating_now_; | 196 bool authenticating_now_; |
| 198 AuthWatcherEvent::AuthenticationTrigger current_attempt_trigger_; | 197 AuthWatcherEvent::AuthenticationTrigger current_attempt_trigger_; |
| 199 DISALLOW_COPY_AND_ASSIGN(AuthWatcher); | 198 DISALLOW_COPY_AND_ASSIGN(AuthWatcher); |
| 200 }; | 199 }; |
| 201 | 200 |
| 202 } // namespace browser_sync | 201 } // namespace browser_sync |
| 203 | 202 |
| 204 #endif // CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ | 203 #endif // CHROME_BROWSER_SYNC_ENGINE_AUTH_WATCHER_H_ |
| OLD | NEW |