| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 49d66f9b63b79933dd8ffa200f17624c557776cf..43475287879bac54dc31c3e215c96d4bfe6c3afb 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -2584,14 +2584,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();
|
| @@ -2608,7 +2612,9 @@ void Browser::RegisterIntentHandlerHelper(TabContents* tab,
|
| RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar(
|
| tcw->infobar_tab_helper(),
|
| WebIntentsRegistryFactory::GetForProfile(tcw->profile()),
|
| - service);
|
| + service,
|
| + favicon_service,
|
| + tab->GetURL());
|
| }
|
|
|
| // static
|
|
|