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

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

Issue 2877553002: [subresource_filter] Swap ALLOW and BLOCK meanings in the content setting (Closed)
Patch Set: fix newer tests Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/content_settings_registry.h" 5 #include "components/content_settings/core/browser/content_settings_registry.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, 269 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW,
270 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), 270 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(),
271 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), 271 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
272 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, 272 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
273 WebsiteSettingsRegistry::DESKTOP | 273 WebsiteSettingsRegistry::DESKTOP |
274 WebsiteSettingsRegistry::PLATFORM_ANDROID, 274 WebsiteSettingsRegistry::PLATFORM_ANDROID,
275 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); 275 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE);
276 276
277 Register(CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresource-filter", 277 Register(CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresource-filter",
278 CONTENT_SETTING_ALLOW, 278 CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE,
279 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), 279 WhitelistedSchemes(),
280 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), 280 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
281 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, 281 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
282 WebsiteSettingsRegistry::DESKTOP | 282 WebsiteSettingsRegistry::DESKTOP |
283 WebsiteSettingsRegistry::PLATFORM_ANDROID, 283 WebsiteSettingsRegistry::PLATFORM_ANDROID,
284 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); 284 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE);
285 285
286 // Content settings that aren't used to store any data. TODO(raymes): use a 286 // Content settings that aren't used to store any data. TODO(raymes): use a
287 // different mechanism rather than content settings to represent these. 287 // different mechanism rather than content settings to represent these.
288 // Since nothing is stored in them, there is no real point in them being a 288 // Since nothing is stored in them, there is no real point in them being a
289 // content setting. 289 // content setting.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (!website_settings_info) 336 if (!website_settings_info)
337 return; 337 return;
338 338
339 DCHECK(!base::ContainsKey(content_settings_info_, type)); 339 DCHECK(!base::ContainsKey(content_settings_info_, type));
340 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( 340 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>(
341 website_settings_info, whitelisted_schemes, valid_settings, 341 website_settings_info, whitelisted_schemes, valid_settings,
342 incognito_behavior); 342 incognito_behavior);
343 } 343 }
344 344
345 } // namespace content_settings 345 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698