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

Side by Side Diff: chrome/browser/intents/register_intent_handler_helper.cc

Issue 10873022: Revert 152904 - Moving FaviconService to a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "chrome/browser/favicon/favicon_service.h" 7 #include "chrome/browser/favicon/favicon_service.h"
8 #include "chrome/browser/favicon/favicon_service_factory.h"
9 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" 8 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
10 #include "chrome/browser/intents/web_intents_registry_factory.h" 9 #include "chrome/browser/intents/web_intents_registry_factory.h"
11 #include "chrome/browser/intents/web_intents_util.h" 10 #include "chrome/browser/intents/web_intents_util.h"
12 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/tab_contents/tab_contents.h" 13 #include "chrome/browser/ui/tab_contents/tab_contents.h"
15 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
16 #include "webkit/glue/web_intent_service_data.h" 15 #include "webkit/glue/web_intent_service_data.h"
17 16
18 using content::WebContents; 17 using content::WebContents;
19 18
20 // static 19 // static
21 void Browser::RegisterIntentHandlerHelper( 20 void Browser::RegisterIntentHandlerHelper(
22 WebContents* tab, 21 WebContents* tab,
23 const webkit_glue::WebIntentServiceData& data, 22 const webkit_glue::WebIntentServiceData& data,
24 bool user_gesture) { 23 bool user_gesture) {
25 TabContents* tab_contents = TabContents::FromWebContents(tab); 24 TabContents* tab_contents = TabContents::FromWebContents(tab);
26 if (!tab_contents || tab_contents->profile()->IsOffTheRecord()) 25 if (!tab_contents || tab_contents->profile()->IsOffTheRecord())
27 return; 26 return;
28 27
29 if (!web_intents::IsWebIntentsEnabledForProfile(tab_contents->profile())) 28 if (!web_intents::IsWebIntentsEnabledForProfile(tab_contents->profile()))
30 return; 29 return;
31 30
32 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( 31 FaviconService* favicon_service =
33 tab_contents->profile(), Profile::EXPLICIT_ACCESS); 32 tab_contents->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS);
34 33
35 RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar( 34 RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar(
36 tab_contents->infobar_tab_helper(), 35 tab_contents->infobar_tab_helper(),
37 WebIntentsRegistryFactory::GetForProfile(tab_contents->profile()), 36 WebIntentsRegistryFactory::GetForProfile(tab_contents->profile()),
38 data, 37 data,
39 favicon_service, 38 favicon_service,
40 tab->GetURL()); 39 tab->GetURL());
41 } 40 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698