| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 // Returns the |CookieSettings| associated with the |profile|. | 24 // Returns the |CookieSettings| associated with the |profile|. |
| 25 // | 25 // |
| 26 // This should only be called on the UI thread. | 26 // This should only be called on the UI thread. |
| 27 static scoped_refptr<content_settings::CookieSettings> GetForProfile( | 27 static scoped_refptr<content_settings::CookieSettings> GetForProfile( |
| 28 Profile* profile); | 28 Profile* profile); |
| 29 | 29 |
| 30 static CookieSettingsFactory* GetInstance(); | 30 static CookieSettingsFactory* GetInstance(); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 friend struct DefaultSingletonTraits<CookieSettingsFactory>; | 33 friend struct base::DefaultSingletonTraits<CookieSettingsFactory>; |
| 34 | 34 |
| 35 CookieSettingsFactory(); | 35 CookieSettingsFactory(); |
| 36 ~CookieSettingsFactory() override; | 36 ~CookieSettingsFactory() override; |
| 37 | 37 |
| 38 // |BrowserContextKeyedBaseFactory| methods: | 38 // |BrowserContextKeyedBaseFactory| methods: |
| 39 void RegisterProfilePrefs( | 39 void RegisterProfilePrefs( |
| 40 user_prefs::PrefRegistrySyncable* registry) override; | 40 user_prefs::PrefRegistrySyncable* registry) override; |
| 41 content::BrowserContext* GetBrowserContextToUse( | 41 content::BrowserContext* GetBrowserContextToUse( |
| 42 content::BrowserContext* context) const override; | 42 content::BrowserContext* context) const override; |
| 43 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( | 43 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( |
| 44 content::BrowserContext* context) const override; | 44 content::BrowserContext* context) const override; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(CookieSettingsFactory); | 46 DISALLOW_COPY_AND_ASSIGN(CookieSettingsFactory); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 #endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ | 49 #endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_ |
| OLD | NEW |