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

Unified Diff: sync/syncable/mutable_entry.h

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 | « sync/syncable/model_type_unittest.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/mutable_entry.h
diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h
deleted file mode 100644
index 8cc5df74fff736b07e7f6acad7521d667489444c..0000000000000000000000000000000000000000
--- a/sync/syncable/mutable_entry.h
+++ /dev/null
@@ -1,96 +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 SYNC_SYNCABLE_MUTABLE_ENTRY_H_
-#define SYNC_SYNCABLE_MUTABLE_ENTRY_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "base/macros.h"
-#include "sync/base/sync_export.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/syncable/entry.h"
-#include "sync/syncable/metahandle_set.h"
-#include "sync/syncable/model_neutral_mutable_entry.h"
-
-namespace syncer {
-class WriteNode;
-
-namespace syncable {
-
-enum Create {
- CREATE
-};
-
-class WriteTransaction;
-
-// A mutable meta entry. Changes get committed to the database when the
-// WriteTransaction is destroyed.
-class SYNC_EXPORT MutableEntry : public ModelNeutralMutableEntry {
- void Init(WriteTransaction* trans, ModelType model_type,
- const Id& parent_id, const std::string& name);
-
- public:
- MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id);
- MutableEntry(WriteTransaction* trans,
- Create,
- ModelType model_type,
- const std::string& name);
- MutableEntry(WriteTransaction* trans,
- Create,
- ModelType model_type,
- const Id& parent_id,
- const std::string& name);
- MutableEntry(WriteTransaction* trans, GetByHandle, int64_t);
- MutableEntry(WriteTransaction* trans, GetById, const Id&);
- MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag);
- MutableEntry(WriteTransaction* trans, GetTypeRoot, ModelType type);
-
- inline WriteTransaction* write_transaction() const {
- return write_transaction_;
- }
-
- // Model-changing setters. These setters make user-visible changes that will
- // need to be communicated either to the local model or the sync server.
- void PutLocalExternalId(int64_t value);
- void PutMtime(base::Time value);
- void PutCtime(base::Time value);
- void PutParentId(const Id& value);
- void PutIsDir(bool value);
- void PutIsDel(bool value);
- void PutNonUniqueName(const std::string& value);
- void PutSpecifics(const sync_pb::EntitySpecifics& value);
- void PutUniquePosition(const UniquePosition& value);
-
- // Sets the position of this item, and updates the entry kernels of the
- // adjacent siblings so that list invariants are maintained. Returns false
- // and fails if |predecessor_id| does not identify a sibling. Pass the root
- // ID to put the node in first position.
- bool PutPredecessor(const Id& predecessor_id);
-
- void PutAttachmentMetadata(const sync_pb::AttachmentMetadata& value);
-
- // Update attachment metadata for |attachment_id| to indicate that this
- // attachment has been uploaded to the sync server.
- void MarkAttachmentAsOnServer(
- const sync_pb::AttachmentIdProto& attachment_id);
-
- private:
- // Kind of redundant. We should reduce the number of pointers
- // floating around if at all possible. Could we store this in Directory?
- // Scope: Set on construction, never changed after that.
- WriteTransaction* const write_transaction_;
-
- DISALLOW_COPY_AND_ASSIGN(MutableEntry);
-};
-
-// This function sets only the flags needed to get this entry to sync.
-bool MarkForSyncing(syncable::MutableEntry* e);
-
-} // namespace syncable
-} // namespace syncer
-
-#endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_
« no previous file with comments | « sync/syncable/model_type_unittest.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698