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

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

Issue 8462003: Exempt chrome-extension:// from third-party cookie rules, but not from regular content settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 1 month 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) 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // content_settings::Observer implementation. 160 // content_settings::Observer implementation.
161 virtual void OnContentSettingChanged( 161 virtual void OnContentSettingChanged(
162 ContentSettingsPattern primary_pattern, 162 ContentSettingsPattern primary_pattern,
163 ContentSettingsPattern secondary_pattern, 163 ContentSettingsPattern secondary_pattern,
164 ContentSettingsType content_type, 164 ContentSettingsType content_type,
165 std::string resource_identifier); 165 std::string resource_identifier);
166 166
167 // Returns true if we should allow all content types for this URL. This is 167 // Returns true if we should allow all content types for this URL. This is
168 // true for various internal objects like chrome:// URLs, so UI and other 168 // true for various internal objects like chrome:// URLs, so UI and other
169 // things users think of as "not webpages" don't break. 169 // things users think of as "not webpages" don't break.
170 static bool ShouldAllowAllContent(const GURL& url, 170 static bool ShouldAllowAllContent(const GURL& primary_url,
171 const GURL& secondary_url,
171 ContentSettingsType content_type); 172 ContentSettingsType content_type);
172 173
173 private: 174 private:
174 friend class base::RefCountedThreadSafe<HostContentSettingsMap>; 175 friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
175 friend class HostContentSettingsMapTest_NonDefaultSettings_Test; 176 friend class HostContentSettingsMapTest_NonDefaultSettings_Test;
176 177
177 typedef std::map<ProviderType, content_settings::ProviderInterface*> 178 typedef std::map<ProviderType, content_settings::ProviderInterface*>
178 ProviderMap; 179 ProviderMap;
179 typedef ProviderMap::iterator ProviderIterator; 180 typedef ProviderMap::iterator ProviderIterator;
180 typedef ProviderMap::const_iterator ConstProviderIterator; 181 typedef ProviderMap::const_iterator ConstProviderIterator;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Content setting providers. 216 // Content setting providers.
216 ProviderMap content_settings_providers_; 217 ProviderMap content_settings_providers_;
217 218
218 // Used around accesses to the following objects to guarantee thread safety. 219 // Used around accesses to the following objects to guarantee thread safety.
219 mutable base::Lock lock_; 220 mutable base::Lock lock_;
220 221
221 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); 222 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap);
222 }; 223 };
223 224
224 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 225 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698