| 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" | |
| 9 #include "chrome/browser/favicon/chrome_favicon_client.h" | 8 #include "chrome/browser/favicon/chrome_favicon_client.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 9 #include "chrome/browser/history/history_service_factory.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 12 #include "components/favicon/core/favicon_service.h" | 11 #include "components/favicon/core/favicon_service.h" |
| 13 #include "components/history/core/browser/history_service.h" | 12 #include "components/history/core/browser/history_service.h" |
| 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 13 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 scoped_ptr<KeyedService> BuildFaviconService(content::BrowserContext* context) { | 18 scoped_ptr<KeyedService> BuildFaviconService(content::BrowserContext* context) { |
| 19 Profile* profile = Profile::FromBrowserContext(context); | 19 Profile* profile = Profile::FromBrowserContext(context); |
| 20 return make_scoped_ptr(new favicon::FaviconService( | 20 return make_scoped_ptr(new favicon::FaviconService( |
| 21 make_scoped_ptr(new ChromeFaviconClient(profile)), | 21 make_scoped_ptr(new ChromeFaviconClient(profile)), |
| 22 HistoryServiceFactory::GetForProfile( | 22 HistoryServiceFactory::GetForProfile( |
| 23 profile, ServiceAccessType::EXPLICIT_ACCESS))); | 23 profile, ServiceAccessType::EXPLICIT_ACCESS))); |
| 24 } | 24 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |