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

Side by Side Diff: chrome/browser/favicon/favicon_service.cc

Issue 9288074: Rename WebUIFactory to WebUIControllerFactory since that's what it creates now. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: blah Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/favicon/favicon_service.h" 5 #include "chrome/browser/favicon/favicon_service.h"
6 6
7 #include "chrome/browser/history/history.h" 7 #include "chrome/browser/history/history.h"
8 #include "chrome/browser/history/history_backend.h" 8 #include "chrome/browser/history/history_backend.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" 10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 12
13 FaviconService::FaviconService(Profile* profile) : profile_(profile) { 13 FaviconService::FaviconService(Profile* profile) : profile_(profile) {
14 } 14 }
15 15
16 FaviconService::Handle FaviconService::GetFavicon( 16 FaviconService::Handle FaviconService::GetFavicon(
17 const GURL& icon_url, 17 const GURL& icon_url,
18 history::IconType icon_type, 18 history::IconType icon_type,
19 CancelableRequestConsumerBase* consumer, 19 CancelableRequestConsumerBase* consumer,
20 const FaviconDataCallback& callback) { 20 const FaviconDataCallback& callback) {
(...skipping 26 matching lines...) Expand all
47 FaviconService::Handle FaviconService::GetFaviconForURL( 47 FaviconService::Handle FaviconService::GetFaviconForURL(
48 const GURL& page_url, 48 const GURL& page_url,
49 int icon_types, 49 int icon_types,
50 CancelableRequestConsumerBase* consumer, 50 CancelableRequestConsumerBase* consumer,
51 const FaviconDataCallback& callback) { 51 const FaviconDataCallback& callback) {
52 GetFaviconRequest* request = new GetFaviconRequest(callback); 52 GetFaviconRequest* request = new GetFaviconRequest(callback);
53 AddRequest(request, consumer); 53 AddRequest(request, consumer);
54 FaviconService::Handle handle = request->handle(); 54 FaviconService::Handle handle = request->handle();
55 if (page_url.SchemeIs(chrome::kChromeUIScheme) || 55 if (page_url.SchemeIs(chrome::kChromeUIScheme) ||
56 page_url.SchemeIs(chrome::kExtensionScheme)) { 56 page_url.SchemeIs(chrome::kExtensionScheme)) {
57 ChromeWebUIFactory::GetInstance()->GetFaviconForURL( 57 ChromeWebUIControllerFactory::GetInstance()->GetFaviconForURL(
58 profile_, request, page_url); 58 profile_, request, page_url);
59 } else { 59 } else {
60 HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); 60 HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
61 if (hs) 61 if (hs)
62 hs->GetFaviconForURL(request, page_url, icon_types); 62 hs->GetFaviconForURL(request, page_url, icon_types);
63 else 63 else
64 ForwardEmptyResultAsync(request); 64 ForwardEmptyResultAsync(request);
65 } 65 }
66 return handle; 66 return handle;
67 } 67 }
(...skipping 26 matching lines...) Expand all
94 if (hs) 94 if (hs)
95 hs->SetFavicon(page_url, icon_url, image_data, icon_type); 95 hs->SetFavicon(page_url, icon_url, image_data, icon_type);
96 } 96 }
97 97
98 FaviconService::~FaviconService() { 98 FaviconService::~FaviconService() {
99 } 99 }
100 100
101 void FaviconService::ForwardEmptyResultAsync(GetFaviconRequest* request) { 101 void FaviconService::ForwardEmptyResultAsync(GetFaviconRequest* request) {
102 request->ForwardResultAsync(request->handle(), history::FaviconData()); 102 request->ForwardResultAsync(request->handle(), history::FaviconData());
103 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698