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

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

Issue 1290923003: Remove return value statement from the function that have void return type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | components/content_settings/core/browser/website_settings_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 9 #include "base/prefs/pref_service.h"
10 #include "components/content_settings/core/browser/content_settings_utils.h" 10 #include "components/content_settings/core/browser/content_settings_utils.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 bool CookieSettings::IsCookieSessionOnly(const GURL& origin) const { 70 bool CookieSettings::IsCookieSessionOnly(const GURL& origin) const {
71 ContentSetting setting = GetCookieSetting(origin, origin, true, NULL); 71 ContentSetting setting = GetCookieSetting(origin, origin, true, NULL);
72 DCHECK(IsValidSetting(setting)); 72 DCHECK(IsValidSetting(setting));
73 return (setting == CONTENT_SETTING_SESSION_ONLY); 73 return (setting == CONTENT_SETTING_SESSION_ONLY);
74 } 74 }
75 75
76 void CookieSettings::GetCookieSettings( 76 void CookieSettings::GetCookieSettings(
77 ContentSettingsForOneType* settings) const { 77 ContentSettingsForOneType* settings) const {
78 // TODO(dgrogan): Why is this returning a value in a void function? 78 host_content_settings_map_->GetSettingsForOneType(
79 return host_content_settings_map_->GetSettingsForOneType(
80 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), settings); 79 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), settings);
81 } 80 }
82 81
83 void CookieSettings::RegisterProfilePrefs( 82 void CookieSettings::RegisterProfilePrefs(
84 user_prefs::PrefRegistrySyncable* registry) { 83 user_prefs::PrefRegistrySyncable* registry) {
85 registry->RegisterBooleanPref( 84 registry->RegisterBooleanPref(
86 prefs::kBlockThirdPartyCookies, false, 85 prefs::kBlockThirdPartyCookies, false,
87 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 86 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
88 } 87 }
89 88
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean( 178 block_third_party_cookies_ = pref_change_registrar_.prefs()->GetBoolean(
180 prefs::kBlockThirdPartyCookies); 179 prefs::kBlockThirdPartyCookies);
181 } 180 }
182 181
183 bool CookieSettings::ShouldBlockThirdPartyCookies() const { 182 bool CookieSettings::ShouldBlockThirdPartyCookies() const {
184 base::AutoLock auto_lock(lock_); 183 base::AutoLock auto_lock(lock_);
185 return block_third_party_cookies_; 184 return block_third_party_cookies_;
186 } 185 }
187 186
188 } // namespace content_settings 187 } // namespace content_settings
OLDNEW
« no previous file with comments | « no previous file | components/content_settings/core/browser/website_settings_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698