Index: chrome/browser/content_settings/cookie_settings_factory.h |
diff --git a/chrome/browser/content_settings/cookie_settings_factory.h b/chrome/browser/content_settings/cookie_settings_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9bde8ef8962ea4c586bd5ed127743212ee41fc1d |
--- /dev/null |
+++ b/chrome/browser/content_settings/cookie_settings_factory.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2011 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. |
+ |
+#ifndef CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |
+#define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/memory/singleton.h" |
+#include "chrome/browser/profiles/profile_keyed_service_factory.h" |
+ |
+class CookieSettings; |
+class Profile; |
+ |
+// Singleton that owns all CookieSettings and associates them with |
+// Profiles. Listens for the Profile's destruction notification and cleans up |
+// the associated CookieSettings. |
+class CookieSettingsFactory : public ProfileKeyedServiceFactory { |
+ public: |
+ // ProfileKeyedServiceFactory implementation. |
+ // Returns the CookieSettings that provides desktop notifications |
Bernhard Bauer
2011/09/01 11:41:54
"desktop notifications"? :-)
marja
2011/09/01 13:34:48
Oops :) Luckily, this file just got deleted.
|
+ // for |profile|. |
+ static CookieSettings* GetForProfile(Profile* profile); |
Bernhard Bauer
2011/09/01 11:41:54
Nit: |CookieSettingsFactory::GetForProfile| sounds
marja
2011/09/01 13:34:48
This happened as a side product of the CookieSetti
|
+ static CookieSettingsFactory* GetInstance(); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<CookieSettingsFactory>; |
+ |
+ CookieSettingsFactory(); |
+ virtual ~CookieSettingsFactory(); |
+ |
+ // ProfileKeyedServiceFactory implementation. |
+ virtual ProfileKeyedService* BuildServiceInstanceFor( |
+ Profile* profile) const OVERRIDE; |
+ virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE; |
+}; |
+ |
+#endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |