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

Side by Side Diff: chrome/browser/ui/webui/chrome_url_data_manager_factory.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed style nit Created 8 years, 8 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
(Empty)
1 // Copyright 2012 Google Inc. All Rights Reserved.
2 // Author: khorimoto@google.com (Kyle Horimoto)
Evan Stade 2012/04/24 19:02:43 ditto
Kyle Horimoto 2012/04/24 21:09:59 Done.
3
4 #include "chrome/browser/ui/webui/chrome_url_data_manager_factory.h"
5
6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/profiles/profile_dependency_manager.h"
8 #include "chrome/browser/profiles/profile_keyed_service.h"
9
10 // static
11 ChromeURLDataManager* ChromeURLDataManagerFactory::GetForProfile(
12 Profile* profile) {
13 return static_cast<ChromeURLDataManager*>(
14 GetInstance()->GetServiceForProfile(profile, true));
Evan Stade 2012/04/24 19:02:43 wrong indent (should be just 4 spaces)
Kyle Horimoto 2012/04/24 21:09:59 Done.
15 }
16
17 // static
18 ChromeURLDataManagerFactory* ChromeURLDataManagerFactory::GetInstance() {
19 return Singleton<ChromeURLDataManagerFactory>::get();
20 }
21
22 ChromeURLDataManagerFactory::ChromeURLDataManagerFactory()
23 : ProfileKeyedServiceFactory("ChromeURLDataManager",
24 ProfileDependencyManager::GetInstance()){
25 }
26
27 ChromeURLDataManagerFactory::~ChromeURLDataManagerFactory() {
28 }
29
30 ProfileKeyedService* ChromeURLDataManagerFactory::BuildServiceInstanceFor(
31 Profile* profile) const {
32 return new ChromeURLDataManager(
33 profile->GetChromeURLDataManagerBackendGetter());
34 }
35
36 bool ChromeURLDataManagerFactory::ServiceHasOwnInstanceInIncognito() {
37 return true;
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698