| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A class representing an attempt to synchronize the local syncable data | 5 // A class representing an attempt to synchronize the local syncable data |
| 6 // store with a sync server. A SyncSession instance is passed as a stateful | 6 // store with a sync server. A SyncSession instance is passed as a stateful |
| 7 // bundle to and from various SyncerCommands with the goal of converging the | 7 // bundle to and from various SyncerCommands with the goal of converging the |
| 8 // client view of data with that of the server. The commands twiddle with | 8 // client view of data with that of the server. The commands twiddle with |
| 9 // session status in response to events and hiccups along the way, set and | 9 // session status in response to events and hiccups along the way, set and |
| 10 // query session progress with regards to conflict resolution and applying | 10 // query session progress with regards to conflict resolution and applying |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "sync/sessions/ordered_commit_set.h" | 30 #include "sync/sessions/ordered_commit_set.h" |
| 31 #include "sync/sessions/session_state.h" | 31 #include "sync/sessions/session_state.h" |
| 32 #include "sync/sessions/status_controller.h" | 32 #include "sync/sessions/status_controller.h" |
| 33 #include "sync/sessions/sync_session_context.h" | 33 #include "sync/sessions/sync_session_context.h" |
| 34 #include "sync/util/extensions_activity_monitor.h" | 34 #include "sync/util/extensions_activity_monitor.h" |
| 35 | 35 |
| 36 namespace syncable { | 36 namespace syncable { |
| 37 class WriteTransaction; | 37 class WriteTransaction; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace csync { | 40 namespace syncer { |
| 41 class ModelSafeWorker; | 41 class ModelSafeWorker; |
| 42 | 42 |
| 43 namespace sessions { | 43 namespace sessions { |
| 44 | 44 |
| 45 class SyncSession { | 45 class SyncSession { |
| 46 public: | 46 public: |
| 47 // The Delegate services events that occur during the session requiring an | 47 // The Delegate services events that occur during the session requiring an |
| 48 // explicit (and session-global) action, as opposed to events that are simply | 48 // explicit (and session-global) action, as opposed to events that are simply |
| 49 // recorded in per-session state. | 49 // recorded in per-session state. |
| 50 class Delegate { | 50 class Delegate { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 session_->write_transaction_ = trans; | 240 session_->write_transaction_ = trans; |
| 241 } | 241 } |
| 242 ~ScopedSetSessionWriteTransaction() { session_->write_transaction_ = NULL; } | 242 ~ScopedSetSessionWriteTransaction() { session_->write_transaction_ = NULL; } |
| 243 | 243 |
| 244 private: | 244 private: |
| 245 SyncSession* session_; | 245 SyncSession* session_; |
| 246 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); | 246 DISALLOW_COPY_AND_ASSIGN(ScopedSetSessionWriteTransaction); |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 } // namespace sessions | 249 } // namespace sessions |
| 250 } // namespace csync | 250 } // namespace syncer |
| 251 | 251 |
| 252 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ | 252 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ |
| OLD | NEW |