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 #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const ProgressMarkerMap& download_progress_markers, | 36 const ProgressMarkerMap& download_progress_markers, |
37 bool more_to_sync, | 37 bool more_to_sync, |
38 bool is_silenced, | 38 bool is_silenced, |
39 int num_encryption_conflicts, | 39 int num_encryption_conflicts, |
40 int num_hierarchy_conflicts, | 40 int num_hierarchy_conflicts, |
41 int num_simple_conflicts, | 41 int num_simple_conflicts, |
42 int num_server_conflicts, | 42 int num_server_conflicts, |
43 const SyncSourceInfo& source, | 43 const SyncSourceInfo& source, |
44 bool notifications_enabled, | 44 bool notifications_enabled, |
45 size_t num_entries, | 45 size_t num_entries, |
46 base::Time sync_start_time, | 46 base::Time sync_start_time); |
47 bool retry_scheduled); | |
48 ~SyncSessionSnapshot(); | 47 ~SyncSessionSnapshot(); |
49 | 48 |
50 // Caller takes ownership of the returned dictionary. | 49 // Caller takes ownership of the returned dictionary. |
51 base::DictionaryValue* ToValue() const; | 50 base::DictionaryValue* ToValue() const; |
52 | 51 |
53 std::string ToString() const; | 52 std::string ToString() const; |
54 | 53 |
55 ModelNeutralState model_neutral_state() const { | 54 ModelNeutralState model_neutral_state() const { |
56 return model_neutral_state_; | 55 return model_neutral_state_; |
57 } | 56 } |
58 int64 num_server_changes_remaining() const; | 57 int64 num_server_changes_remaining() const; |
59 bool is_share_usable() const; | 58 bool is_share_usable() const; |
60 ModelTypeSet initial_sync_ended() const; | 59 ModelTypeSet initial_sync_ended() const; |
61 const ProgressMarkerMap& download_progress_markers() const; | 60 const ProgressMarkerMap& download_progress_markers() const; |
62 bool has_more_to_sync() const; | 61 bool has_more_to_sync() const; |
63 bool is_silenced() const; | 62 bool is_silenced() const; |
64 int num_encryption_conflicts() const; | 63 int num_encryption_conflicts() const; |
65 int num_hierarchy_conflicts() const; | 64 int num_hierarchy_conflicts() const; |
66 int num_simple_conflicts() const; | 65 int num_simple_conflicts() const; |
67 int num_server_conflicts() const; | 66 int num_server_conflicts() const; |
68 SyncSourceInfo source() const; | 67 SyncSourceInfo source() const; |
69 bool notifications_enabled() const; | 68 bool notifications_enabled() const; |
70 size_t num_entries() const; | 69 size_t num_entries() const; |
71 base::Time sync_start_time() const; | 70 base::Time sync_start_time() const; |
72 bool retry_scheduled() const; | |
73 | 71 |
74 // Set iff this snapshot was not built using the default constructor. | 72 // Set iff this snapshot was not built using the default constructor. |
75 bool is_initialized() const; | 73 bool is_initialized() const; |
76 | 74 |
77 private: | 75 private: |
78 ModelNeutralState model_neutral_state_; | 76 ModelNeutralState model_neutral_state_; |
79 bool is_share_usable_; | 77 bool is_share_usable_; |
80 ModelTypeSet initial_sync_ended_; | 78 ModelTypeSet initial_sync_ended_; |
81 ProgressMarkerMap download_progress_markers_; | 79 ProgressMarkerMap download_progress_markers_; |
82 bool has_more_to_sync_; | 80 bool has_more_to_sync_; |
83 bool is_silenced_; | 81 bool is_silenced_; |
84 int num_encryption_conflicts_; | 82 int num_encryption_conflicts_; |
85 int num_hierarchy_conflicts_; | 83 int num_hierarchy_conflicts_; |
86 int num_simple_conflicts_; | 84 int num_simple_conflicts_; |
87 int num_server_conflicts_; | 85 int num_server_conflicts_; |
88 SyncSourceInfo source_; | 86 SyncSourceInfo source_; |
89 bool notifications_enabled_; | 87 bool notifications_enabled_; |
90 size_t num_entries_; | 88 size_t num_entries_; |
91 base::Time sync_start_time_; | 89 base::Time sync_start_time_; |
92 bool retry_scheduled_; | |
93 | 90 |
94 bool is_initialized_; | 91 bool is_initialized_; |
95 }; | 92 }; |
96 | 93 |
97 } // namespace sessions | 94 } // namespace sessions |
98 } // namespace syncer | 95 } // namespace syncer |
99 | 96 |
100 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 97 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
OLD | NEW |