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 COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_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 "sync/base/sync_export.h" | 14 #include "components/sync/base/model_type.h" |
15 #include "sync/internal_api/public/base/model_type.h" | 15 #include "components/sync/base/progress_marker_map.h" |
16 #include "sync/internal_api/public/base/progress_marker_map.h" | 16 #include "components/sync/base/sync_export.h" |
17 #include "sync/internal_api/public/sessions/model_neutral_state.h" | 17 #include "components/sync/sessions/model_neutral_state.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class DictionaryValue; | 20 class DictionaryValue; |
21 } | 21 } |
22 | 22 |
23 namespace syncer { | 23 namespace syncer { |
24 namespace sessions { | 24 namespace sessions { |
25 | 25 |
26 // An immutable snapshot of state from a SyncSession. Convenient to use as | 26 // An immutable snapshot of state from a SyncSession. Convenient to use as |
27 // part of notifications as it is inherently thread-safe. | 27 // part of notifications as it is inherently thread-safe. |
(...skipping 17 matching lines...) Expand all Loading... |
45 const std::vector<int>& num_entries_by_type, | 45 const std::vector<int>& num_entries_by_type, |
46 const std::vector<int>& num_to_delete_entries_by_type, | 46 const std::vector<int>& num_to_delete_entries_by_type, |
47 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source); | 47 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source); |
48 SyncSessionSnapshot(const SyncSessionSnapshot& other); | 48 SyncSessionSnapshot(const SyncSessionSnapshot& other); |
49 ~SyncSessionSnapshot(); | 49 ~SyncSessionSnapshot(); |
50 | 50 |
51 std::unique_ptr<base::DictionaryValue> ToValue() const; | 51 std::unique_ptr<base::DictionaryValue> ToValue() const; |
52 | 52 |
53 std::string ToString() const; | 53 std::string ToString() const; |
54 | 54 |
55 ModelNeutralState model_neutral_state() const { | 55 ModelNeutralState model_neutral_state() const { return model_neutral_state_; } |
56 return model_neutral_state_; | |
57 } | |
58 const ProgressMarkerMap& download_progress_markers() const; | 56 const ProgressMarkerMap& download_progress_markers() const; |
59 bool is_silenced() const; | 57 bool is_silenced() const; |
60 int num_encryption_conflicts() const; | 58 int num_encryption_conflicts() const; |
61 int num_hierarchy_conflicts() const; | 59 int num_hierarchy_conflicts() const; |
62 int num_server_conflicts() const; | 60 int num_server_conflicts() const; |
63 bool notifications_enabled() const; | 61 bool notifications_enabled() const; |
64 size_t num_entries() const; | 62 size_t num_entries() const; |
65 base::Time sync_start_time() const; | 63 base::Time sync_start_time() const; |
66 base::Time poll_finish_time() const; | 64 base::Time poll_finish_time() const; |
67 const std::vector<int>& num_entries_by_type() const; | 65 const std::vector<int>& num_entries_by_type() const; |
(...skipping 22 matching lines...) Expand all Loading... |
90 // now deprecated. We continue to use it in the snapshot because there is | 88 // now deprecated. We continue to use it in the snapshot because there is |
91 // still some value in displaying it on the about:sync page. | 89 // still some value in displaying it on the about:sync page. |
92 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; | 90 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source_; |
93 | 91 |
94 bool is_initialized_; | 92 bool is_initialized_; |
95 }; | 93 }; |
96 | 94 |
97 } // namespace sessions | 95 } // namespace sessions |
98 } // namespace syncer | 96 } // namespace syncer |
99 | 97 |
100 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ | 98 #endif // COMPONENTS_SYNC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ |
OLD | NEW |