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

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

Issue 10908088: Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, remove a few more lines of code Created 8 years, 3 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 "chrome/browser/content_settings/content_settings_utils.h" 8 #include "chrome/browser/content_settings/content_settings_utils.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 CookieSettings::Factory::~Factory() {} 65 CookieSettings::Factory::~Factory() {}
66 66
67 void CookieSettings::Factory::RegisterUserPrefs(PrefService* user_prefs) { 67 void CookieSettings::Factory::RegisterUserPrefs(PrefService* user_prefs) {
68 user_prefs->RegisterBooleanPref(prefs::kBlockThirdPartyCookies, 68 user_prefs->RegisterBooleanPref(prefs::kBlockThirdPartyCookies,
69 false, 69 false,
70 PrefService::SYNCABLE_PREF); 70 PrefService::SYNCABLE_PREF);
71 } 71 }
72 72
73 bool CookieSettings::Factory::ServiceRedirectedInIncognito() { 73 bool CookieSettings::Factory::ServiceRedirectedInIncognito() const {
74 return true; 74 return true;
75 } 75 }
76 76
77 scoped_refptr<RefcountedProfileKeyedService> 77 scoped_refptr<RefcountedProfileKeyedService>
78 CookieSettings::Factory::BuildServiceInstanceFor(Profile* profile) const { 78 CookieSettings::Factory::BuildServiceInstanceFor(Profile* profile) const {
79 return new CookieSettings(profile->GetHostContentSettingsMap(), 79 return new CookieSettings(profile->GetHostContentSettingsMap(),
80 profile->GetPrefs()); 80 profile->GetPrefs());
81 } 81 }
82 82
83 CookieSettings::CookieSettings( 83 CookieSettings::CookieSettings(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 DCHECK(value.get()); 223 DCHECK(value.get());
224 return content_settings::ValueToContentSetting(value.get()); 224 return content_settings::ValueToContentSetting(value.get());
225 } 225 }
226 226
227 CookieSettings::~CookieSettings() {} 227 CookieSettings::~CookieSettings() {}
228 228
229 bool CookieSettings::ShouldBlockThirdPartyCookies() const { 229 bool CookieSettings::ShouldBlockThirdPartyCookies() const {
230 base::AutoLock auto_lock(lock_); 230 base::AutoLock auto_lock(lock_);
231 return block_third_party_cookies_; 231 return block_third_party_cookies_;
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/cookie_settings.h ('k') | chrome/browser/custom_handlers/protocol_handler_registry_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698