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

Unified Diff: chromecast/browser/cast_content_browser_client.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
Index: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index 27db6eb69385e32724c7529de40853b8f9e4e6ee..0c601c31f543cf276084da536929169a3dacbd67 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -13,6 +13,7 @@
#include "base/command_line.h"
#include "base/files/scoped_file.h"
#include "base/i18n/rtl.h"
+#include "base/json/json_reader.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/path_service.h"
@@ -30,6 +31,7 @@
#include "chromecast/browser/cast_quota_permission_context.h"
#include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
#include "chromecast/browser/devtools/cast_devtools_delegate.h"
+#include "chromecast/browser/grit/cast_browser_resources.h"
#include "chromecast/browser/media/media_caps_impl.h"
#include "chromecast/browser/service/cast_service_simple.h"
#include "chromecast/browser/url_request_context_factory.h"
@@ -48,11 +50,13 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/service_names.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/shell/public/cpp/interface_registry.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gl/gl_switches.h"
@@ -431,6 +435,18 @@ void CastContentBrowserClient::RegisterInProcessMojoApplications(
#endif
}
+std::unique_ptr<base::Value>
+CastContentBrowserClient::GetServiceManifestOverlay(
+ const std::string& service_name) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ if (service_name != content::kBrowserMojoApplicationName)
+ return nullptr;
+ base::StringPiece manifest_contents =
+ rb.GetRawDataResourceForScale(IDR_CAST_CONTENT_BROWSER_MANIFEST_OVERLAY,
+ ui::ScaleFactor::SCALE_FACTOR_NONE);
+ return base::JSONReader::Read(manifest_contents);
+}
+
#if defined(OS_ANDROID)
void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/browser/cast_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698