| Index: components/sync/core/write_transaction.cc
|
| diff --git a/sync/internal_api/write_transaction.cc b/components/sync/core/write_transaction.cc
|
| similarity index 79%
|
| rename from sync/internal_api/write_transaction.cc
|
| rename to components/sync/core/write_transaction.cc
|
| index 8ae7f9bb0c7b90c1c368624c7bf6ee654de82cf7..75558d4d7802ec937a3bfd23573fb38680913189 100644
|
| --- a/sync/internal_api/write_transaction.cc
|
| +++ b/components/sync/core/write_transaction.cc
|
| @@ -2,13 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "sync/internal_api/public/write_transaction.h"
|
| +#include "components/sync/core/write_transaction.h"
|
|
|
| #include <stdint.h>
|
|
|
| -#include "sync/syncable/directory.h"
|
| -#include "sync/syncable/mutable_entry.h"
|
| -#include "sync/syncable/syncable_write_transaction.h"
|
| +#include "components/sync/syncable/directory.h"
|
| +#include "components/sync/syncable/mutable_entry.h"
|
| +#include "components/sync/syncable/syncable_write_transaction.h"
|
|
|
| namespace syncer {
|
|
|
| @@ -16,8 +16,7 @@ namespace syncer {
|
| // WriteTransaction member definitions
|
| WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
|
| UserShare* share)
|
| - : BaseTransaction(share),
|
| - transaction_(NULL) {
|
| + : BaseTransaction(share), transaction_(NULL) {
|
| transaction_ = new syncable::WriteTransaction(from_here, syncable::SYNCAPI,
|
| share->directory.get());
|
| }
|
| @@ -26,9 +25,8 @@ WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
|
| UserShare* share,
|
| int64_t* new_model_version)
|
| : BaseTransaction(share), transaction_(NULL) {
|
| - transaction_ = new syncable::WriteTransaction(from_here,
|
| - share->directory.get(),
|
| - new_model_version);
|
| + transaction_ = new syncable::WriteTransaction(
|
| + from_here, share->directory.get(), new_model_version);
|
| }
|
|
|
| WriteTransaction::~WriteTransaction() {
|
| @@ -46,9 +44,7 @@ void WriteTransaction::SetDataTypeContext(
|
| DCHECK(ProtocolTypes().Has(type));
|
| int field_number = GetSpecificsFieldNumberFromModelType(type);
|
| sync_pb::DataTypeContext local_context;
|
| - GetDirectory()->GetDataTypeContext(transaction_,
|
| - type,
|
| - &local_context);
|
| + GetDirectory()->GetDataTypeContext(transaction_, type, &local_context);
|
| if (local_context.context() == context)
|
| return;
|
|
|
| @@ -59,9 +55,7 @@ void WriteTransaction::SetDataTypeContext(
|
| DCHECK_GE(local_context.version(), 0);
|
| local_context.set_version(local_context.version() + 1);
|
| local_context.set_context(context);
|
| - GetDirectory()->SetDataTypeContext(transaction_,
|
| - type,
|
| - local_context);
|
| + GetDirectory()->SetDataTypeContext(transaction_, type, local_context);
|
| if (refresh_status == syncer::SyncChangeProcessor::REFRESH_NEEDED) {
|
| DVLOG(1) << "Forcing refresh of type " << ModelTypeToString(type);
|
| // Clear the progress token from the progress markers. Preserve all other
|
| @@ -88,8 +82,7 @@ void WriteTransaction::UpdateEntriesMarkAttachmentAsOnServer(
|
| GetDirectory()->GetMetahandlesByAttachmentId(
|
| transaction_, attachment_id.GetProto(), &handles);
|
| for (syncable::Directory::Metahandles::iterator iter = handles.begin();
|
| - iter != handles.end();
|
| - ++iter) {
|
| + iter != handles.end(); ++iter) {
|
| syncable::MutableEntry entry(transaction_, syncable::GET_BY_HANDLE, *iter);
|
| entry.MarkAttachmentAsOnServer(attachment_id.GetProto());
|
| }
|
|
|