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

Side by Side Diff: chrome/browser/generic_sensor/sensor_permission_context.cc

Issue 2791623004: [sensors][permission] Add new permission types in permission module. (Closed)
Patch Set: Rebase + add blank line in ONWERS file. Created 3 years, 4 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/generic_sensor/sensor_permission_context.h"
6
7 SensorPermissionContext::SensorPermissionContext(Profile* profile)
8 : PermissionContextBase(profile,
9 CONTENT_SETTINGS_TYPE_SENSORS,
10 blink::WebFeaturePolicyFeature::kNotFound) {}
11
12 SensorPermissionContext::~SensorPermissionContext() {}
13
14 ContentSetting SensorPermissionContext::GetPermissionStatusInternal(
15 content::RenderFrameHost* render_frame_host,
16 const GURL& requesting_origin,
17 const GURL& embedding_origin) const {
18 if (requesting_origin != embedding_origin)
19 return CONTENT_SETTING_BLOCK;
20
21 return CONTENT_SETTING_ALLOW;
22 }
23
24 bool SensorPermissionContext::IsRestrictedToSecureOrigins() const {
25 return true;
26 }
OLDNEW
« no previous file with comments | « chrome/browser/generic_sensor/sensor_permission_context.h ('k') | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698