Commit b552e1a2 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

Partial revert of crrev.com/c/2214582

This CL partially reverts crrev.com/c/2214582 not to use
|remote_storage_control_| yet. Looks like we need to bind the
remote on a separate sequence.

Bug: 1055677
Change-Id: I6c82d6c7150bd5405a92d5bac2ff0517f7aff925
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215386Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771682}
parent 8f48f7c5
......@@ -468,8 +468,7 @@ void ServiceWorkerRegistry::UpdateLastUpdateCheckTime(
base::Time last_update_check_time,
StatusCallback callback) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
BindRemoteStorageControlIfNeeded();
remote_storage_control_->UpdateLastUpdateCheckTime(
storage()->UpdateLastUpdateCheckTime(
registration_id, origin, last_update_check_time,
CreateDatabaseStatusCallback(std::move(callback)));
}
......@@ -1383,15 +1382,4 @@ bool ServiceWorkerRegistry::ShouldPurgeOnShutdown(const url::Origin& origin) {
!special_storage_policy_->IsStorageProtected(origin.GetURL());
}
void ServiceWorkerRegistry::BindRemoteStorageControlIfNeeded() {
DCHECK(!(remote_storage_control_.is_bound() &&
!remote_storage_control_.is_connected()))
<< "Rebinding is not supported yet.";
if (remote_storage_control_.is_bound())
return;
storage_control_->Bind(remote_storage_control_.BindNewPipeAndPassReceiver());
}
} // namespace content
......@@ -347,8 +347,6 @@ class CONTENT_EXPORT ServiceWorkerRegistry {
void OnStoragePolicyChanged();
bool ShouldPurgeOnShutdown(const url::Origin& origin);
void BindRemoteStorageControlIfNeeded();
// The ServiceWorkerContextCore object must outlive this.
ServiceWorkerContextCore* const context_;
......
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