Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: sync/internal_api/public/sessions/sync_session_snapshot.h

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 // part of notifications as it is inherently thread-safe. 26 // part of notifications as it is inherently thread-safe.
27 // 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,
28 // consider passing around immutable references instead of values. 28 // consider passing around immutable references instead of values.
29 // Default copy and assign welcome. 29 // Default copy and assign welcome.
30 class SyncSessionSnapshot { 30 class SyncSessionSnapshot {
31 public: 31 public:
32 SyncSessionSnapshot(); 32 SyncSessionSnapshot();
33 SyncSessionSnapshot( 33 SyncSessionSnapshot(
34 const ModelNeutralState& model_neutral_state, 34 const ModelNeutralState& model_neutral_state,
35 bool is_share_usable, 35 bool is_share_usable,
36 syncable::ModelTypeSet initial_sync_ended, 36 syncer::ModelTypeSet initial_sync_ended,
37 const syncable::ModelTypePayloadMap& download_progress_markers, 37 const syncer::ModelTypePayloadMap& download_progress_markers,
38 bool more_to_sync, 38 bool more_to_sync,
39 bool is_silenced, 39 bool is_silenced,
40 int num_encryption_conflicts, 40 int num_encryption_conflicts,
41 int num_hierarchy_conflicts, 41 int num_hierarchy_conflicts,
42 int num_simple_conflicts, 42 int num_simple_conflicts,
43 int num_server_conflicts, 43 int num_server_conflicts,
44 const SyncSourceInfo& source, 44 const SyncSourceInfo& source,
45 bool notifications_enabled, 45 bool notifications_enabled,
46 size_t num_entries, 46 size_t num_entries,
47 base::Time sync_start_time, 47 base::Time sync_start_time,
48 bool retry_scheduled); 48 bool retry_scheduled);
49 ~SyncSessionSnapshot(); 49 ~SyncSessionSnapshot();
50 50
51 // Caller takes ownership of the returned dictionary. 51 // Caller takes ownership of the returned dictionary.
52 base::DictionaryValue* ToValue() const; 52 base::DictionaryValue* ToValue() const;
53 53
54 std::string ToString() const; 54 std::string ToString() const;
55 55
56 ModelNeutralState model_neutral_state() const { 56 ModelNeutralState model_neutral_state() const {
57 return model_neutral_state_; 57 return model_neutral_state_;
58 } 58 }
59 int64 num_server_changes_remaining() const; 59 int64 num_server_changes_remaining() const;
60 bool is_share_usable() const; 60 bool is_share_usable() const;
61 syncable::ModelTypeSet initial_sync_ended() const; 61 syncer::ModelTypeSet initial_sync_ended() const;
62 syncable::ModelTypePayloadMap download_progress_markers() const; 62 syncer::ModelTypePayloadMap download_progress_markers() const;
63 bool has_more_to_sync() const; 63 bool has_more_to_sync() const;
64 bool is_silenced() const; 64 bool is_silenced() const;
65 int num_encryption_conflicts() const; 65 int num_encryption_conflicts() const;
66 int num_hierarchy_conflicts() const; 66 int num_hierarchy_conflicts() const;
67 int num_simple_conflicts() const; 67 int num_simple_conflicts() const;
68 int num_server_conflicts() const; 68 int num_server_conflicts() const;
69 SyncSourceInfo source() const; 69 SyncSourceInfo source() const;
70 bool notifications_enabled() const; 70 bool notifications_enabled() const;
71 size_t num_entries() const; 71 size_t num_entries() const;
72 base::Time sync_start_time() const; 72 base::Time sync_start_time() const;
73 bool retry_scheduled() const; 73 bool retry_scheduled() const;
74 74
75 private: 75 private:
76 ModelNeutralState model_neutral_state_; 76 ModelNeutralState model_neutral_state_;
77 bool is_share_usable_; 77 bool is_share_usable_;
78 syncable::ModelTypeSet initial_sync_ended_; 78 syncer::ModelTypeSet initial_sync_ended_;
79 syncable::ModelTypePayloadMap download_progress_markers_; 79 syncer::ModelTypePayloadMap download_progress_markers_;
80 bool has_more_to_sync_; 80 bool has_more_to_sync_;
81 bool is_silenced_; 81 bool is_silenced_;
82 int num_encryption_conflicts_; 82 int num_encryption_conflicts_;
83 int num_hierarchy_conflicts_; 83 int num_hierarchy_conflicts_;
84 int num_simple_conflicts_; 84 int num_simple_conflicts_;
85 int num_server_conflicts_; 85 int num_server_conflicts_;
86 SyncSourceInfo source_; 86 SyncSourceInfo source_;
87 bool notifications_enabled_; 87 bool notifications_enabled_;
88 size_t num_entries_; 88 size_t num_entries_;
89 base::Time sync_start_time_; 89 base::Time sync_start_time_;
90 bool retry_scheduled_; 90 bool retry_scheduled_;
91 }; 91 };
92 92
93 } // namespace sessions 93 } // namespace sessions
94 } // namespace syncer 94 } // namespace syncer
95 95
96 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ 96 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/model_neutral_state.h ('k') | sync/internal_api/public/sessions/sync_session_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698