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_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 private: | 116 private: |
117 friend struct DefaultSingletonTraits<Factory>; | 117 friend struct DefaultSingletonTraits<Factory>; |
118 | 118 |
119 Factory(); | 119 Factory(); |
120 virtual ~Factory(); | 120 virtual ~Factory(); |
121 | 121 |
122 // |ProfileKeyedBaseFactory| methods: | 122 // |ProfileKeyedBaseFactory| methods: |
123 virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE; | 123 virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE; |
124 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; | 124 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; |
| 125 virtual bool ServiceIsNULLOnImportProcess() const OVERRIDE; |
125 virtual scoped_refptr<RefcountedProfileKeyedService> | 126 virtual scoped_refptr<RefcountedProfileKeyedService> |
126 BuildServiceInstanceFor(Profile* profile) const OVERRIDE; | 127 BuildServiceInstanceFor(Profile* profile) const OVERRIDE; |
127 }; | 128 }; |
128 | 129 |
129 private: | 130 private: |
130 virtual ~CookieSettings(); | 131 virtual ~CookieSettings(); |
131 | 132 |
132 void OnBlockThirdPartyCookiesChanged(); | 133 void OnBlockThirdPartyCookiesChanged(); |
133 | 134 |
134 // Returns true if the "block third party cookies" preference is set. | 135 // Returns true if the "block third party cookies" preference is set. |
135 // | 136 // |
136 // This method may be called on any thread. | 137 // This method may be called on any thread. |
137 bool ShouldBlockThirdPartyCookies() const; | 138 bool ShouldBlockThirdPartyCookies() const; |
138 | 139 |
139 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 140 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
140 PrefChangeRegistrar pref_change_registrar_; | 141 PrefChangeRegistrar pref_change_registrar_; |
141 | 142 |
142 // Used around accesses to |block_third_party_cookies_| to guarantee thread | 143 // Used around accesses to |block_third_party_cookies_| to guarantee thread |
143 // safety. | 144 // safety. |
144 mutable base::Lock lock_; | 145 mutable base::Lock lock_; |
145 | 146 |
146 bool block_third_party_cookies_; | 147 bool block_third_party_cookies_; |
147 }; | 148 }; |
148 | 149 |
149 #endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_H_ | 150 #endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_H_ |
OLD | NEW |