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

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

Issue 7837038: Address post commit comments for CL http://codereview.chromium.org/7828022/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/content_settings/content_settings_policy_provider.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/host_content_settings_map.h" 5 #include "chrome/browser/content_settings/host_content_settings_map.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // value that is to be used as default. We here rely on the 182 // value that is to be used as default. We here rely on the
183 // PrefContentSettingProvider to always provide a value. 183 // PrefContentSettingProvider to always provide a value.
184 CHECK_NE(CONTENT_SETTING_DEFAULT, setting); 184 CHECK_NE(CONTENT_SETTING_DEFAULT, setting);
185 return setting; 185 return setting;
186 } 186 }
187 187
188 ContentSettings HostContentSettingsMap::GetDefaultContentSettings() const { 188 ContentSettings HostContentSettingsMap::GetDefaultContentSettings() const {
189 ContentSettings output(CONTENT_SETTING_DEFAULT); 189 ContentSettings output(CONTENT_SETTING_DEFAULT);
190 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 190 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
191 if (!ContentTypeHasCompoundValue(ContentSettingsType(i))) 191 if (!ContentTypeHasCompoundValue(ContentSettingsType(i)))
192 output.settings[i] = GetDefaultContentSetting(ContentSettingsType(i)); 192 output.settings[i] = GetDefaultContentSetting(ContentSettingsType(i));
193 } 193 }
194 return output; 194 return output;
195 } 195 }
196 196
197 ContentSetting HostContentSettingsMap::GetCookieContentSetting( 197 ContentSetting HostContentSettingsMap::GetCookieContentSetting(
198 const GURL& url, 198 const GURL& url,
199 const GURL& first_party_url, 199 const GURL& first_party_url,
200 bool setting_cookie) const { 200 bool setting_cookie) const {
201 if (ShouldAllowAllContent(first_party_url, CONTENT_SETTINGS_TYPE_COOKIES)) 201 if (ShouldAllowAllContent(first_party_url, CONTENT_SETTINGS_TYPE_COOKIES))
202 return CONTENT_SETTING_ALLOW; 202 return CONTENT_SETTING_ALLOW;
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES, 591 SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES,
592 (cookie_behavior == net::StaticCookiePolicy::BLOCK_ALL_COOKIES) ? 592 (cookie_behavior == net::StaticCookiePolicy::BLOCK_ALL_COOKIES) ?
593 CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW); 593 CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
594 } 594 }
595 if (!prefs_->HasPrefPath(prefs::kBlockThirdPartyCookies)) { 595 if (!prefs_->HasPrefPath(prefs::kBlockThirdPartyCookies)) {
596 SetBlockThirdPartyCookies(cookie_behavior == 596 SetBlockThirdPartyCookies(cookie_behavior ==
597 net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES); 597 net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES);
598 } 598 }
599 } 599 }
600 } 600 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_policy_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698