diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 03:17:37 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 03:17:37 +0000 |
commit | c172e9694ac895b74744df05b0983f7a1e97f40f (patch) | |
tree | 2ecdc51a3b2c2626b56be93d6092d4aa024a2d8e /sync/syncable | |
parent | e585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4 (diff) | |
download | chromium_src-c172e9694ac895b74744df05b0983f7a1e97f40f.zip chromium_src-c172e9694ac895b74744df05b0983f7a1e97f40f.tar.gz chromium_src-c172e9694ac895b74744df05b0983f7a1e97f40f.tar.bz2 |
sync: Expose BuildCommitItem helper function
Refactor the part of BuildCommitCommand responsible for serializing a
single syncable::Entry into a commit message protobuf into a separate
function. This will be useful when we try to refactor the sync engine
to be more model-type aware.
BUG=278484
Review URL: https://chromiumcodereview.appspot.com/22859066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable')
-rw-r--r-- | sync/syncable/syncable_base_transaction.cc | 9 | ||||
-rw-r--r-- | sync/syncable/syncable_base_transaction.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sync/syncable/syncable_base_transaction.cc b/sync/syncable/syncable_base_transaction.cc index d068bb9..a1d3e85 100644 --- a/sync/syncable/syncable_base_transaction.cc +++ b/sync/syncable/syncable_base_transaction.cc @@ -10,12 +10,13 @@ namespace syncer { namespace syncable { -Directory* BaseTransaction::directory() const { - return directory_; +// static +Id BaseTransaction::root_id() { + return Id(); } -Id BaseTransaction::root_id() const { - return Id(); +Directory* BaseTransaction::directory() const { + return directory_; } void BaseTransaction::Lock() { diff --git a/sync/syncable/syncable_base_transaction.h b/sync/syncable/syncable_base_transaction.h index e15a38b..58c7bfa 100644 --- a/sync/syncable/syncable_base_transaction.h +++ b/sync/syncable/syncable_base_transaction.h @@ -33,8 +33,9 @@ std::string WriterTagToString(WriterTag writer_tag); class SYNC_EXPORT BaseTransaction { public: + static Id root_id(); + Directory* directory() const; - Id root_id() const; virtual ~BaseTransaction(); |