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