Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index a93594708fc816d00a30ee1df19b28ffd2125a3f..fd23d1816061e89377336b24d0be8e069ca6b311 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -44,6 +44,7 @@ |
#include "chrome/browser/google/google_brand.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
+#include "chrome/browser/ui/webui/fallback_icon_source.h" |
#include "chrome/browser/ui/webui/favicon_source.h" |
#include "chrome/browser/ui/webui/ntp/thumbnail_source.h" |
#include "chrome/browser/ui/webui/theme_source.h" |
@@ -1065,6 +1066,15 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { |
const extensions::PermissionsData* permissions_data = |
extension->permissions_data(); |
+ // If the extension has permission to load chrome://fallback-icon/ resources |
+ // we need to make sure that the FallbackIconSource is registered with the |
+ // ChromeURLDataManager. |
+ if (permissions_data->HasHostPermission( |
+ GURL(chrome::kChromeUIFallbackIconURL))) { |
+ FallbackIconSource* fallback_icon_source = new FallbackIconSource(); |
+ content::URLDataSource::Add(profile_, fallback_icon_source); |
+ } |
pkotwicz
2015/01/21 19:44:14
Will there be any extensions with permission to lo
huangs
2015/01/22 01:13:27
Done.
|
+ |
// If the extension has permission to load chrome://favicon/ resources we need |
// to make sure that the FaviconSource is registered with the |
// ChromeURLDataManager. |