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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 2343783003: Corrects mojom::RouteProvider registration in ChildThreadImpl (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 // Add filters passed here via options. 564 // Add filters passed here via options.
565 for (auto* startup_filter : options.startup_filters) { 565 for (auto* startup_filter : options.startup_filters) {
566 channel_->AddFilter(startup_filter); 566 channel_->AddFilter(startup_filter);
567 } 567 }
568 568
569 IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal(); 569 IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal();
570 if (broker && !broker->IsPrivilegedBroker()) 570 if (broker && !broker->IsPrivilegedBroker())
571 broker->RegisterBrokerCommunicationChannel(channel_.get()); 571 broker->RegisterBrokerCommunicationChannel(channel_.get());
572 572
573 ConnectChannel(options.use_mojo_channel);
574
575 channel_->AddAssociatedInterface( 573 channel_->AddAssociatedInterface(
576 base::Bind(&ChildThreadImpl::OnRouteProviderRequest, 574 base::Bind(&ChildThreadImpl::OnRouteProviderRequest,
577 base::Unretained(this))); 575 base::Unretained(this)));
578 576
577 ConnectChannel(options.use_mojo_channel);
578
579 // This must always be done after ConnectChannel, because ConnectChannel() may 579 // This must always be done after ConnectChannel, because ConnectChannel() may
580 // add a ConnectionFilter to the connection. 580 // add a ConnectionFilter to the connection.
581 if (options.auto_start_mojo_shell_connection && mojo_shell_connection_) 581 if (options.auto_start_mojo_shell_connection && mojo_shell_connection_)
582 StartMojoShellConnection(); 582 StartMojoShellConnection();
583 583
584 int connection_timeout = kConnectionTimeoutS; 584 int connection_timeout = kConnectionTimeoutS;
585 std::string connection_override = 585 std::string connection_override =
586 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 586 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
587 switches::kIPCConnectionTimeout); 587 switches::kIPCConnectionTimeout);
588 if (!connection_override.empty()) { 588 if (!connection_override.empty()) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 associated_interface_provider_bindings_.dispatch_context())); 888 associated_interface_provider_bindings_.dispatch_context()));
889 router_.GetRoute(routing_id)->OnAssociatedInterfaceRequest( 889 router_.GetRoute(routing_id)->OnAssociatedInterfaceRequest(
890 name, request.PassHandle()); 890 name, request.PassHandle());
891 } 891 }
892 892
893 bool ChildThreadImpl::IsInBrowserProcess() const { 893 bool ChildThreadImpl::IsInBrowserProcess() const {
894 return static_cast<bool>(browser_process_io_runner_); 894 return static_cast<bool>(browser_process_io_runner_);
895 } 895 }
896 896
897 } // namespace content 897 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698