| 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/thumbnails/thumbnail_service_factory.h" | 5 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/history/top_sites_factory.h" | 8 #include "chrome/browser/history/top_sites_factory.h" |
| 9 #include "chrome/browser/thumbnails/thumbnail_service.h" | 9 #include "chrome/browser/thumbnails/thumbnail_service.h" |
| 10 #include "chrome/browser/thumbnails/thumbnail_service_impl.h" | 10 #include "chrome/browser/thumbnails/thumbnail_service_impl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 scoped_refptr<ThumbnailService> ThumbnailServiceFactory::GetForProfile( | 27 scoped_refptr<ThumbnailService> ThumbnailServiceFactory::GetForProfile( |
| 28 Profile* profile) { | 28 Profile* profile) { |
| 29 return static_cast<ThumbnailService*>( | 29 return static_cast<ThumbnailService*>( |
| 30 GetInstance()->GetServiceForBrowserContext(profile, true).get()); | 30 GetInstance()->GetServiceForBrowserContext(profile, true).get()); |
| 31 } | 31 } |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 ThumbnailServiceFactory* ThumbnailServiceFactory::GetInstance() { | 34 ThumbnailServiceFactory* ThumbnailServiceFactory::GetInstance() { |
| 35 return Singleton<ThumbnailServiceFactory>::get(); | 35 return base::Singleton<ThumbnailServiceFactory>::get(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 scoped_refptr<RefcountedKeyedService> | 38 scoped_refptr<RefcountedKeyedService> |
| 39 ThumbnailServiceFactory::BuildServiceInstanceFor( | 39 ThumbnailServiceFactory::BuildServiceInstanceFor( |
| 40 content::BrowserContext* profile) const { | 40 content::BrowserContext* profile) const { |
| 41 return scoped_refptr<RefcountedKeyedService>( | 41 return scoped_refptr<RefcountedKeyedService>( |
| 42 new ThumbnailServiceImpl(static_cast<Profile*>(profile))); | 42 new ThumbnailServiceImpl(static_cast<Profile*>(profile))); |
| 43 } | 43 } |
| OLD | NEW |