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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
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/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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_service_factory.h ('k') | chrome/browser/translate/translate_accept_languages_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698