Index: content/browser/devtools/protocol/service_worker_handler.cc |
diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc |
index 3b529f6414e605f3751ab2bea8a99dde4724066c..d6e89a71dda90d448c0cd9eacd5c4e847568bb70 100644 |
--- a/content/browser/devtools/protocol/service_worker_handler.cc |
+++ b/content/browser/devtools/protocol/service_worker_handler.cc |
@@ -133,10 +133,7 @@ scoped_refptr<ServiceWorkerRegistration> CreateRegistrationDictionaryValue( |
base::Int64ToString(registration_info.registration_id)) |
->set_scope_url(registration_info.pattern.spec()) |
->set_is_deleted(registration_info.delete_flag == |
- ServiceWorkerRegistrationInfo::IS_DELETED) |
- ->set_force_update_on_page_load( |
- registration_info.force_update_on_page_load == |
- ServiceWorkerRegistrationInfo::IS_FORCED)); |
+ ServiceWorkerRegistrationInfo::IS_DELETED)); |
return registration; |
} |
@@ -429,18 +426,10 @@ Response ServiceWorkerHandler::SetDebugOnStart(bool debug_on_start) { |
} |
Response ServiceWorkerHandler::SetForceUpdateOnPageLoad( |
- const std::string& registration_id, |
bool force_update_on_page_load) { |
if (!context_) |
return CreateContextErrorResponse(); |
- int64_t id = kInvalidServiceWorkerRegistrationId; |
- if (!base::StringToInt64(registration_id, &id)) |
- return CreateInvalidVersionIdErrorResponse(); |
- if (force_update_on_page_load) |
- force_update_enabled_registrations_.insert(id); |
- else |
- force_update_enabled_registrations_.erase(id); |
- context_->SetForceUpdateOnPageLoad(id, force_update_on_page_load); |
+ context_->SetForceUpdateOnPageLoad(force_update_on_page_load); |
return Response::OK(); |
} |
@@ -616,11 +605,8 @@ void ServiceWorkerHandler::ReportWorkerTerminated( |
} |
void ServiceWorkerHandler::ClearForceUpdate() { |
- if (context_) { |
- for (const auto registration_id : force_update_enabled_registrations_) |
- context_->SetForceUpdateOnPageLoad(registration_id, false); |
- } |
- force_update_enabled_registrations_.clear(); |
+ if (context_) |
+ context_->SetForceUpdateOnPageLoad(false); |
} |
} // namespace service_worker |