OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
6 #define COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/sync/base/model_type.h" | 14 #include "components/sync/base/model_type.h" |
15 #include "components/sync/base/progress_marker_map.h" | 15 #include "components/sync/base/progress_marker_map.h" |
16 #include "components/sync/base/sync_export.h" | |
17 #include "components/sync/sessions/model_neutral_state.h" | 16 #include "components/sync/sessions/model_neutral_state.h" |
18 | 17 |
19 namespace base { | 18 namespace base { |
20 class DictionaryValue; | 19 class DictionaryValue; |
21 } | 20 } |
22 | 21 |
23 namespace syncer { | 22 namespace syncer { |
24 namespace sessions { | 23 namespace sessions { |
25 | 24 |
26 // An immutable snapshot of state from a SyncSession. Convenient to use as | 25 // An immutable snapshot of state from a SyncSession. Convenient to use as |
27 // part of notifications as it is inherently thread-safe. | 26 // part of notifications as it is inherently thread-safe. |
28 // TODO(zea): if copying this all over the place starts getting expensive, | 27 // TODO(zea): if copying this all over the place starts getting expensive, |
29 // consider passing around immutable references instead of values. | 28 // consider passing around immutable references instead of values. |
30 // Default copy and assign welcome. | 29 // Default copy and assign welcome. |
31 class SYNC_EXPORT SyncSessionSnapshot { | 30 class SyncSessionSnapshot { |
32 public: | 31 public: |
33 SyncSessionSnapshot(); | 32 SyncSessionSnapshot(); |
34 SyncSessionSnapshot( | 33 SyncSessionSnapshot( |
35 const ModelNeutralState& model_neutral_state, | 34 const ModelNeutralState& model_neutral_state, |
36 const ProgressMarkerMap& download_progress_markers, | 35 const ProgressMarkerMap& download_progress_markers, |
37 bool is_silenced, | 36 bool is_silenced, |
38 int num_encryption_conflicts, | 37 int num_encryption_conflicts, |
39 int num_hierarchy_conflicts, | 38 int num_hierarchy_conflicts, |
40 int num_server_conflicts, | 39 int num_server_conflicts, |
41 bool notifications_enabled, | 40 bool notifications_enabled, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // still some value in displaying it on the about:sync page. | 88 // still some value in displaying it on the about:sync page. |
90 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; | 89 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; |
91 | 90 |
92 bool is_initialized_; | 91 bool is_initialized_; |
93 }; | 92 }; |
94 | 93 |
95 } // namespace sessions | 94 } // namespace sessions |
96 } // namespace syncer | 95 } // namespace syncer |
97 | 96 |
98 #endif // COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 97 #endif // COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
OLD | NEW |