| 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 #include "components/content_settings/core/browser/cookie_settings.h" | 5 #include "components/content_settings/core/browser/cookie_settings.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | |
| 10 #include "components/content_settings/core/browser/content_settings_utils.h" | 9 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 11 #include "components/content_settings/core/browser/host_content_settings_map.h" | 10 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 12 #include "components/content_settings/core/common/content_settings_pattern.h" | 11 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 13 #include "components/content_settings/core/common/pref_names.h" | 12 #include "components/content_settings/core/common/pref_names.h" |
| 14 #include "components/pref_registry/pref_registry_syncable.h" | 13 #include "components/pref_registry/pref_registry_syncable.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/static_cookie_policy.h" | 16 #include "net/base/static_cookie_policy.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 bool IsValidSetting(ContentSetting setting) { | 21 bool IsValidSetting(ContentSetting setting) { |
| 22 return (setting == CONTENT_SETTING_ALLOW || | 22 return (setting == CONTENT_SETTING_ALLOW || |
| 23 setting == CONTENT_SETTING_SESSION_ONLY || | 23 setting == CONTENT_SETTING_SESSION_ONLY || |
| 24 setting == CONTENT_SETTING_BLOCK); | 24 setting == CONTENT_SETTING_BLOCK); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean( | 184 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean( |
| 185 prefs::kBlockThirdPartyCookies); | 185 prefs::kBlockThirdPartyCookies); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool CookieSettings::ShouldBlockThirdPartyCookies() const { | 188 bool CookieSettings::ShouldBlockThirdPartyCookies() const { |
| 189 base::AutoLock auto_lock(lock_); | 189 base::AutoLock auto_lock(lock_); |
| 190 return block_third_party_cookies_; | 190 return block_third_party_cookies_; |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace content_settings | 193 } // namespace content_settings |
| OLD | NEW |