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

Side by Side Diff: chrome/browser/sync/engine/syncer_util.h

Issue 8922015: [Sync] Don't commit items with predecessors/parents in conflict. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments. Add racy test case Created 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Utility functions manipulating syncable::Entries, intended for use by the 5 // Utility functions manipulating syncable::Entries, intended for use by the
6 // syncer. 6 // syncer.
7 7
8 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
9 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 9 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
10 #pragma once 10 #pragma once
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 static void SplitServerInformationIntoNewEntry( 71 static void SplitServerInformationIntoNewEntry(
72 syncable::WriteTransaction* trans, 72 syncable::WriteTransaction* trans,
73 syncable::MutableEntry* entry); 73 syncable::MutableEntry* entry);
74 74
75 // This function is called on an entry when we can update the user-facing data 75 // This function is called on an entry when we can update the user-facing data
76 // from the server data. 76 // from the server data.
77 static void UpdateLocalDataFromServerData(syncable::WriteTransaction* trans, 77 static void UpdateLocalDataFromServerData(syncable::WriteTransaction* trans,
78 syncable::MutableEntry* entry); 78 syncable::MutableEntry* entry);
79 79
80 static VerifyCommitResult ValidateCommitEntry(syncable::Entry* entry);
81
82 static VerifyResult VerifyNewEntry(const SyncEntity& update, 80 static VerifyResult VerifyNewEntry(const SyncEntity& update,
83 syncable::Entry* target, 81 syncable::Entry* target,
84 const bool deleted); 82 const bool deleted);
85 83
86 // Assumes we have an existing entry; check here for updates that break 84 // Assumes we have an existing entry; check here for updates that break
87 // consistency rules. 85 // consistency rules.
88 static VerifyResult VerifyUpdateConsistency(syncable::WriteTransaction* trans, 86 static VerifyResult VerifyUpdateConsistency(syncable::WriteTransaction* trans,
89 const SyncEntity& update, 87 const SyncEntity& update,
90 syncable::MutableEntry* target, 88 syncable::MutableEntry* target,
91 const bool deleted, 89 const bool deleted,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const syncable::ScopedDirLookup &dir, 126 const syncable::ScopedDirLookup &dir,
129 std::set<syncable::Id>* deleted_folders); 127 std::set<syncable::Id>* deleted_folders);
130 128
131 private: 129 private:
132 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil); 130 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil);
133 }; 131 };
134 132
135 } // namespace browser_sync 133 } // namespace browser_sync
136 134
137 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 135 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698