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

Side by Side Diff: sync/internal_api/public/base_node.h

Issue 1172153007: [Sync] Clean up obsolete datatype specific methods in sync api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 5 years, 6 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
OLDNEW
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_BASE_NODE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 std::string GetTitle() const; 108 std::string GetTitle() const;
109 109
110 // Returns the model type of this object. The model type is set at node 110 // Returns the model type of this object. The model type is set at node
111 // creation time and is expected never to change. 111 // creation time and is expected never to change.
112 ModelType GetModelType() const; 112 ModelType GetModelType() const;
113 113
114 // Getter specific to the BOOKMARK datatype. Returns protobuf 114 // Getter specific to the BOOKMARK datatype. Returns protobuf
115 // data. Can only be called if GetModelType() == BOOKMARK. 115 // data. Can only be called if GetModelType() == BOOKMARK.
116 const sync_pb::BookmarkSpecifics& GetBookmarkSpecifics() const; 116 const sync_pb::BookmarkSpecifics& GetBookmarkSpecifics() const;
117 117
118 // Getter specific to the APPS datatype. Returns protobuf
119 // data. Can only be called if GetModelType() == APPS.
120 const sync_pb::AppSpecifics& GetAppSpecifics() const;
121
122 // Getter specific to the AUTOFILL datatype. Returns protobuf
123 // data. Can only be called if GetModelType() == AUTOFILL.
124 const sync_pb::AutofillSpecifics& GetAutofillSpecifics() const;
125
126 virtual const sync_pb::AutofillProfileSpecifics&
127 GetAutofillProfileSpecifics() const;
128
129 // Getter specific to the NIGORI datatype. Returns protobuf 118 // Getter specific to the NIGORI datatype. Returns protobuf
130 // data. Can only be called if GetModelType() == NIGORI. 119 // data. Can only be called if GetModelType() == NIGORI.
131 const sync_pb::NigoriSpecifics& GetNigoriSpecifics() const; 120 const sync_pb::NigoriSpecifics& GetNigoriSpecifics() const;
132 121
133 // Getter specific to the PASSWORD datatype. Returns protobuf 122 // Getter specific to the PASSWORD datatype. Returns protobuf
134 // data. Can only be called if GetModelType() == PASSWORD. 123 // data. Can only be called if GetModelType() == PASSWORD.
135 const sync_pb::PasswordSpecificsData& GetPasswordSpecifics() const; 124 const sync_pb::PasswordSpecificsData& GetPasswordSpecifics() const;
136 125
137 // Getter specific to the PREFERENCE datatype. Returns protobuf
138 // data. Can only be called if GetModelType() == PREFERENCE.
139 const sync_pb::PreferenceSpecifics& GetPreferenceSpecifics() const;
140
141 // Getter specific to the THEME datatype. Returns protobuf
142 // data. Can only be called if GetModelType() == THEME.
143 const sync_pb::ThemeSpecifics& GetThemeSpecifics() const;
144
145 // Getter specific to the TYPED_URLS datatype. Returns protobuf 126 // Getter specific to the TYPED_URLS datatype. Returns protobuf
146 // data. Can only be called if GetModelType() == TYPED_URLS. 127 // data. Can only be called if GetModelType() == TYPED_URLS.
147 const sync_pb::TypedUrlSpecifics& GetTypedUrlSpecifics() const; 128 const sync_pb::TypedUrlSpecifics& GetTypedUrlSpecifics() const;
148 129
149 // Getter specific to the EXTENSIONS datatype. Returns protobuf
150 // data. Can only be called if GetModelType() == EXTENSIONS.
151 const sync_pb::ExtensionSpecifics& GetExtensionSpecifics() const;
152
153 // Getter specific to the SESSIONS datatype. Returns protobuf
154 // data. Can only be called if GetModelType() == SESSIONS.
155 const sync_pb::SessionSpecifics& GetSessionSpecifics() const;
156
157 // Getter specific to the DEVICE_INFO datatype. Returns protobuf
158 // data. Can only be called if GetModelType() == DEVICE_INFO.
159 const sync_pb::DeviceInfoSpecifics& GetDeviceInfoSpecifics() const;
160
161 // Getter specific to the EXPERIMENTS datatype. Returns protobuf 130 // Getter specific to the EXPERIMENTS datatype. Returns protobuf
162 // data. Can only be called if GetModelType() == EXPERIMENTS. 131 // data. Can only be called if GetModelType() == EXPERIMENTS.
163 const sync_pb::ExperimentsSpecifics& GetExperimentsSpecifics() const; 132 const sync_pb::ExperimentsSpecifics& GetExperimentsSpecifics() const;
164 133
165 // Getter specific to the PRIORITY_PREFERENCE datatype. Returns protobuf
166 // data. Can only be called if GetModelType() == PRIORITY_PREFERENCE.
167 const sync_pb::PriorityPreferenceSpecifics&
168 GetPriorityPreferenceSpecifics() const;
169
170 const sync_pb::EntitySpecifics& GetEntitySpecifics() const; 134 const sync_pb::EntitySpecifics& GetEntitySpecifics() const;
171 135
172 // Returns the local external ID associated with the node. 136 // Returns the local external ID associated with the node.
173 int64 GetExternalId() const; 137 int64 GetExternalId() const;
174 138
175 // Returns true iff this node has children. 139 // Returns true iff this node has children.
176 bool HasChildren() const; 140 bool HasChildren() const;
177 141
178 // Return the ID of the node immediately before this in the sibling order. 142 // Return the ID of the node immediately before this in the sibling order.
179 // For the first node in the ordering, return 0. 143 // For the first node in the ordering, return 0.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 220
257 // Same as |unencrypted_data_|, but for legacy password encryption. 221 // Same as |unencrypted_data_|, but for legacy password encryption.
258 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; 222 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
259 223
260 DISALLOW_COPY_AND_ASSIGN(BaseNode); 224 DISALLOW_COPY_AND_ASSIGN(BaseNode);
261 }; 225 };
262 226
263 } // namespace syncer 227 } // namespace syncer
264 228
265 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 229 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698