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

Unified Diff: chrome/browser/sync/engine/get_commit_ids_command.h

Issue 8631021: [Sync] Prevent uploading throttled datatypes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For committing. Created 9 years, 1 month 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 | « no previous file | chrome/browser/sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/get_commit_ids_command.h
diff --git a/chrome/browser/sync/engine/get_commit_ids_command.h b/chrome/browser/sync/engine/get_commit_ids_command.h
index dcdbc519bede157a1107eb1787895656accddd98..6422e736b14a8f1bcf9ceb63c67b860dae694236 100644
--- a/chrome/browser/sync/engine/get_commit_ids_command.h
+++ b/chrome/browser/sync/engine/get_commit_ids_command.h
@@ -33,7 +33,8 @@ class GetCommitIdsCommand : public SyncerCommand {
// Builds a vector of IDs that should be committed.
void BuildCommitIds(const vector<int64>& unsynced_handles,
syncable::WriteTransaction* write_transaction,
- const ModelSafeRoutingInfo& routes);
+ const ModelSafeRoutingInfo& routes,
+ const syncable::ModelTypeSet& throttled_types);
// TODO(chron): Remove writes from this iterator. As a warning, this
// iterator causes writes to entries and so isn't a pure iterator.
@@ -109,27 +110,35 @@ class GetCommitIdsCommand : public SyncerCommand {
private:
// Removes all entries not ready for commit from |unsynced_handles|.
- // An entry is considered unready for commit if it's in conflict or requires
- // (re)encryption. Any datatype requiring encryption while the cryptographer
- // is missing a passphrase is considered unready for commit.
+ // An entry is considered unready for commit if:
+ // 1. It's in conflict or requires (re)encryption. Any datatype requiring
+ // encryption while the cryptographer is missing a passphrase is
+ // considered unready for commit.
+ // 2. Its type is currently throttled.
void FilterUnreadyEntries(
syncable::BaseTransaction* trans,
+ const syncable::ModelTypeSet& throttled_types,
syncable::Directory::UnsyncedMetaHandles* unsynced_handles);
void AddUncommittedParentsAndTheirPredecessors(
syncable::BaseTransaction* trans,
syncable::Id parent_id,
- const ModelSafeRoutingInfo& routes);
+ const ModelSafeRoutingInfo& routes,
+ const syncable::ModelTypeSet& throttled_types);
// OrderedCommitSet helpers for adding predecessors in order.
// TODO(ncarter): Refactor these so that the |result| parameter goes away,
// and AddItem doesn't need to consider two OrderedCommitSets.
- bool AddItem(syncable::Entry* item, sessions::OrderedCommitSet* result);
+ bool AddItem(syncable::Entry* item,
+ const syncable::ModelTypeSet& throttled_types,
+ sessions::OrderedCommitSet* result);
bool AddItemThenPredecessors(syncable::BaseTransaction* trans,
+ const syncable::ModelTypeSet& throttled_types,
syncable::Entry* item,
syncable::IndexedBitField inclusion_filter,
sessions::OrderedCommitSet* result);
void AddPredecessorsThenItem(syncable::BaseTransaction* trans,
+ const syncable::ModelTypeSet& throttled_types,
syncable::Entry* item,
syncable::IndexedBitField inclusion_filter,
const ModelSafeRoutingInfo& routes);
@@ -138,7 +147,8 @@ class GetCommitIdsCommand : public SyncerCommand {
void AddCreatesAndMoves(const vector<int64>& unsynced_handles,
syncable::WriteTransaction* write_transaction,
- const ModelSafeRoutingInfo& routes);
+ const ModelSafeRoutingInfo& routes,
+ const syncable::ModelTypeSet& throttled_types);
void AddDeletes(const vector<int64>& unsynced_handles,
syncable::WriteTransaction* write_transaction);
« no previous file with comments | « no previous file | chrome/browser/sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698