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

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

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 years, 8 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 Register(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex", CONTENT_SETTING_ASK, 231 Register(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex", CONTENT_SETTING_ASK,
232 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(), 232 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(),
233 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, 233 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
234 CONTENT_SETTING_ASK), 234 CONTENT_SETTING_ASK),
235 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, 235 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
236 WebsiteSettingsRegistry::DESKTOP | 236 WebsiteSettingsRegistry::DESKTOP |
237 WebsiteSettingsRegistry::PLATFORM_ANDROID, 237 WebsiteSettingsRegistry::PLATFORM_ANDROID,
238 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); 238 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE);
239 239
240 Register(CONTENT_SETTINGS_TYPE_SENSORS, "sensors", CONTENT_SETTING_ASK,
241 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(),
242 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
243 CONTENT_SETTING_ASK),
244 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
245 WebsiteSettingsRegistry::DESKTOP |
246 WebsiteSettingsRegistry::PLATFORM_ANDROID,
247 ContentSettingsInfo::INHERIT_IN_INCOGNITO);
248
240 Register(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, 249 Register(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER,
241 "protected-media-identifier", CONTENT_SETTING_ASK, 250 "protected-media-identifier", CONTENT_SETTING_ASK,
242 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), 251 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(),
243 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, 252 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
244 CONTENT_SETTING_ASK), 253 CONTENT_SETTING_ASK),
245 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, 254 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
246 WebsiteSettingsRegistry::PLATFORM_ANDROID | 255 WebsiteSettingsRegistry::PLATFORM_ANDROID |
247 WebsiteSettingsRegistry::PLATFORM_CHROMEOS, 256 WebsiteSettingsRegistry::PLATFORM_CHROMEOS,
248 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); 257 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE);
249 258
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (!website_settings_info) 344 if (!website_settings_info)
336 return; 345 return;
337 346
338 DCHECK(!base::ContainsKey(content_settings_info_, type)); 347 DCHECK(!base::ContainsKey(content_settings_info_, type));
339 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( 348 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>(
340 website_settings_info, whitelisted_schemes, valid_settings, 349 website_settings_info, whitelisted_schemes, valid_settings,
341 incognito_behavior); 350 incognito_behavior);
342 } 351 }
343 352
344 } // namespace content_settings 353 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/test/data/generic_sensor/sensor.js ('k') | components/content_settings/core/common/content_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698