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

Remove unused return values of ServiceWorkerStorageControl

|deleted_version_id| and |newly_purgeable_resources| aren't used
anymore as of crrev.com/c/2348734.

Bug: 1055677
Change-Id: I66d5e144a4631894b919171565a51dd03303c645
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2395320Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804818}
parent 0f0c69ed
......@@ -144,25 +144,15 @@ interface ServiceWorkerStorageControl {
array<ServiceWorkerRegistrationData> registrations);
// Stores |registration_data| and |resources|.
// TODO(crbug.com/1055677): Stop returning |deleted_version_id| and
// |newly_purgeable_resources|. These are used to schedule resource purging
// in the browser process, but it should be done in the Storage Service.
StoreRegistration(ServiceWorkerRegistrationData registration,
array<ServiceWorkerResourceRecord> resources) =>
(ServiceWorkerDatabaseStatus status,
int64 deleted_version_id,
array<int64> newly_purgeable_resources);
(ServiceWorkerDatabaseStatus status);
// Deletes the registration specified by |registration_id|. |origin_state| is
// kDelete if there is no registration for |origin| after deletion.
// TODO(crbug.com/1055677): Stop returning |deleted_version_id| and
// |newly_purgeable_resources|. These are used to schedule resource purging
// in the browser process, but it should be done in the Storage Service.
DeleteRegistration(int64 registration_id, url.mojom.Url origin) =>
(ServiceWorkerDatabaseStatus status,
ServiceWorkerStorageOriginState origin_state,
int64 deleted_version_id,
array<int64> newly_purgeable_resources);
ServiceWorkerStorageOriginState origin_state);
// Updates the state of the registration's stored version to active.
UpdateToActiveState(int64 registration_id, url.mojom.Url origin) =>
......
......@@ -1151,9 +1151,7 @@ void ServiceWorkerRegistry::DidStoreRegistration(
uint64_t stored_resources_total_size_bytes,
const GURL& stored_scope,
StatusCallback callback,
storage::mojom::ServiceWorkerDatabaseStatus database_status,
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources) {
storage::mojom::ServiceWorkerDatabaseStatus database_status) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
blink::ServiceWorkerStatusCode status =
DatabaseStatusToStatusCode(database_status);
......@@ -1186,9 +1184,7 @@ void ServiceWorkerRegistry::DidDeleteRegistration(
const GURL& origin,
StatusCallback callback,
storage::mojom::ServiceWorkerDatabaseStatus database_status,
ServiceWorkerStorage::OriginState origin_state,
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources) {
ServiceWorkerStorage::OriginState origin_state) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
blink::ServiceWorkerStatusCode status =
DatabaseStatusToStatusCode(database_status);
......
......@@ -303,17 +303,13 @@ class CONTENT_EXPORT ServiceWorkerRegistry {
uint64_t stored_resources_total_size_bytes,
const GURL& stored_scope,
StatusCallback callback,
storage::mojom::ServiceWorkerDatabaseStatus database_status,
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources);
storage::mojom::ServiceWorkerDatabaseStatus database_status);
void DidDeleteRegistration(
int64_t registration_id,
const GURL& origin,
StatusCallback callback,
storage::mojom::ServiceWorkerDatabaseStatus database_status,
ServiceWorkerStorage::OriginState origin_state,
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources);
ServiceWorkerStorage::OriginState origin_state);
void DidUpdateToActiveState(
const GURL& origin,
......
......@@ -432,8 +432,7 @@ void ServiceWorkerStorageControlImpl::DidStoreRegistration(
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources) {
MaybePurgeResources(deleted_version_id, newly_purgeable_resources);
std::move(callback).Run(status, deleted_version_id,
newly_purgeable_resources);
std::move(callback).Run(status);
}
void ServiceWorkerStorageControlImpl::DidDeleteRegistration(
......@@ -443,8 +442,7 @@ void ServiceWorkerStorageControlImpl::DidDeleteRegistration(
int64_t deleted_version_id,
const std::vector<int64_t>& newly_purgeable_resources) {
MaybePurgeResources(deleted_version_id, newly_purgeable_resources);
std::move(callback).Run(status, origin_state, deleted_version_id,
newly_purgeable_resources);
std::move(callback).Run(status, origin_state);
}
void ServiceWorkerStorageControlImpl::DidGetNewVersionId(
......
......@@ -281,12 +281,10 @@ class ServiceWorkerStorageControlImplTest : public testing::Test {
base::RunLoop loop;
storage()->StoreRegistration(
std::move(registration), std::move(resources),
base::BindLambdaForTesting(
[&](DatabaseStatus status, int64_t /*=deleted_version_id*/,
const std::vector<int64_t>& /*=newly_purgeable_resources*/) {
out_status = status;
loop.Quit();
}));
base::BindLambdaForTesting([&](DatabaseStatus status) {
out_status = status;
loop.Quit();
}));
loop.Run();
return out_status;
}
......@@ -299,9 +297,7 @@ class ServiceWorkerStorageControlImplTest : public testing::Test {
registration_id, origin,
base::BindLambdaForTesting(
[&](DatabaseStatus status,
storage::mojom::ServiceWorkerStorageOriginState origin_state,
int64_t /*=deleted_version_id*/,
const std::vector<int64_t>& /*=newly_purgeable_resources*/) {
storage::mojom::ServiceWorkerStorageOriginState origin_state) {
result.status = status;
result.origin_state = origin_state;
loop.Quit();
......
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