| 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 // The AllStatus object watches various sync engine components and aggregates | 5 // The AllStatus object watches various sync engine components and aggregates |
| 6 // the status of all of them into one place. | 6 // the status of all of them into one place. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| 9 #define CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 9 #define CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 struct AllStatusEvent; | 28 struct AllStatusEvent; |
| 29 struct AuthWatcherEvent; | 29 struct AuthWatcherEvent; |
| 30 struct GaiaAuthEvent; | 30 struct GaiaAuthEvent; |
| 31 struct ServerConnectionEvent; | 31 struct ServerConnectionEvent; |
| 32 struct SyncerEvent; | 32 struct SyncerEvent; |
| 33 struct TalkMediatorEvent; | 33 struct TalkMediatorEvent; |
| 34 | 34 |
| 35 class AllStatus { | 35 class AllStatus { |
| 36 friend class ScopedStatusLockWithNotify; | 36 friend class ScopedStatusLockWithNotify; |
| 37 public: | 37 public: |
| 38 typedef EventChannel<AllStatusEvent, PThreadMutex> Channel; | 38 typedef EventChannel<AllStatusEvent, Lock> Channel; |
| 39 | 39 |
| 40 // Status of the entire sync process distilled into a single enum. | 40 // Status of the entire sync process distilled into a single enum. |
| 41 enum SyncStatus { | 41 enum SyncStatus { |
| 42 // Can't connect to server, but there are no pending changes in | 42 // Can't connect to server, but there are no pending changes in |
| 43 // our local dataase. | 43 // our local dataase. |
| 44 OFFLINE, | 44 OFFLINE, |
| 45 // Can't connect to server, and there are pending changes in our | 45 // Can't connect to server, and there are pending changes in our |
| 46 // local cache. | 46 // local cache. |
| 47 OFFLINE_UNSYNCED, | 47 OFFLINE_UNSYNCED, |
| 48 // Connected and syncing. | 48 // Connected and syncing. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void NotifyOverQuota(); | 202 void NotifyOverQuota(); |
| 203 protected: | 203 protected: |
| 204 AllStatusEvent event_; | 204 AllStatusEvent event_; |
| 205 AllStatus* const allstatus_; | 205 AllStatus* const allstatus_; |
| 206 StatusNotifyPlan plan_; | 206 StatusNotifyPlan plan_; |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace browser_sync | 209 } // namespace browser_sync |
| 210 | 210 |
| 211 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 211 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| OLD | NEW |