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

Side by Side Diff: content/browser/service_worker/service_worker_provider_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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_provider_host.h" 5 #include "content/browser/service_worker/service_worker_provider_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (running_hosted_version_.get()) 371 if (running_hosted_version_.get())
372 return false; 372 return false;
373 if (!registration || associated_registration_.get() || !allow_association_) 373 if (!registration || associated_registration_.get() || !allow_association_)
374 return false; 374 return false;
375 return true; 375 return true;
376 } 376 }
377 377
378 void ServiceWorkerProviderHost::PostMessageToClient( 378 void ServiceWorkerProviderHost::PostMessageToClient(
379 ServiceWorkerVersion* version, 379 ServiceWorkerVersion* version,
380 const base::string16& message, 380 const base::string16& message,
381 const std::vector<TransferredMessagePort>& sent_message_ports) { 381 const std::vector<int>& sent_message_ports) {
382 if (!dispatcher_host_) 382 if (!dispatcher_host_)
383 return; // Could be NULL in some tests. 383 return; // Could be NULL in some tests.
384 384
385 std::vector<int> new_routing_ids; 385 std::vector<int> new_routing_ids;
386 dispatcher_host_->message_port_message_filter()-> 386 dispatcher_host_->message_port_message_filter()->
387 UpdateMessagePortsWithNewRoutes(sent_message_ports, 387 UpdateMessagePortsWithNewRoutes(sent_message_ports,
388 &new_routing_ids); 388 &new_routing_ids);
389 389
390 ServiceWorkerMsg_MessageToDocument_Params params; 390 ServiceWorkerMsg_MessageToDocument_Params params;
391 params.thread_id = kDocumentMainThreadId; 391 params.thread_id = kDocumentMainThreadId;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 Send(new ServiceWorkerMsg_SetControllerServiceWorker( 646 Send(new ServiceWorkerMsg_SetControllerServiceWorker(
647 render_thread_id_, provider_id(), 647 render_thread_id_, provider_id(),
648 GetOrCreateServiceWorkerHandle( 648 GetOrCreateServiceWorkerHandle(
649 associated_registration_->active_version()), 649 associated_registration_->active_version()),
650 false /* shouldNotifyControllerChange */)); 650 false /* shouldNotifyControllerChange */));
651 } 651 }
652 } 652 }
653 } 653 }
654 654
655 } // namespace content 655 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_provider_host.h ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698