Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1250)

Side by Side Diff: components/content_settings/core/browser/cookie_settings.cc

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698