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

Unified Diff: chrome/browser/notifications/balloon_host.cc

Issue 10080018: Don't allow sending data URLs to WebUI, unless in a ChromeOS BalloonHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile errors and crash in tests. Created 8 years, 8 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/notifications/balloon_host.cc
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 05d7301cfbf66ea73dbc2424069192841efa09ff..9c81d20ac1c673c63f15a1718100c1867e45d8b8 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -166,3 +166,14 @@ void BalloonHost::NotifyDisconnect() {
bool BalloonHost::IsRenderViewReady() const {
return should_notify_on_disconnect_;
}
+
+bool BalloonHost::CanLoadDataURLsInWebUI() const {
+#if defined(OS_CHROMEOS)
+ // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow
+ // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts,
+ // so this should be safe.
+ return true;
+#else
+ return false;
+#endif
+}
« no previous file with comments | « chrome/browser/notifications/balloon_host.h ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698