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

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

Issue 2407163004: [Sync] Move some directory-related things from core/ to syncable/. (Closed)
Patch Set: Created 4 years, 2 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_node.cc ('k') | components/sync/core/write_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/write_transaction.h
diff --git a/components/sync/core/write_transaction.h b/components/sync/core/write_transaction.h
deleted file mode 100644
index a76aa4cb36262f6b899fbd2a6c4e008d02bcdfd3..0000000000000000000000000000000000000000
--- a/components/sync/core/write_transaction.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_SYNC_CORE_WRITE_TRANSACTION_H_
-#define COMPONENTS_SYNC_CORE_WRITE_TRANSACTION_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "components/sync/core/base_transaction.h"
-#include "components/sync/model/sync_change_processor.h"
-
-namespace tracked_objects {
-class Location;
-} // namespace tracked_objects
-
-namespace syncer {
-
-namespace syncable {
-class BaseTransaction;
-class WriteTransaction;
-} // namespace syncable
-
-// Sync API's WriteTransaction is a read/write BaseTransaction. It wraps
-// a syncable::WriteTransaction.
-//
-// NOTE: Only a single model type can be mutated for a given
-// WriteTransaction.
-class WriteTransaction : public BaseTransaction {
- public:
- // Start a new read/write transaction.
- WriteTransaction(const tracked_objects::Location& from_here,
- UserShare* share);
- // |transaction_version| stores updated model and nodes version if model
- // is changed by the transaction, or syncable::kInvalidTransaction
- // if not after transaction is closed. This constructor is used for model
- // types that support embassy data.
- WriteTransaction(const tracked_objects::Location& from_here,
- UserShare* share,
- int64_t* transaction_version);
- ~WriteTransaction() override;
-
- // Provide access to the syncable transaction from the API WriteNode.
- syncable::BaseTransaction* GetWrappedTrans() const override;
- syncable::WriteTransaction* GetWrappedWriteTrans() { return transaction_; }
-
- // Set's a |type|'s local context. |refresh_status| controls whether
- // a datatype refresh is performed (clearing the progress marker token and
- // setting the version of all synced entities to 1).
- void SetDataTypeContext(
- ModelType type,
- SyncChangeProcessor::ContextRefreshStatus refresh_status,
- const std::string& context);
-
- // Update all entries that refer to |attachment_id| indicating that
- // |attachment_id| has been uploaded to the sync server.
- void UpdateEntriesMarkAttachmentAsOnServer(const AttachmentId& attachment_id);
-
- protected:
- WriteTransaction() {}
-
- void SetTransaction(syncable::WriteTransaction* trans) {
- transaction_ = trans;
- }
-
- private:
- void* operator new(size_t size); // Transaction is meant for stack use only.
-
- // The underlying syncable object which this class wraps.
- syncable::WriteTransaction* transaction_;
-
- DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
-};
-
-} // namespace syncer
-
-#endif // COMPONENTS_SYNC_CORE_WRITE_TRANSACTION_H_
« no previous file with comments | « components/sync/core/write_node.cc ('k') | components/sync/core/write_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698