| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 0b299f3ba6c03a1b506a5de18f1855c35c03d9dd..4f617371fdda1a32e38c53fa727d3d90e26b511a 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -2564,14 +2564,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();
|
| @@ -2589,7 +2593,9 @@ void Browser::RegisterIntentHandlerHelper(TabContents* tab,
|
| infobar_helper->AddInfoBar(new RegisterIntentHandlerInfoBarDelegate(
|
| infobar_helper,
|
| WebIntentsRegistryFactory::GetForProfile(tcw->profile()),
|
| - service));
|
| + service,
|
| + favicon_service,
|
| + tab->GetURL()));
|
| }
|
|
|
| // static
|
|
|