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

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 1221643014: Service Worker: Migrate to version_uuid and surface ServiceWorker.id. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: content/browser/service_worker/service_worker_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 962da53ee5c8b1c63cf973c9738612e2e4cd81ab..976731ce375eeed52f3e934bfa7ced2c67c83964 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -285,19 +285,20 @@ void ServiceWorkerContextWrapper::StartServiceWorker(
base::Bind(&StartActiveWorkerOnIO, callback));
}
-void ServiceWorkerContextWrapper::SimulateSkipWaiting(int64_t version_id) {
+void ServiceWorkerContextWrapper::SimulateSkipWaiting(
+ std::string version_uuid) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ServiceWorkerContextWrapper::SimulateSkipWaiting, this,
- version_id));
+ version_uuid));
return;
}
if (!context_core_.get()) {
LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
return;
}
- ServiceWorkerVersion* version = GetLiveVersion(version_id);
+ ServiceWorkerVersion* version = GetLiveVersion(version_uuid);
if (!version || version->skip_waiting())
return;
ServiceWorkerRegistration* registration =
@@ -468,11 +469,11 @@ ServiceWorkerRegistration* ServiceWorkerContextWrapper::GetLiveRegistration(
}
ServiceWorkerVersion* ServiceWorkerContextWrapper::GetLiveVersion(
- int64_t version_id) {
+ std::string version_uuid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!context_core_)
return nullptr;
- return context_core_->GetLiveVersion(version_id);
+ return context_core_->GetLiveVersion(version_uuid);
}
std::vector<ServiceWorkerRegistrationInfo>

Powered by Google App Engine
This is Rietveld 408576698