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

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

Issue 1974613002: Remove code that was only used by navigator.connect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 7 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_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index 1d54daaf7b6838e4bb340285692f859f6dfb17ef..bbfdf627fd1496d87f50e15d8c367e9d219a91c6 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -680,7 +680,7 @@ void ServiceWorkerDispatcherHost::OnPostMessageToWorker(
int provider_id,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<TransferredMessagePort>& sent_message_ports) {
+ const std::vector<int>& sent_message_ports) {
TRACE_EVENT0("ServiceWorker",
"ServiceWorkerDispatcherHost::OnPostMessageToWorker");
if (!GetContext())
@@ -709,11 +709,11 @@ void ServiceWorkerDispatcherHost::DispatchExtendableMessageEvent(
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<TransferredMessagePort>& sent_message_ports,
+ const std::vector<int>& sent_message_ports,
ServiceWorkerProviderHost* sender_provider_host,
const StatusCallback& callback) {
- for (const TransferredMessagePort& port : sent_message_ports)
- MessagePortService::GetInstance()->HoldMessages(port.id);
+ for (int port : sent_message_ports)
+ MessagePortService::GetInstance()->HoldMessages(port);
switch (sender_provider_host->provider_type()) {
case SERVICE_WORKER_PROVIDER_FOR_WINDOW:
@@ -862,7 +862,7 @@ void ServiceWorkerDispatcherHost::DispatchExtendableMessageEventInternal(
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<TransferredMessagePort>& sent_message_ports,
+ const std::vector<int>& sent_message_ports,
const StatusCallback& callback,
const SourceInfo& source_info) {
if (!source_info.IsValid()) {
@@ -887,7 +887,7 @@ void ServiceWorkerDispatcherHost::
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<TransferredMessagePort>& sent_message_ports,
+ const std::vector<int>& sent_message_ports,
const ExtendableMessageEventSource& source,
const StatusCallback& callback) {
int request_id =
@@ -920,13 +920,13 @@ void ServiceWorkerDispatcherHost::
template <typename SourceInfo>
void ServiceWorkerDispatcherHost::DidFailToDispatchExtendableMessageEvent(
- const std::vector<TransferredMessagePort>& sent_message_ports,
+ const std::vector<int>& sent_message_ports,
const SourceInfo& source_info,
const StatusCallback& callback,
ServiceWorkerStatusCode status) {
// Transfering the message ports failed, so destroy the ports.
- for (const TransferredMessagePort& port : sent_message_ports)
- MessagePortService::GetInstance()->ClosePort(port.id);
+ for (int port : sent_message_ports)
+ MessagePortService::GetInstance()->ClosePort(port);
if (source_info.IsValid())
ReleaseSourceInfo(source_info);
callback.Run(status);

Powered by Google App Engine
This is Rietveld 408576698