| 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 // The 'sessions' namespace comprises all the pieces of state that are | 5 // The 'sessions' namespace comprises all the pieces of state that are |
| 6 // combined to form a SyncSession instance. In that way, it can be thought of | 6 // combined to form a SyncSession instance. In that way, it can be thought of |
| 7 // as an extension of the SyncSession type itself. Session scoping gives | 7 // as an extension of the SyncSession type itself. Session scoping gives |
| 8 // context to things like "conflict progress", "update progress", etc, and the | 8 // context to things like "conflict progress", "update progress", etc, and the |
| 9 // separation this file provides allows clients to only include the parts they | 9 // separation this file provides allows clients to only include the parts they |
| 10 // need rather than the entire session stack. | 10 // need rather than the entire session stack. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // True when we get such an INVALID_STORE error from the server. | 66 // True when we get such an INVALID_STORE error from the server. |
| 67 bool invalid_store; | 67 bool invalid_store; |
| 68 int num_successful_commits; | 68 int num_successful_commits; |
| 69 // This is needed for monitoring extensions activity. | 69 // This is needed for monitoring extensions activity. |
| 70 int num_successful_bookmark_commits; | 70 int num_successful_bookmark_commits; |
| 71 | 71 |
| 72 // Download event counters. | 72 // Download event counters. |
| 73 int num_updates_downloaded_total; | 73 int num_updates_downloaded_total; |
| 74 int num_tombstone_updates_downloaded_total; | 74 int num_tombstone_updates_downloaded_total; |
| 75 int num_reflected_updates_downloaded_total; |
| 75 | 76 |
| 76 // If the syncer encountered a MIGRATION_DONE code, these are the types that | 77 // If the syncer encountered a MIGRATION_DONE code, these are the types that |
| 77 // the client must now "migrate", by purging and re-downloading all updates. | 78 // the client must now "migrate", by purging and re-downloading all updates. |
| 78 syncable::ModelTypeSet types_needing_local_migration; | 79 syncable::ModelTypeSet types_needing_local_migration; |
| 79 | 80 |
| 80 // Overwrites due to conflict resolution counters. | 81 // Overwrites due to conflict resolution counters. |
| 81 int num_local_overwrites; | 82 int num_local_overwrites; |
| 82 int num_server_overwrites; | 83 int num_server_overwrites; |
| 83 }; | 84 }; |
| 84 | 85 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 114 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], | 115 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], |
| 115 bool more_to_sync, | 116 bool more_to_sync, |
| 116 bool is_silenced, | 117 bool is_silenced, |
| 117 int64 unsynced_count, | 118 int64 unsynced_count, |
| 118 int num_encryption_conflicts, | 119 int num_encryption_conflicts, |
| 119 int num_hierarchy_conflicts, | 120 int num_hierarchy_conflicts, |
| 120 int num_simple_conflicts, | 121 int num_simple_conflicts, |
| 121 int num_server_conflicts, | 122 int num_server_conflicts, |
| 122 bool did_commit_items, | 123 bool did_commit_items, |
| 123 const SyncSourceInfo& source, | 124 const SyncSourceInfo& source, |
| 125 bool notifications_enabled, |
| 124 size_t num_entries, | 126 size_t num_entries, |
| 125 base::Time sync_start_time, | 127 base::Time sync_start_time, |
| 126 bool retry_scheduled); | 128 bool retry_scheduled); |
| 127 ~SyncSessionSnapshot(); | 129 ~SyncSessionSnapshot(); |
| 128 | 130 |
| 129 // Caller takes ownership of the returned dictionary. | 131 // Caller takes ownership of the returned dictionary. |
| 130 base::DictionaryValue* ToValue() const; | 132 base::DictionaryValue* ToValue() const; |
| 131 | 133 |
| 132 std::string ToString() const; | 134 std::string ToString() const; |
| 133 | 135 |
| 134 const SyncerStatus syncer_status; | 136 const SyncerStatus syncer_status; |
| 135 const ErrorCounters errors; | 137 const ErrorCounters errors; |
| 136 const int64 num_server_changes_remaining; | 138 const int64 num_server_changes_remaining; |
| 137 const bool is_share_usable; | 139 const bool is_share_usable; |
| 138 const syncable::ModelTypeSet initial_sync_ended; | 140 const syncable::ModelTypeSet initial_sync_ended; |
| 139 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; | 141 const std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; |
| 140 const bool has_more_to_sync; | 142 const bool has_more_to_sync; |
| 141 const bool is_silenced; | 143 const bool is_silenced; |
| 142 const int64 unsynced_count; | 144 const int64 unsynced_count; |
| 143 const int num_encryption_conflicts; | 145 const int num_encryption_conflicts; |
| 144 const int num_hierarchy_conflicts; | 146 const int num_hierarchy_conflicts; |
| 145 const int num_simple_conflicts; | 147 const int num_simple_conflicts; |
| 146 const int num_server_conflicts; | 148 const int num_server_conflicts; |
| 147 const bool did_commit_items; | 149 const bool did_commit_items; |
| 148 const SyncSourceInfo source; | 150 const SyncSourceInfo source; |
| 151 const bool notifications_enabled; |
| 149 const size_t num_entries; | 152 const size_t num_entries; |
| 150 base::Time sync_start_time; | 153 base::Time sync_start_time; |
| 151 const bool retry_scheduled; | 154 const bool retry_scheduled; |
| 152 }; | 155 }; |
| 153 | 156 |
| 154 // Tracks progress of conflicts and their resolutions. | 157 // Tracks progress of conflicts and their resolutions. |
| 155 class ConflictProgress { | 158 class ConflictProgress { |
| 156 public: | 159 public: |
| 157 explicit ConflictProgress(bool* dirty_flag); | 160 explicit ConflictProgress(bool* dirty_flag); |
| 158 ~ConflictProgress(); | 161 ~ConflictProgress(); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 ~PerModelSafeGroupState(); | 323 ~PerModelSafeGroupState(); |
| 321 | 324 |
| 322 UpdateProgress update_progress; | 325 UpdateProgress update_progress; |
| 323 ConflictProgress conflict_progress; | 326 ConflictProgress conflict_progress; |
| 324 }; | 327 }; |
| 325 | 328 |
| 326 } // namespace sessions | 329 } // namespace sessions |
| 327 } // namespace browser_sync | 330 } // namespace browser_sync |
| 328 | 331 |
| 329 #endif // SYNC_SESSIONS_SESSION_STATE_H_ | 332 #endif // SYNC_SESSIONS_SESSION_STATE_H_ |
| OLD | NEW |