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

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: Removing debugging log statements. 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 72160a5cd35e6f8fab546388702a1c1c1fdccbb9..abf6b3f4122ce5fe966602cf6dcf9183f41f2ae4 100644
--- a/components/sync/engine_impl/model_type_worker.cc
+++ b/components/sync/engine_impl/model_type_worker.cc
@@ -78,10 +78,6 @@ void ModelTypeWorker::UpdateCryptographer(
// Update our state and that of the proxy.
OnCryptographerUpdated();
-
- // Nudge the scheduler if we're now allowed to commit.
- if (CanCommitItems())
- nudge_handler_->NudgeForCommit(type_);
}
// UpdateHandler implementation.
@@ -202,7 +198,6 @@ void ModelTypeWorker::ApplyPendingUpdates() {
void ModelTypeWorker::EnqueueForCommit(const CommitRequestDataList& list) {
DCHECK(CalledOnValidThread());
-
DCHECK(IsTypeInitialized())
<< "Asked to commit items before type was initialized. "
<< "ModelType is: " << ModelTypeToString(type_);
@@ -247,9 +242,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) {

Powered by Google App Engine
This is Rietveld 408576698