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

Side by Side Diff: sync/syncable/directory.h

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_SYNCABLE_DIRECTORY_H_ 5 #ifndef SYNC_SYNCABLE_DIRECTORY_H_
6 #define SYNC_SYNCABLE_DIRECTORY_H_ 6 #define SYNC_SYNCABLE_DIRECTORY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "sync/base/sync_export.h" 14 #include "sync/base/sync_export.h"
15 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" 15 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
16 #include "sync/internal_api/public/util/weak_handle.h" 16 #include "sync/internal_api/public/util/weak_handle.h"
17 #include "sync/syncable/delete_journal.h" 17 #include "sync/syncable/delete_journal.h"
18 #include "sync/syncable/dir_open_result.h" 18 #include "sync/syncable/dir_open_result.h"
19 #include "sync/syncable/entry_kernel.h" 19 #include "sync/syncable/entry_kernel.h"
20 #include "sync/syncable/metahandle_set.h" 20 #include "sync/syncable/metahandle_set.h"
21 #include "sync/syncable/scoped_kernel_lock.h" 21 #include "sync/syncable/scoped_kernel_lock.h"
22 22
23 namespace syncer { 23 namespace syncer {
24 24
25 class Cryptographer; 25 class Cryptographer;
26 class DeleteJournal;
27 class TestUserShare;
26 class UnrecoverableErrorHandler; 28 class UnrecoverableErrorHandler;
27 29
28 namespace syncable { 30 namespace syncable {
29 31
30 class BaseTransaction; 32 class BaseTransaction;
31 class DirectoryChangeDelegate; 33 class DirectoryChangeDelegate;
32 class DirectoryBackingStore; 34 class DirectoryBackingStore;
33 class NigoriHandler; 35 class NigoriHandler;
34 class ScopedKernelLock; 36 class ScopedKernelLock;
35 class TransactionObserver; 37 class TransactionObserver;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 class SYNC_EXPORT Directory { 125 class SYNC_EXPORT Directory {
124 friend class BaseTransaction; 126 friend class BaseTransaction;
125 friend class Entry; 127 friend class Entry;
126 friend class MutableEntry; 128 friend class MutableEntry;
127 friend class ReadTransaction; 129 friend class ReadTransaction;
128 friend class ReadTransactionWithoutDB; 130 friend class ReadTransactionWithoutDB;
129 friend class ScopedKernelLock; 131 friend class ScopedKernelLock;
130 friend class ScopedKernelUnlock; 132 friend class ScopedKernelUnlock;
131 friend class WriteTransaction; 133 friend class WriteTransaction;
132 friend class SyncableDirectoryTest; 134 friend class SyncableDirectoryTest;
135 friend class syncer::DeleteJournal;
tim (not reviewing) 2013/01/14 23:32:48 Hmm.. let's avoid friend declarations if we can.
haitaol1 2013/01/15 19:44:31 Done.
136 friend class syncer::TestUserShare;
133 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, ManageDeleteJournals); 137 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, ManageDeleteJournals);
134 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, 138 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest,
135 TakeSnapshotGetsAllDirtyHandlesTest); 139 TakeSnapshotGetsAllDirtyHandlesTest);
136 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, 140 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest,
137 TakeSnapshotGetsOnlyDirtyHandlesTest); 141 TakeSnapshotGetsOnlyDirtyHandlesTest);
138 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, 142 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest,
139 TakeSnapshotGetsMetahandlesToPurge); 143 TakeSnapshotGetsMetahandlesToPurge);
140 144
141 public: 145 public:
142 static const FilePath::CharType kSyncDatabaseFilename[]; 146 static const FilePath::CharType kSyncDatabaseFilename[];
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 637
634 // Maintain deleted entries not in |kernel_| until it's verified that they 638 // Maintain deleted entries not in |kernel_| until it's verified that they
635 // are deleted in native models as well. 639 // are deleted in native models as well.
636 scoped_ptr<DeleteJournal> delete_journal_; 640 scoped_ptr<DeleteJournal> delete_journal_;
637 }; 641 };
638 642
639 } // namespace syncable 643 } // namespace syncable
640 } // namespace syncer 644 } // namespace syncer
641 645
642 #endif // SYNC_SYNCABLE_DIRECTORY_H_ 646 #endif // SYNC_SYNCABLE_DIRECTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698