cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ios / chrome / browser / content_settings / cookie_settings_factory.h
blobcd12a9566aedaaa9907da6a6b41857bb7aae52c9
1 // Copyright 2015 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 IOS_CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_
6 #define IOS_CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.h"
12 template <typename T>
13 struct DefaultSingletonTraits;
15 namespace content_settings {
16 class CookieSettings;
19 namespace ios {
21 class ChromeBrowserState;
23 // Singleton that owns all CookieSettings and associates them with
24 // ios::ChromeBrowserState.
25 class CookieSettingsFactory : public RefcountedBrowserStateKeyedServiceFactory {
26 public:
27 static scoped_refptr<content_settings::CookieSettings> GetForBrowserState(
28 ios::ChromeBrowserState* browser_state);
29 static CookieSettingsFactory* GetInstance();
31 private:
32 friend struct DefaultSingletonTraits<CookieSettingsFactory>;
34 CookieSettingsFactory();
35 ~CookieSettingsFactory() override;
37 // RefcountedBrowserStateKeyedServiceFactory implementation.
38 void RegisterBrowserStatePrefs(
39 user_prefs::PrefRegistrySyncable* registry) override;
40 web::BrowserState* GetBrowserStateToUse(
41 web::BrowserState* context) const override;
42 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
43 web::BrowserState* context) const override;
45 DISALLOW_COPY_AND_ASSIGN(CookieSettingsFactory);
48 } // namespace ios
50 #endif // IOS_CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_