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

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

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Rename GetAttachments to GetLocalAttachmentsForUpload. Created 6 years, 8 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
« no previous file with comments | « sync/internal_api/public/DEPS ('k') | sync/protocol/attachments.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "sync/api/attachments/attachment.h"
15 #include "sync/base/sync_export.h" 16 #include "sync/base/sync_export.h"
16 #include "sync/internal_api/public/base/model_type.h" 17 #include "sync/internal_api/public/base/model_type.h"
17 #include "sync/protocol/sync.pb.h" 18 #include "sync/protocol/sync.pb.h"
18 #include "url/gurl.h" 19 #include "url/gurl.h"
19 20
20 // Forward declarations of internal class types so that sync API objects 21 // Forward declarations of internal class types so that sync API objects
21 // may have opaque pointers to these types. 22 // may have opaque pointers to these types.
22 namespace base { 23 namespace base {
23 class DictionaryValue; 24 class DictionaryValue;
24 } 25 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 // Returns the total number of nodes including and beneath this node. 195 // Returns the total number of nodes including and beneath this node.
195 // Recursively iterates through all children. 196 // Recursively iterates through all children.
196 int GetTotalNodeCount() const; 197 int GetTotalNodeCount() const;
197 198
198 // Returns this item's position within its parent. 199 // Returns this item's position within its parent.
199 // Do not call this function on items that do not support positioning 200 // Do not call this function on items that do not support positioning
200 // (ie. non-bookmarks). 201 // (ie. non-bookmarks).
201 int GetPositionIndex() const; 202 int GetPositionIndex() const;
202 203
204 // Returns this item's attachment ids.
205 const syncer::AttachmentIdList GetAttachmentIds() const;
206
203 // These virtual accessors provide access to data members of derived classes. 207 // These virtual accessors provide access to data members of derived classes.
204 virtual const syncable::Entry* GetEntry() const = 0; 208 virtual const syncable::Entry* GetEntry() const = 0;
205 virtual const BaseTransaction* GetTransaction() const = 0; 209 virtual const BaseTransaction* GetTransaction() const = 0;
206 210
207 // Returns a base::DictionaryValue serialization of this node. 211 // Returns a base::DictionaryValue serialization of this node.
208 base::DictionaryValue* ToValue() const; 212 base::DictionaryValue* ToValue() const;
209 213
210 protected: 214 protected:
211 BaseNode(); 215 BaseNode();
212 virtual ~BaseNode(); 216 virtual ~BaseNode();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 256
253 // Same as |unencrypted_data_|, but for legacy password encryption. 257 // Same as |unencrypted_data_|, but for legacy password encryption.
254 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; 258 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_;
255 259
256 DISALLOW_COPY_AND_ASSIGN(BaseNode); 260 DISALLOW_COPY_AND_ASSIGN(BaseNode);
257 }; 261 };
258 262
259 } // namespace syncer 263 } // namespace syncer
260 264
261 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ 265 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/DEPS ('k') | sync/protocol/attachments.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698