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

Unified Diff: components/sync/core/write_transaction.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « components/sync/core/write_transaction.h ('k') | components/sync/core_impl/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « components/sync/core/write_transaction.h ('k') | components/sync/core_impl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698