| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // TODO(sync): We eventually want to fundamentally change how we represent | 5 // TODO(sync): We eventually want to fundamentally change how we represent |
| 6 // status and inform the UI about the ways in which our status has changed. | 6 // status and inform the UI about the ways in which our status has changed. |
| 7 // Right now, we're just trying to keep the various command classes from having | 7 // Right now, we're just trying to keep the various command classes from having |
| 8 // to worry about this class. | 8 // to worry about this class. |
| 9 // | 9 // |
| 10 // The UI will request that we fill this struct so it can show the current sync | 10 // The UI will request that we fill this struct so it can show the current sync |
| 11 // state. | 11 // state. |
| 12 // | 12 // |
| 13 // THIS CLASS PROVIDES NO SYNCHRONIZATION GUARANTEES. | 13 // THIS CLASS PROVIDES NO SYNCHRONIZATION GUARANTEES. |
| 14 | 14 |
| 15 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ | 15 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ |
| 16 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ | 16 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ |
| 17 | 17 |
| 18 #include "base/atomicops.h" | 18 #include "base/atomicops.h" |
| 19 #include "base/port.h" | 19 #include "base/port.h" |
| 20 #include "chrome/browser/sync/engine/sync_cycle_state.h" | 20 #include "chrome/browser/sync/engine/sync_cycle_state.h" |
| 21 #include "chrome/browser/sync/engine/sync_process_state.h" | 21 #include "chrome/browser/sync/engine/sync_process_state.h" |
| 22 | 22 |
| 23 namespace browser_sync { | 23 namespace browser_sync { |
| 24 | 24 |
| 25 class SyncerSession; | 25 class SyncerSession; |
| 26 | 26 |
| 27 class SyncerStatus { | 27 class SyncerStatus { |
| 28 public: | 28 public: |
| 29 SyncerStatus(SyncCycleState* cycle_state, SyncProcessState* state) | 29 SyncerStatus(SyncCycleState* cycle_state, SyncProcessState* state) |
| 30 : sync_process_state_(state), | 30 : sync_cycle_state_(cycle_state), |
| 31 sync_cycle_state_(cycle_state){} | 31 sync_process_state_(state) {} |
| 32 explicit SyncerStatus(SyncerSession* s); | 32 explicit SyncerStatus(SyncerSession* s); |
| 33 ~SyncerStatus(); | 33 ~SyncerStatus(); |
| 34 | 34 |
| 35 bool invalid_store() const { | 35 bool invalid_store() const { |
| 36 return sync_process_state_->invalid_store(); | 36 return sync_process_state_->invalid_store(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void set_invalid_store(const bool val) { | 39 void set_invalid_store(const bool val) { |
| 40 sync_process_state_->set_invalid_store(val); | 40 sync_process_state_->set_invalid_store(val); |
| 41 } | 41 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 | 246 |
| 247 private: | 247 private: |
| 248 SyncCycleState* sync_cycle_state_; | 248 SyncCycleState* sync_cycle_state_; |
| 249 SyncProcessState* sync_process_state_; | 249 SyncProcessState* sync_process_state_; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace browser_sync | 252 } // namespace browser_sync |
| 253 | 253 |
| 254 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ | 254 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_STATUS_H_ |
| OLD | NEW |