Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Unified Diff: chrome/browser/ui/browser.cc

Issue 8469018: Provide assumed favicon for intents if service provider page was never visited. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review nits Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698