[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / sync / syncable / syncable_model_neutral_write_transaction.h
blobf96725ed69f5dd219aed3c41a2a81e6871a8d21b
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SYNC_SYNCABLE_SYNCABLE_MODEL_NEUTRAL_WRITE_TRANSACTION_H_
6 #define SYNC_SYNCABLE_SYNCABLE_MODEL_NEUTRAL_WRITE_TRANSACTION_H_
8 #include "sync/base/sync_export.h"
9 #include "sync/syncable/metahandle_set.h"
10 #include "sync/syncable/syncable_base_write_transaction.h"
12 namespace syncer {
13 namespace syncable {
15 // A transaction used to instantiate Entries or ModelNeutralMutableEntries.
17 // This allows it to be used when making changes to sync entity properties that
18 // do not need to be kept in sync with the associated native model.
20 // This class differs internally from WriteTransactions in that it does a less
21 // good job of tracking and reporting on changes to the entries modified within
22 // its scope. This is because its changes do not need to be reported to the
23 // DirectoryChangeDelegate.
24 class SYNC_EXPORT_PRIVATE ModelNeutralWriteTransaction
25 : public BaseWriteTransaction {
26 public:
27 ModelNeutralWriteTransaction(
28 const tracked_objects::Location& location,
29 WriterTag writer,
30 Directory* directory);
31 virtual ~ModelNeutralWriteTransaction();
33 virtual void TrackChangesTo(const EntryKernel* entry) OVERRIDE;
35 private:
36 MetahandleSet modified_handles_;
38 DISALLOW_COPY_AND_ASSIGN(ModelNeutralWriteTransaction);
41 } // namespace syncable
42 } // namespace syncer
44 #endif // SYNC_SYNCABLE_SYNCABLE_MODEL_NEUTRAL_WRITE_TRANSACTION_H_