Index: chrome/browser/intents/register_intent_handler_infobar_delegate.cc |
diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate.cc b/chrome/browser/intents/register_intent_handler_infobar_delegate.cc |
index c0914323c1c1e8b9caedce3669f0a6d7c4a44ec9..e32e42dab7f20114bdec771b2d68170540532588 100644 |
--- a/chrome/browser/intents/register_intent_handler_infobar_delegate.cc |
+++ b/chrome/browser/intents/register_intent_handler_infobar_delegate.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "base/utf_string_conversions.h" |
+#include "chrome/browser/favicon/favicon_service.h" |
#include "chrome/browser/intents/web_intents_registry.h" |
#include "chrome/browser/intents/web_intents_registry_factory.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -15,10 +16,14 @@ |
RegisterIntentHandlerInfoBarDelegate::RegisterIntentHandlerInfoBarDelegate( |
InfoBarTabHelper* infobar_helper, |
WebIntentsRegistry* registry, |
- const webkit_glue::WebIntentServiceData& service) |
+ const webkit_glue::WebIntentServiceData& service, |
+ FaviconService* favicon_service, |
+ const GURL& origin_url) |
: ConfirmInfoBarDelegate(infobar_helper), |
registry_(registry), |
- service_(service) { |
+ service_(service), |
+ favicon_service_(favicon_service), |
+ origin_url_(origin_url) { |
} |
InfoBarDelegate::Type |
@@ -46,6 +51,11 @@ string16 RegisterIntentHandlerInfoBarDelegate::GetButtonLabel( |
bool RegisterIntentHandlerInfoBarDelegate::Accept() { |
registry_->RegisterIntentProvider(service_); |
+ |
+ // Register a temporary FavIcon in case we never visited the provider page. |
+ if (favicon_service_ && origin_url_ != service_.service_url) |
+ favicon_service_->CloneFavicon(origin_url_, service_.service_url); |
+ |
return true; |
} |