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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2667443002: Convert utility process ParseMediaMetadata blob reading IPC to mojo (Closed)
Patch Set: Sync to ToT and merge in dependent patch changes. Created 3 years, 10 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
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | chrome/utility/extensions/extensions_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | chrome/utility/extensions/extensions_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698