OLD | NEW |
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 "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/favicon/chrome_favicon_client.h" | 9 #include "chrome/browser/favicon/chrome_favicon_client.h" |
10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 profile->GetOriginalProfile(), true)); | 39 profile->GetOriginalProfile(), true)); |
40 } | 40 } |
41 | 41 |
42 // Profile is OffTheRecord without access. | 42 // Profile is OffTheRecord without access. |
43 NOTREACHED() << "This profile is OffTheRecord"; | 43 NOTREACHED() << "This profile is OffTheRecord"; |
44 return NULL; | 44 return NULL; |
45 } | 45 } |
46 | 46 |
47 // static | 47 // static |
48 FaviconServiceFactory* FaviconServiceFactory::GetInstance() { | 48 FaviconServiceFactory* FaviconServiceFactory::GetInstance() { |
49 return Singleton<FaviconServiceFactory>::get(); | 49 return base::Singleton<FaviconServiceFactory>::get(); |
50 } | 50 } |
51 | 51 |
52 // static | 52 // static |
53 BrowserContextKeyedServiceFactory::TestingFactoryFunction | 53 BrowserContextKeyedServiceFactory::TestingFactoryFunction |
54 FaviconServiceFactory::GetDefaultFactory() { | 54 FaviconServiceFactory::GetDefaultFactory() { |
55 return &BuildFaviconService; | 55 return &BuildFaviconService; |
56 } | 56 } |
57 | 57 |
58 FaviconServiceFactory::FaviconServiceFactory() | 58 FaviconServiceFactory::FaviconServiceFactory() |
59 : BrowserContextKeyedServiceFactory( | 59 : BrowserContextKeyedServiceFactory( |
60 "FaviconService", | 60 "FaviconService", |
61 BrowserContextDependencyManager::GetInstance()) { | 61 BrowserContextDependencyManager::GetInstance()) { |
62 DependsOn(HistoryServiceFactory::GetInstance()); | 62 DependsOn(HistoryServiceFactory::GetInstance()); |
63 } | 63 } |
64 | 64 |
65 FaviconServiceFactory::~FaviconServiceFactory() { | 65 FaviconServiceFactory::~FaviconServiceFactory() { |
66 } | 66 } |
67 | 67 |
68 KeyedService* FaviconServiceFactory::BuildServiceInstanceFor( | 68 KeyedService* FaviconServiceFactory::BuildServiceInstanceFor( |
69 content::BrowserContext* context) const { | 69 content::BrowserContext* context) const { |
70 return BuildFaviconService(context).release(); | 70 return BuildFaviconService(context).release(); |
71 } | 71 } |
72 | 72 |
73 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const { | 73 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const { |
74 return true; | 74 return true; |
75 } | 75 } |
OLD | NEW |