BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / content_settings / cookie_settings_factory.h
blob3a255ab99533308687476a3f585f2dc1806c1207
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/singleton.h"
13 #include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h"
15 namespace content_settings {
16 class CookieSettings;
19 class Profile;
21 class CookieSettingsFactory
22 : public RefcountedBrowserContextKeyedServiceFactory {
23 public:
24 // Returns the |CookieSettings| associated with the |profile|.
26 // This should only be called on the UI thread.
27 static scoped_refptr<content_settings::CookieSettings> GetForProfile(
28 Profile* profile);
30 static CookieSettingsFactory* GetInstance();
32 private:
33 friend struct base::DefaultSingletonTraits<CookieSettingsFactory>;
35 CookieSettingsFactory();
36 ~CookieSettingsFactory() override;
38 // |BrowserContextKeyedBaseFactory| methods:
39 void RegisterProfilePrefs(
40 user_prefs::PrefRegistrySyncable* registry) override;
41 content::BrowserContext* GetBrowserContextToUse(
42 content::BrowserContext* context) const override;
43 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
44 content::BrowserContext* context) const override;
46 DISALLOW_COPY_AND_ASSIGN(CookieSettingsFactory);
49 #endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_