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 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 21 matching lines...) Expand all Loading... |
32 SyncSessionSnapshot( | 32 SyncSessionSnapshot( |
33 const ModelNeutralState& model_neutral_state, | 33 const ModelNeutralState& model_neutral_state, |
34 const ProgressMarkerMap& download_progress_markers, | 34 const ProgressMarkerMap& download_progress_markers, |
35 bool is_silenced, | 35 bool is_silenced, |
36 int num_encryption_conflicts, | 36 int num_encryption_conflicts, |
37 int num_hierarchy_conflicts, | 37 int num_hierarchy_conflicts, |
38 int num_server_conflicts, | 38 int num_server_conflicts, |
39 bool notifications_enabled, | 39 bool notifications_enabled, |
40 size_t num_entries, | 40 size_t num_entries, |
41 base::Time sync_start_time, | 41 base::Time sync_start_time, |
42 base::Time poll_finish_time, | |
43 const std::vector<int>& num_entries_by_type, | 42 const std::vector<int>& num_entries_by_type, |
44 const std::vector<int>& num_to_delete_entries_by_type, | 43 const std::vector<int>& num_to_delete_entries_by_type, |
45 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source); | 44 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source); |
46 ~SyncSessionSnapshot(); | 45 ~SyncSessionSnapshot(); |
47 | 46 |
48 // Caller takes ownership of the returned dictionary. | 47 // Caller takes ownership of the returned dictionary. |
49 base::DictionaryValue* ToValue() const; | 48 base::DictionaryValue* ToValue() const; |
50 | 49 |
51 std::string ToString() const; | 50 std::string ToString() const; |
52 | 51 |
53 ModelNeutralState model_neutral_state() const { | 52 ModelNeutralState model_neutral_state() const { |
54 return model_neutral_state_; | 53 return model_neutral_state_; |
55 } | 54 } |
56 const ProgressMarkerMap& download_progress_markers() const; | 55 const ProgressMarkerMap& download_progress_markers() const; |
57 bool is_silenced() const; | 56 bool is_silenced() const; |
58 int num_encryption_conflicts() const; | 57 int num_encryption_conflicts() const; |
59 int num_hierarchy_conflicts() const; | 58 int num_hierarchy_conflicts() const; |
60 int num_server_conflicts() const; | 59 int num_server_conflicts() const; |
61 bool notifications_enabled() const; | 60 bool notifications_enabled() const; |
62 size_t num_entries() const; | 61 size_t num_entries() const; |
63 base::Time sync_start_time() const; | 62 base::Time sync_start_time() const; |
64 base::Time poll_finish_time() const; | |
65 const std::vector<int>& num_entries_by_type() const; | 63 const std::vector<int>& num_entries_by_type() const; |
66 const std::vector<int>& num_to_delete_entries_by_type() const; | 64 const std::vector<int>& num_to_delete_entries_by_type() const; |
67 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source() const; | 65 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source() const; |
68 | 66 |
69 // Set iff this snapshot was not built using the default constructor. | 67 // Set iff this snapshot was not built using the default constructor. |
70 bool is_initialized() const; | 68 bool is_initialized() const; |
71 | 69 |
72 private: | 70 private: |
73 ModelNeutralState model_neutral_state_; | 71 ModelNeutralState model_neutral_state_; |
74 ProgressMarkerMap download_progress_markers_; | 72 ProgressMarkerMap download_progress_markers_; |
75 bool is_silenced_; | 73 bool is_silenced_; |
76 int num_encryption_conflicts_; | 74 int num_encryption_conflicts_; |
77 int num_hierarchy_conflicts_; | 75 int num_hierarchy_conflicts_; |
78 int num_server_conflicts_; | 76 int num_server_conflicts_; |
79 bool notifications_enabled_; | 77 bool notifications_enabled_; |
80 size_t num_entries_; | 78 size_t num_entries_; |
81 base::Time sync_start_time_; | 79 base::Time sync_start_time_; |
82 base::Time poll_finish_time_; | |
83 | 80 |
84 std::vector<int> num_entries_by_type_; | 81 std::vector<int> num_entries_by_type_; |
85 std::vector<int> num_to_delete_entries_by_type_; | 82 std::vector<int> num_to_delete_entries_by_type_; |
86 | 83 |
87 // This enum value used to be an important part of the sync protocol, but is | 84 // This enum value used to be an important part of the sync protocol, but is |
88 // now deprecated. We continue to use it in the snapshot because there is | 85 // now deprecated. We continue to use it in the snapshot because there is |
89 // still some value in displaying it on the about:sync page. | 86 // still some value in displaying it on the about:sync page. |
90 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; | 87 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; |
91 | 88 |
92 bool is_initialized_; | 89 bool is_initialized_; |
93 }; | 90 }; |
94 | 91 |
95 } // namespace sessions | 92 } // namespace sessions |
96 } // namespace syncer | 93 } // namespace syncer |
97 | 94 |
98 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 95 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
OLD | NEW |