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

Unified Diff: chrome/browser/sync/engine/syncapi.h

Issue 3072022: Added constants, strings, protos for app sync. (Closed)
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncapi.h
diff --git a/chrome/browser/sync/engine/syncapi.h b/chrome/browser/sync/engine/syncapi.h
index 65872072b276c4101057a6e9d59729e918e7107c..8c52233516d55fb0735cca1f4fb1ce52d3af2ef6 100644
--- a/chrome/browser/sync/engine/syncapi.h
+++ b/chrome/browser/sync/engine/syncapi.h
@@ -74,6 +74,7 @@ class WriteTransaction;
}
namespace sync_pb {
+class AppSpecifics;
class AutofillSpecifics;
class BookmarkSpecifics;
class EntitySpecifics;
@@ -175,6 +176,10 @@ class BaseNode {
// TODO(ncarter): Remove this datatype-specific accessor.
void GetFaviconBytes(std::vector<unsigned char>* output) const;
+ // Getter specific to the APPS datatype. Returns protobuf
+ // data. Can only be called if GetModelType() == APPS.
+ const sync_pb::AppSpecifics& GetAppSpecifics() const;
+
// Getter specific to the AUTOFILL datatype. Returns protobuf
// data. Can only be called if GetModelType() == AUTOFILL.
const sync_pb::AutofillSpecifics& GetAutofillSpecifics() const;
@@ -316,6 +321,10 @@ class WriteNode : public BaseNode {
void SetURL(const GURL& url);
void SetFaviconBytes(const std::vector<unsigned char>& bytes);
+ // Set the app specifics (id, update url, enabled state, etc).
+ // Should only be called if GetModelType() == APPS.
+ void SetAppSpecifics(const sync_pb::AppSpecifics& specifics);
+
// Set the autofill specifics (name and value).
// Should only be called if GetModelType() == AUTOFILL.
void SetAutofillSpecifics(const sync_pb::AutofillSpecifics& specifics);
@@ -363,6 +372,8 @@ class WriteNode : public BaseNode {
// for internal initialization (you can use them to set the modeltype).
// Additionally, they will mark for syncing if the underlying value
// changes.
+ void PutAppSpecificsAndMarkForSyncing(
+ const sync_pb::AppSpecifics& new_value);
void PutAutofillSpecificsAndMarkForSyncing(
const sync_pb::AutofillSpecifics& new_value);
void PutBookmarkSpecificsAndMarkForSyncing(
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698