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

Unified Diff: services/shell/public/cpp/lib/interface_registry.cc

Issue 2374253007: Report unpermitted interface requests as bad messages (Closed)
Patch Set: . Created 4 years, 2 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 | « content/browser/renderer_host/render_process_host_impl.cc ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/interface_registry.cc
diff --git a/services/shell/public/cpp/lib/interface_registry.cc b/services/shell/public/cpp/lib/interface_registry.cc
index 6f79a510b3f72905d9f6a9ee430f5de7ad66c5e7..f992e7da60f0d412438ab19bd2cdad457909add1 100644
--- a/services/shell/public/cpp/lib/interface_registry.cc
+++ b/services/shell/public/cpp/lib/interface_registry.cc
@@ -4,6 +4,9 @@
#include "services/shell/public/cpp/interface_registry.h"
+#include <sstream>
+
+#include "mojo/public/cpp/bindings/message.h"
#include "services/shell/public/cpp/connection.h"
namespace shell {
@@ -90,9 +93,11 @@ void InterfaceRegistry::GetInterface(const std::string& interface_name,
interface_name,
std::move(handle));
} else if (!CanBindRequestForInterface(interface_name)) {
- LOG(ERROR) << "Capability spec prevented service: "
- << remote_identity_.name()
- << " from binding interface: " << interface_name;
+ std::stringstream ss;
+ ss << "Capability spec prevented service " << remote_identity_.name()
+ << " from binding interface: " << interface_name;
+ LOG(ERROR) << ss.str();
+ mojo::ReportBadMessage(ss.str());
} else if (!default_binder_.is_null()) {
default_binder_.Run(interface_name, std::move(handle));
} else {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698