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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2259903002: Enforce capability spec renderer <--> browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 580f29310c20e9769db81c6aaba664d84e692c65..7a218d6db77f27be692fe50a272a0b50b0aaada9 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -14,6 +14,7 @@
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/files/scoped_file.h"
+#include "base/json/json_reader.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -106,6 +107,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/secure_origin_whitelist.h"
#include "chrome/common/url_constants.h"
+#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chromeos/chromeos_constants.h"
@@ -2964,6 +2966,21 @@ void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications(
#endif
}
+std::unique_ptr<base::Value>
+ChromeContentBrowserClient::GetServiceManifestOverlay(
+ const std::string& name) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ int id = -1;
+ if (name == "exe:content_browser")
Ken Rockot(use gerrit already) 2016/09/09 23:26:41 Hmm. Guess we should move the constants from conte
+ id = IDR_CONTENT_BROWSER_MANIFEST_OVERLAY;
+ if (id == -1)
+ return nullptr;
+
+ base::StringPiece manifest_contents =
+ rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
+ return base::JSONReader::Read(manifest_contents);
+}
+
void ChromeContentBrowserClient::OpenURL(
content::BrowserContext* browser_context,
const content::OpenURLParams& params,

Powered by Google App Engine
This is Rietveld 408576698