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..75951a6ede03e9b11a0cf42325436348565a3a64 |
--- /dev/null |
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#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)); |
+} |
+ |
+// 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; |
+} |