| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 35f6c63f40cf6c8962c549bfddf81c2e3faaff9f..8588ee0ba5920a839609b5b84b577fb0b2142cf3 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -2570,14 +2570,18 @@ void Browser::RegisterIntentHandlerHelper(TabContents* tab,
|
| const string16& href,
|
| const string16& title,
|
| const string16& disposition) {
|
| + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
|
| + return;
|
| +
|
| TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
|
| tab);
|
| if (!tcw || tcw->profile()->IsOffTheRecord())
|
| return;
|
|
|
| - if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
|
| - return;
|
| + FaviconService* favicon_service =
|
| + tcw->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS);
|
|
|
| + // |href| can be relative to originating URL. Resolve if necessary.
|
| GURL service_url(href);
|
| if (!service_url.is_valid()) {
|
| const GURL& url = tab->GetURL();
|
| @@ -2594,7 +2598,9 @@ void Browser::RegisterIntentHandlerHelper(TabContents* tab,
|
| RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar(
|
| tcw->infobar_tab_helper(),
|
| WebIntentsRegistryFactory::GetForProfile(tcw->profile()),
|
| - service);
|
| + service,
|
| + favicon_service,
|
| + tab->GetURL());
|
| }
|
|
|
| // static
|
|
|