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

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: redirect to chrome-extension://invalid Created 8 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 | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 11e7842a981f6bf5e92142765f4f59333d86e36d..3ca9f4d1c303687e3ce0345281f4ac6b74dc9d7a 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2267,6 +2267,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(std::string(chrome::kExtensionScheme) + "://invalid/");
Mihai Parparita -not on Chrome 2012/09/16 05:37:04 chrome-extension://invalid is used by http://code.
+ 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/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698