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

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

Issue 7029031: Content settings extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync & review Created 9 years, 6 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 | « no previous file | chrome/browser/content_settings/host_content_settings_map.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) 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 // Maps hostnames to custom content settings. Written on the UI thread and read 5 // Maps hostnames to custom content settings. Written on the UI thread and read
6 // on any thread. One instance per profile. 6 // on any thread. One instance per profile.
7 7
8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
10 #pragma once 10 #pragma once
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void AddExceptionForURL(const GURL& url, 141 void AddExceptionForURL(const GURL& url,
142 ContentSettingsType content_type, 142 ContentSettingsType content_type,
143 const std::string& resource_identifier, 143 const std::string& resource_identifier,
144 ContentSetting setting); 144 ContentSetting setting);
145 145
146 // Clears all host-specific settings for one content type. 146 // Clears all host-specific settings for one content type.
147 // 147 //
148 // This should only be called on the UI thread. 148 // This should only be called on the UI thread.
149 void ClearSettingsForOneType(ContentSettingsType content_type); 149 void ClearSettingsForOneType(ContentSettingsType content_type);
150 150
151 static bool IsSettingAllowedForType(ContentSetting setting,
152 ContentSettingsType content_type);
153
151 // This setting trumps any host-specific settings. 154 // This setting trumps any host-specific settings.
152 bool BlockThirdPartyCookies() const { return block_third_party_cookies_; } 155 bool BlockThirdPartyCookies() const { return block_third_party_cookies_; }
153 bool IsBlockThirdPartyCookiesManaged() const { 156 bool IsBlockThirdPartyCookiesManaged() const {
154 return is_block_third_party_cookies_managed_; 157 return is_block_third_party_cookies_managed_;
155 } 158 }
156 159
157 // Sets whether we block all third-party cookies. This method must not be 160 // Sets whether we block all third-party cookies. This method must not be
158 // invoked on an incognito map. 161 // invoked on an incognito map.
159 // 162 //
160 // This should only be called on the UI thread. 163 // This should only be called on the UI thread.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 mutable base::Lock lock_; 218 mutable base::Lock lock_;
216 219
217 // Misc global settings. 220 // Misc global settings.
218 bool block_third_party_cookies_; 221 bool block_third_party_cookies_;
219 bool is_block_third_party_cookies_managed_; 222 bool is_block_third_party_cookies_managed_;
220 223
221 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); 224 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap);
222 }; 225 };
223 226
224 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 227 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698