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

Unified Diff: components/sync/syncable/syncable_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
Index: components/sync/syncable/syncable_write_transaction.cc
diff --git a/sync/syncable/syncable_write_transaction.cc b/components/sync/syncable/syncable_write_transaction.cc
similarity index 86%
rename from sync/syncable/syncable_write_transaction.cc
rename to components/sync/syncable/syncable_write_transaction.cc
index 08b6aaae966ca3a87706913aa0b7e4bca8005302..ef4ab67bc55cd3ab3717a0f6027426b50bdca4c9 100644
--- a/sync/syncable/syncable_write_transaction.cc
+++ b/components/sync/syncable/syncable_write_transaction.cc
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/syncable/syncable_write_transaction.h"
+#include "components/sync/syncable/syncable_write_transaction.h"
#include <stdint.h>
#include <string>
-#include "sync/syncable/directory.h"
-#include "sync/syncable/directory_change_delegate.h"
-#include "sync/syncable/mutable_entry.h"
-#include "sync/syncable/transaction_observer.h"
-#include "sync/syncable/write_transaction_info.h"
+#include "components/sync/syncable/directory.h"
+#include "components/sync/syncable/directory_change_delegate.h"
+#include "components/sync/syncable/mutable_entry.h"
+#include "components/sync/syncable/transaction_observer.h"
+#include "components/sync/syncable/write_transaction_info.h"
namespace syncer {
namespace syncable {
@@ -20,7 +20,8 @@ namespace syncable {
const int64_t kInvalidTransactionVersion = -1;
WriteTransaction::WriteTransaction(const tracked_objects::Location& location,
- WriterTag writer, Directory* directory)
+ WriterTag writer,
+ Directory* directory)
: BaseWriteTransaction(location, "WriteTransaction", writer, directory),
transaction_version_(NULL) {
Lock();
@@ -91,8 +92,8 @@ ModelTypeSet WriteTransaction::NotifyTransactionChangingAndEnding(
DCHECK(!mutations.Get().empty());
WriteTransactionInfo write_transaction_info(
- directory_->kernel()->next_write_transaction_id,
- from_here_, writer_, mutations);
+ directory_->kernel()->next_write_transaction_id, from_here_, writer_,
+ mutations);
++directory_->kernel()->next_write_transaction_id;
ImmutableWriteTransactionInfo immutable_write_transaction_info(
@@ -112,8 +113,8 @@ ModelTypeSet WriteTransaction::NotifyTransactionChangingAndEnding(
delegate->HandleTransactionEndingChangeEvent(
immutable_write_transaction_info, this);
- directory_->kernel()->transaction_observer.Call(FROM_HERE,
- &TransactionObserver::OnTransactionWrite,
+ directory_->kernel()->transaction_observer.Call(
+ FROM_HERE, &TransactionObserver::OnTransactionWrite,
immutable_write_transaction_info, models_with_changes);
return models_with_changes;
@@ -144,8 +145,8 @@ void WriteTransaction::UpdateTransactionVersion(
if (!type_seen.Empty() && transaction_version_) {
DCHECK_EQ(1u, type_seen.Size());
- *transaction_version_ = directory_->GetTransactionVersion(
- type_seen.First().Get());
+ *transaction_version_ =
+ directory_->GetTransactionVersion(type_seen.First().Get());
}
}
@@ -169,7 +170,10 @@ WriteTransaction::~WriteTransaction() {
UnlockAndNotify(mutations);
}
-#define ENUM_CASE(x) case x: return #x; break
+#define ENUM_CASE(x) \
+ case x: \
+ return #x; \
+ break
std::string WriterTagToString(WriterTag writer_tag) {
switch (writer_tag) {
« no previous file with comments | « components/sync/syncable/syncable_write_transaction.h ('k') | components/sync/syncable/transaction_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698