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

Unified Diff: content/child/service_worker/service_worker_dispatcher.cc

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Rebased again Created 3 years, 5 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/child/service_worker/service_worker_dispatcher.cc
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index a3694b2acc8e2715fce32551c492f53a2626487b..d7cdb9410374aed99edb3723f712639e3765cb36 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -40,9 +40,9 @@ namespace {
base::LazyInstance<ThreadLocalPointer<void>>::Leaky g_dispatcher_tls =
LAZY_INSTANCE_INITIALIZER;
-void* const kHasBeenDeleted = reinterpret_cast<void*>(0x1);
+void* const kSWDispatcherHasBeenDeleted = reinterpret_cast<void*>(0x1);
-int CurrentWorkerId() {
+int ServiceWorkerCurrentWorkerId() {
return WorkerThread::GetCurrentId();
}
@@ -57,7 +57,7 @@ ServiceWorkerDispatcher::ServiceWorkerDispatcher(
}
ServiceWorkerDispatcher::~ServiceWorkerDispatcher() {
- g_dispatcher_tls.Pointer()->Set(kHasBeenDeleted);
+ g_dispatcher_tls.Pointer()->Set(kSWDispatcherHasBeenDeleted);
}
void ServiceWorkerDispatcher::OnMessageReceived(const IPC::Message& msg) {
@@ -145,7 +145,7 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
"Scope", pattern.spec(),
"Script URL", script_url.spec());
thread_safe_sender_->Send(new ServiceWorkerHostMsg_RegisterServiceWorker(
- CurrentWorkerId(), request_id, provider_id, script_url, options));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, script_url, options));
}
void ServiceWorkerDispatcher::UpdateServiceWorker(
@@ -155,7 +155,7 @@ void ServiceWorkerDispatcher::UpdateServiceWorker(
DCHECK(callbacks);
int request_id = pending_update_callbacks_.Add(std::move(callbacks));
thread_safe_sender_->Send(new ServiceWorkerHostMsg_UpdateServiceWorker(
- CurrentWorkerId(), request_id, provider_id, registration_id));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, registration_id));
}
void ServiceWorkerDispatcher::UnregisterServiceWorker(
@@ -168,7 +168,7 @@ void ServiceWorkerDispatcher::UnregisterServiceWorker(
"ServiceWorkerDispatcher::UnregisterServiceWorker",
request_id, "Registration ID", registration_id);
thread_safe_sender_->Send(new ServiceWorkerHostMsg_UnregisterServiceWorker(
- CurrentWorkerId(), request_id, provider_id, registration_id));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, registration_id));
}
void ServiceWorkerDispatcher::GetRegistration(
@@ -193,7 +193,7 @@ void ServiceWorkerDispatcher::GetRegistration(
request_id,
"Document URL", document_url.spec());
thread_safe_sender_->Send(new ServiceWorkerHostMsg_GetRegistration(
- CurrentWorkerId(), request_id, provider_id, document_url));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, document_url));
}
void ServiceWorkerDispatcher::GetRegistrations(
@@ -208,7 +208,7 @@ void ServiceWorkerDispatcher::GetRegistrations(
"ServiceWorkerDispatcher::GetRegistrations",
request_id);
thread_safe_sender_->Send(new ServiceWorkerHostMsg_GetRegistrations(
- CurrentWorkerId(), request_id, provider_id));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id));
}
void ServiceWorkerDispatcher::GetRegistrationForReady(
@@ -220,7 +220,7 @@ void ServiceWorkerDispatcher::GetRegistrationForReady(
"ServiceWorkerDispatcher::GetRegistrationForReady",
request_id);
thread_safe_sender_->Send(new ServiceWorkerHostMsg_GetRegistrationForReady(
- CurrentWorkerId(), request_id, provider_id));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id));
}
void ServiceWorkerDispatcher::EnableNavigationPreload(
@@ -232,7 +232,7 @@ void ServiceWorkerDispatcher::EnableNavigationPreload(
int request_id =
enable_navigation_preload_callbacks_.Add(std::move(callbacks));
thread_safe_sender_->Send(new ServiceWorkerHostMsg_EnableNavigationPreload(
- CurrentWorkerId(), request_id, provider_id, registration_id, enable));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, registration_id, enable));
}
void ServiceWorkerDispatcher::GetNavigationPreloadState(
@@ -243,7 +243,7 @@ void ServiceWorkerDispatcher::GetNavigationPreloadState(
int request_id =
get_navigation_preload_state_callbacks_.Add(std::move(callbacks));
thread_safe_sender_->Send(new ServiceWorkerHostMsg_GetNavigationPreloadState(
- CurrentWorkerId(), request_id, provider_id, registration_id));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, registration_id));
}
void ServiceWorkerDispatcher::SetNavigationPreloadHeader(
@@ -255,7 +255,7 @@ void ServiceWorkerDispatcher::SetNavigationPreloadHeader(
int request_id =
set_navigation_preload_header_callbacks_.Add(std::move(callbacks));
thread_safe_sender_->Send(new ServiceWorkerHostMsg_SetNavigationPreloadHeader(
- CurrentWorkerId(), request_id, provider_id, registration_id, value));
+ ServiceWorkerCurrentWorkerId(), request_id, provider_id, registration_id, value));
}
void ServiceWorkerDispatcher::AddProviderContext(
@@ -292,7 +292,7 @@ ServiceWorkerDispatcher*
ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance(
ThreadSafeSender* thread_safe_sender,
base::SingleThreadTaskRunner* main_thread_task_runner) {
- if (g_dispatcher_tls.Pointer()->Get() == kHasBeenDeleted) {
+ if (g_dispatcher_tls.Pointer()->Get() == kSWDispatcherHasBeenDeleted) {
NOTREACHED() << "Re-instantiating TLS ServiceWorkerDispatcher.";
g_dispatcher_tls.Pointer()->Set(NULL);
}
@@ -308,7 +308,7 @@ ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance(
}
ServiceWorkerDispatcher* ServiceWorkerDispatcher::GetThreadSpecificInstance() {
- if (g_dispatcher_tls.Pointer()->Get() == kHasBeenDeleted)
+ if (g_dispatcher_tls.Pointer()->Get() == kSWDispatcherHasBeenDeleted)
return NULL;
return static_cast<ServiceWorkerDispatcher*>(
g_dispatcher_tls.Pointer()->Get());
« no previous file with comments | « content/child/notifications/notification_manager.cc ('k') | content/child/service_worker/web_service_worker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698