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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 23466009: Expand whitelist for media stream APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 1fa7a9cc91667b06716abe8facba1a0671e46219..8bf2ac3a3a921031fa53fe250b482935a5781cd5 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -779,7 +779,8 @@ bool ChromeContentRendererClient::IsNaClAllowed(
manifest_url.SchemeIs("https") &&
manifest_url.host() == "ssl.gstatic.com" &&
((manifest_url.path().find("s2/oz/nacl/") == 1) ||
- (manifest_url.path().find("photos/nacl/") == 1));
+ (manifest_url.path().find("photos/nacl/") == 1) ||
+ (manifest_url.path().find("hangouts/nacl/") == 1));
bbudge 2013/09/06 18:50:57 This expands the NaCl whitelist to hangouts.
bool is_extension_from_webstore =
extension && extension->from_webstore();
@@ -1282,12 +1283,13 @@ bool ChromeContentRendererClient::AllowBrowserPlugin(
bool ChromeContentRendererClient::AllowPepperMediaStreamAPI(
const GURL& url) {
#if !defined(OS_ANDROID)
- std::string host = url.host();
// Allow only the Hangouts app to use the MediaStream APIs. It's OK to check
// the whitelist in the renderer, since we're only preventing access until
// these APIs are public and stable.
- if (url.SchemeIs(extensions::kExtensionScheme) &&
- !host.compare("hpcogiolnobbkijnnkdahioejpdcdoph")) {
+ if (url.SchemeIs("https") &&
+ (url.host() == "plus.google.com" ||
+ url.host() == "plus.sandbox.google.com") &&
+ url.path().find("hangouts/") == 1) {
bbudge 2013/09/06 18:50:57 This changes the way we identify the hangouts app.
return true;
}
// Allow access for tests.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698