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

Side by Side Diff: chrome/browser/background_sync/background_sync_permission_context.cc

Issue 2898663002: Implement feature policy checks in the browser process (Closed)
Patch Set: Implement feature policy checks in the browser process Created 3 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
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/background_sync/background_sync_permission_context.h" 5 #include "chrome/browser/background_sync/background_sync_permission_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/content_settings/core/common/content_settings_types.h" 8 #include "components/content_settings/core/common/content_settings_types.h"
9 9
10 BackgroundSyncPermissionContext::BackgroundSyncPermissionContext( 10 BackgroundSyncPermissionContext::BackgroundSyncPermissionContext(
11 Profile* profile) 11 Profile* profile)
12 : PermissionContextBase(profile, 12 : PermissionContextBase(profile,
13 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC) {} 13 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
14 blink::WebFeaturePolicyFeature::kNotFound) {}
14 15
15 void BackgroundSyncPermissionContext::CancelPermissionRequest( 16 void BackgroundSyncPermissionContext::CancelPermissionRequest(
16 content::WebContents* web_contents, 17 content::WebContents* web_contents,
17 const PermissionRequestID& id) { 18 const PermissionRequestID& id) {
18 // Background sync permission requests are resolved instantly without 19 // Background sync permission requests are resolved instantly without
19 // prompting the user, there is no way to cancel them. 20 // prompting the user, there is no way to cancel them.
20 NOTREACHED(); 21 NOTREACHED();
21 } 22 }
22 23
23 void BackgroundSyncPermissionContext::DecidePermission( 24 void BackgroundSyncPermissionContext::DecidePermission(
24 content::WebContents* web_contents, 25 content::WebContents* web_contents,
25 const PermissionRequestID& id, 26 const PermissionRequestID& id,
26 const GURL& requesting_origin, 27 const GURL& requesting_origin,
27 const GURL& embedding_origin, 28 const GURL& embedding_origin,
28 bool user_gesture, 29 bool user_gesture,
29 const BrowserPermissionCallback& callback) { 30 const BrowserPermissionCallback& callback) {
30 // The user should never be prompted to authorize background sync. 31 // The user should never be prompted to authorize background sync.
31 NOTREACHED(); 32 NOTREACHED();
32 } 33 }
33 34
34 bool BackgroundSyncPermissionContext::IsRestrictedToSecureOrigins() const { 35 bool BackgroundSyncPermissionContext::IsRestrictedToSecureOrigins() const {
35 return true; 36 return true;
36 } 37 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698