Chromium Code Reviews| Index: chrome/browser/ui/webui/chrome_url_data_manager_factory.cc |
| diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc b/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..061e828a214874dc8929cfb2a36921cea485fb9b |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2012 Google Inc. All Rights Reserved. |
| +// Author: khorimoto@google.com (Kyle Horimoto) |
|
Evan Stade
2012/04/24 19:02:43
ditto
Kyle Horimoto
2012/04/24 21:09:59
Done.
|
| + |
| +#include "chrome/browser/ui/webui/chrome_url_data_manager_factory.h" |
| + |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/profiles/profile_dependency_manager.h" |
| +#include "chrome/browser/profiles/profile_keyed_service.h" |
| + |
| +// static |
| +ChromeURLDataManager* ChromeURLDataManagerFactory::GetForProfile( |
| + Profile* profile) { |
| + return static_cast<ChromeURLDataManager*>( |
| + 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.
|
| +} |
| + |
| +// static |
| +ChromeURLDataManagerFactory* ChromeURLDataManagerFactory::GetInstance() { |
| + return Singleton<ChromeURLDataManagerFactory>::get(); |
| +} |
| + |
| +ChromeURLDataManagerFactory::ChromeURLDataManagerFactory() |
| + : ProfileKeyedServiceFactory("ChromeURLDataManager", |
| + ProfileDependencyManager::GetInstance()){ |
| +} |
| + |
| +ChromeURLDataManagerFactory::~ChromeURLDataManagerFactory() { |
| +} |
| + |
| +ProfileKeyedService* ChromeURLDataManagerFactory::BuildServiceInstanceFor( |
| + Profile* profile) const { |
| + return new ChromeURLDataManager( |
| + profile->GetChromeURLDataManagerBackendGetter()); |
| +} |
| + |
| +bool ChromeURLDataManagerFactory::ServiceHasOwnInstanceInIncognito() { |
| + return true; |
| +} |