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

Side by Side Diff: chrome/browser/content_settings/cookie_settings.cc

Issue 12330073: Disable ProfileKeyedServices on import process by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT Created 7 years, 9 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 | Annotate | Revision Log
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 "chrome/browser/content_settings/cookie_settings.h" 5 #include "chrome/browser/content_settings/cookie_settings.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/content_settings/content_settings_utils.h" 9 #include "chrome/browser/content_settings/content_settings_utils.h"
10 #include "chrome/browser/content_settings/host_content_settings_map.h" 10 #include "chrome/browser/content_settings/host_content_settings_map.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 PrefRegistrySyncable* registry) { 69 PrefRegistrySyncable* registry) {
70 registry->RegisterBooleanPref(prefs::kBlockThirdPartyCookies, 70 registry->RegisterBooleanPref(prefs::kBlockThirdPartyCookies,
71 false, 71 false,
72 PrefRegistrySyncable::SYNCABLE_PREF); 72 PrefRegistrySyncable::SYNCABLE_PREF);
73 } 73 }
74 74
75 bool CookieSettings::Factory::ServiceRedirectedInIncognito() const { 75 bool CookieSettings::Factory::ServiceRedirectedInIncognito() const {
76 return true; 76 return true;
77 } 77 }
78 78
79 bool CookieSettings::Factory::ServiceIsNULLOnImportProcess() const {
80 return false;
81 }
82
79 scoped_refptr<RefcountedProfileKeyedService> 83 scoped_refptr<RefcountedProfileKeyedService>
80 CookieSettings::Factory::BuildServiceInstanceFor(Profile* profile) const { 84 CookieSettings::Factory::BuildServiceInstanceFor(Profile* profile) const {
81 return new CookieSettings(profile->GetHostContentSettingsMap(), 85 return new CookieSettings(profile->GetHostContentSettingsMap(),
82 profile->GetPrefs()); 86 profile->GetPrefs());
83 } 87 }
84 88
85 CookieSettings::CookieSettings( 89 CookieSettings::CookieSettings(
86 HostContentSettingsMap* host_content_settings_map, 90 HostContentSettingsMap* host_content_settings_map,
87 PrefService* prefs) 91 PrefService* prefs)
88 : host_content_settings_map_(host_content_settings_map), 92 : host_content_settings_map_(host_content_settings_map),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 219
216 base::AutoLock auto_lock(lock_); 220 base::AutoLock auto_lock(lock_);
217 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean( 221 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean(
218 prefs::kBlockThirdPartyCookies); 222 prefs::kBlockThirdPartyCookies);
219 } 223 }
220 224
221 bool CookieSettings::ShouldBlockThirdPartyCookies() const { 225 bool CookieSettings::ShouldBlockThirdPartyCookies() const {
222 base::AutoLock auto_lock(lock_); 226 base::AutoLock auto_lock(lock_);
223 return block_third_party_cookies_; 227 return block_third_party_cookies_;
224 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698