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

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

Issue 2698473004: Split FaviconService and FaviconServiceImpl. (Closed)
Patch Set: Revert changes in ios/.../history_collection_view_controller_unittest.mm Created 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm » ('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 "chrome/browser/favicon/favicon_service_factory.h" 5 #include "chrome/browser/favicon/favicon_service_factory.h"
6 6
7 #include <memory>
8
7 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
8 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
9 #include "chrome/browser/favicon/chrome_favicon_client.h" 11 #include "chrome/browser/favicon/chrome_favicon_client.h"
10 #include "chrome/browser/history/history_service_factory.h" 12 #include "chrome/browser/history/history_service_factory.h"
11 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
12 #include "components/favicon/core/favicon_service.h" 14 #include "components/favicon/core/favicon_service_impl.h"
13 #include "components/history/core/browser/history_service.h" 15 #include "components/history/core/browser/history_service.h"
14 #include "components/keyed_service/content/browser_context_dependency_manager.h" 16 #include "components/keyed_service/content/browser_context_dependency_manager.h"
15 #include "components/prefs/pref_service.h" 17 #include "components/prefs/pref_service.h"
16 18
17 namespace { 19 namespace {
18 20
19 std::unique_ptr<KeyedService> BuildFaviconService( 21 std::unique_ptr<KeyedService> BuildFaviconService(
20 content::BrowserContext* context) { 22 content::BrowserContext* context) {
21 Profile* profile = Profile::FromBrowserContext(context); 23 Profile* profile = Profile::FromBrowserContext(context);
22 return base::MakeUnique<favicon::FaviconService>( 24 return base::MakeUnique<favicon::FaviconServiceImpl>(
23 base::WrapUnique(new ChromeFaviconClient(profile)), 25 base::WrapUnique(new ChromeFaviconClient(profile)),
24 HistoryServiceFactory::GetForProfile(profile, 26 HistoryServiceFactory::GetForProfile(profile,
25 ServiceAccessType::EXPLICIT_ACCESS)); 27 ServiceAccessType::EXPLICIT_ACCESS));
26 } 28 }
27 29
28 } // namespace 30 } // namespace
29 31
30 // static 32 // static
31 favicon::FaviconService* FaviconServiceFactory::GetForProfile( 33 favicon::FaviconService* FaviconServiceFactory::GetForProfile(
32 Profile* profile, 34 Profile* profile,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 70 }
69 71
70 KeyedService* FaviconServiceFactory::BuildServiceInstanceFor( 72 KeyedService* FaviconServiceFactory::BuildServiceInstanceFor(
71 content::BrowserContext* context) const { 73 content::BrowserContext* context) const {
72 return BuildFaviconService(context).release(); 74 return BuildFaviconService(context).release();
73 } 75 }
74 76
75 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const { 77 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const {
76 return true; 78 return true;
77 } 79 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698