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

Unified Diff: components/sync/engine_impl/model_type_worker.cc

Issue 2350803005: [Sync] Fixing two bugs in the worker revealed by trying to add an encryption integration test. (Closed)
Patch Set: Merging conflict. Created 4 years, 3 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
Index: components/sync/engine_impl/model_type_worker.cc
diff --git a/components/sync/engine_impl/model_type_worker.cc b/components/sync/engine_impl/model_type_worker.cc
index f8786421af2f128d3ab3b2c83fa4b9f77ac35a7c..56604e03ab4a9154b18eb14f6c14210da6d92b96 100644
--- a/components/sync/engine_impl/model_type_worker.cc
+++ b/components/sync/engine_impl/model_type_worker.cc
@@ -73,10 +73,6 @@ void ModelTypeWorker::UpdateCryptographer(
DCHECK(cryptographer);
cryptographer_ = std::move(cryptographer);
OnCryptographerUpdated();
-
- // Nudge the scheduler if we're now allowed to commit.
- if (CanCommitItems())
- nudge_handler_->NudgeForCommit(type_);
}
// UpdateHandler implementation.
@@ -240,9 +236,8 @@ std::unique_ptr<CommitContribution> ModelTypeWorker::GetContribution(
if (commit_entities.size() == 0)
return std::unique_ptr<CommitContribution>();
- return std::unique_ptr<CommitContribution>(
- new NonBlockingTypeCommitContribution(data_type_state_.type_context(),
- commit_entities, this));
+ return base::MakeUnique<NonBlockingTypeCommitContribution>(
+ data_type_state_.type_context(), commit_entities, this);
}
void ModelTypeWorker::OnCommitResponse(CommitResponseDataList* response_list) {
« no previous file with comments | « components/sync/core/processor_entity_tracker_unittest.cc ('k') | components/sync/engine_impl/model_type_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698