Commit 2afaea49 authored by Josh Karlin's avatar Josh Karlin Committed by Commit Bot

[BackgroundSync] Remove dead code

This is leftover from previous cleanup work to remove the
registration id. This corruption checker checked to make sure
that the registration id was valid, but since the id is gone
the corruption checker should go as well.

Change-Id: I226e2ac388c2163d12ad6dbfe8edb95b3682b7fd
Reviewed-on: https://chromium-review.googlesource.com/c/1319690Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605726}
parent dd10ae17
...@@ -382,7 +382,6 @@ void BackgroundSyncManager::InitDidGetDataFromBackend( ...@@ -382,7 +382,6 @@ void BackgroundSyncManager::InitDidGetDataFromBackend(
return; return;
} }
bool corruption_detected = false;
for (const std::pair<int64_t, std::string>& data : user_data) { for (const std::pair<int64_t, std::string>& data : user_data) {
BackgroundSyncRegistrationsProto registrations_proto; BackgroundSyncRegistrationsProto registrations_proto;
if (registrations_proto.ParseFromString(data.second)) { if (registrations_proto.ParseFromString(data.second)) {
...@@ -406,19 +405,9 @@ void BackgroundSyncManager::InitDidGetDataFromBackend( ...@@ -406,19 +405,9 @@ void BackgroundSyncManager::InitDidGetDataFromBackend(
base::Time::FromInternalValue(registration_proto.delay_until())); base::Time::FromInternalValue(registration_proto.delay_until()));
} }
} }
if (corruption_detected)
break;
}
if (corruption_detected) {
LOG(ERROR) << "Corruption detected in background sync backend";
DisableAndClearManager(std::move(callback));
return;
} }
FireReadyEvents(); FireReadyEvents();
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(callback)); base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(callback));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment