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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc

Issue 7248038: Profiles: Make NTPResourceCache a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add files Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
10
11 // static
12 NTPResourceCache* NTPResourceCacheFactory::GetForProfile(Profile* profile) {
13 return static_cast<NTPResourceCache*>(
14 GetInstance()->GetServiceForProfile(profile, true));
15 }
16
17 // static
18 NTPResourceCacheFactory* NTPResourceCacheFactory::GetInstance() {
19 return Singleton<NTPResourceCacheFactory>::get();
20 }
21
22 NTPResourceCacheFactory::NTPResourceCacheFactory()
23 : ProfileKeyedServiceFactory(
24 ProfileDependencyManager::GetInstance())
25 {}
26
27 NTPResourceCacheFactory::~NTPResourceCacheFactory() {}
28
29 ProfileKeyedService* NTPResourceCacheFactory::BuildServiceInstanceFor(
30 Profile* profile) const {
31 return new NTPResourceCache(profile);
32 }
33
34 bool NTPResourceCacheFactory::ServiceRedirectedInIncognito() {
35 return true;
36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h ('k') | chrome/browser/ui/webui/theme_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698