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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 10920084: don't display platform app resources in normal browser windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot to add Created 8 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: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 6b896e213ab71d29760b78b2f6289ff187e1d2ee..41e3358b4bbaf1e9ceb6e7569b5554bd2275e569 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2295,6 +2295,17 @@ bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) {
extension->location() == Extension::COMPONENT);
}
+bool ExtensionService::ShouldBlockUrlInBrowserTab(GURL* url) {
+ const Extension* extension = extensions_.GetExtensionOrAppByURL(
+ ExtensionURLInfo(*url));
+ if (extension && extension->is_platform_app()) {
+ *url = GURL(chrome::kExtensionInvalidRequestURL);
+ return true;
+ }
+
+ return false;
+}
+
gfx::Image ExtensionService::GetOmniboxIcon(
const std::string& extension_id) {
return gfx::Image(omnibox_icon_manager_.GetIcon(extension_id));
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698