| Index: content/child/resource_dispatcher.cc
|
| diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
|
| index 1f70ee417f808d115c4a293c4ff1505999c2a3b1..7b1e4ab03c0a7367084d2afecd4425bd20fedb65 100644
|
| --- a/content/child/resource_dispatcher.cc
|
| +++ b/content/child/resource_dispatcher.cc
|
| @@ -39,7 +39,9 @@
|
| #include "content/public/common/content_features.h"
|
| #include "content/public/common/resource_response.h"
|
| #include "content/public/common/resource_type.h"
|
| -#include "mojo/public/cpp/bindings/binding.h"
|
| +#include "mojo/public/cpp/bindings/associated_binding.h"
|
| +#include "mojo/public/cpp/bindings/associated_group.h"
|
| +#include "mojo/public/cpp/bindings/associated_interface_ptr_info.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/request_priority.h"
|
| #include "net/http/http_response_headers.h"
|
| @@ -114,12 +116,13 @@ class URLLoaderClientImpl final : public mojom::URLLoaderClient {
|
| body_consumer_->OnComplete(status);
|
| }
|
|
|
| - mojom::URLLoaderClientPtr CreateInterfacePtrAndBind() {
|
| - return binding_.CreateInterfacePtrAndBind();
|
| + void Bind(mojom::URLLoaderClientAssociatedPtrInfo* client_ptr_info,
|
| + mojo::AssociatedGroup* associated_group) {
|
| + binding_.Bind(client_ptr_info, associated_group);
|
| }
|
|
|
| private:
|
| - mojo::Binding<mojom::URLLoaderClient> binding_;
|
| + mojo::AssociatedBinding<mojom::URLLoaderClient> binding_;
|
| scoped_refptr<URLResponseBodyConsumer> body_consumer_;
|
| const int request_id_;
|
| bool has_received_response_ = false;
|
| @@ -661,7 +664,8 @@ int ResourceDispatcher::StartAsync(
|
| const GURL& frame_origin,
|
| std::unique_ptr<RequestPeer> peer,
|
| blink::WebURLRequest::LoadingIPCType ipc_type,
|
| - mojom::URLLoaderFactory* url_loader_factory) {
|
| + mojom::URLLoaderFactory* url_loader_factory,
|
| + mojo::AssociatedGroup* associated_group) {
|
| CheckSchemeForReferrerPolicy(*request);
|
|
|
| // Compute a unique request_id for this renderer process.
|
| @@ -678,10 +682,12 @@ int ResourceDispatcher::StartAsync(
|
| if (ipc_type == blink::WebURLRequest::LoadingIPCType::Mojo) {
|
| std::unique_ptr<URLLoaderClientImpl> client(
|
| new URLLoaderClientImpl(request_id, this, main_thread_task_runner_));
|
| - mojom::URLLoaderPtr url_loader;
|
| + mojom::URLLoaderAssociatedPtr url_loader;
|
| + mojom::URLLoaderClientAssociatedPtrInfo client_ptr_info;
|
| + client->Bind(&client_ptr_info, associated_group);
|
| url_loader_factory->CreateLoaderAndStart(
|
| - GetProxy(&url_loader), routing_id, request_id, *request,
|
| - client->CreateInterfacePtrAndBind());
|
| + GetProxy(&url_loader, associated_group), routing_id, request_id,
|
| + *request, std::move(client_ptr_info));
|
| pending_requests_[request_id]->url_loader = std::move(url_loader);
|
| pending_requests_[request_id]->url_loader_client = std::move(client);
|
| } else {
|
|
|