| Index: chrome/utility/chrome_content_utility_client.cc
|
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
|
| index 7e5cd72e2a1947a4ad8fdd0afb7d452be3f4e738..0b38af4095d136715cc72157be935fe884098568 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -199,11 +199,6 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| return true;
|
|
|
| for (auto* handler : handlers_) {
|
| - // At least one of the utility process handlers adds a new handler to
|
| - // |handlers_| when it handles a message. This causes any iterator over
|
| - // |handlers_| to become invalid. Therefore, it is necessary to break the
|
| - // loop at this point instead of evaluating it as a loop condition (if the
|
| - // for loop was using iterators explicitly, as originally done).
|
| if (handler->OnMessageReceived(message))
|
| return true;
|
| }
|
| @@ -214,9 +209,8 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| void ChromeContentUtilityClient::ExposeInterfacesToBrowser(
|
| service_manager::InterfaceRegistry* registry) {
|
| #if BUILDFLAG(ENABLE_EXTENSIONS)
|
| - ChromeContentUtilityClient* utility_client = this;
|
| extensions::ExtensionsHandler::ExposeInterfacesToBrowser(
|
| - registry, utility_client, utility_process_running_elevated_);
|
| + registry, utility_process_running_elevated_);
|
| #endif
|
| // If our process runs with elevated privileges, only add elevated Mojo
|
| // services to the interface registry.
|
| @@ -244,11 +238,6 @@ void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) {
|
| std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info));
|
| }
|
|
|
| -void ChromeContentUtilityClient::AddHandler(
|
| - std::unique_ptr<UtilityMessageHandler> handler) {
|
| - handlers_.push_back(std::move(handler));
|
| -}
|
| -
|
| // static
|
| void ChromeContentUtilityClient::PreSandboxStartup() {
|
| #if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|