OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/storage/durable_storage_permission_context.h" | 5 #include "chrome/browser/storage/durable_storage_permission_context.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/child_process_security_policy.h" | 22 #include "content/public/browser/child_process_security_policy.h" |
23 #include "content/public/common/origin_util.h" | 23 #include "content/public/common/origin_util.h" |
24 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 24 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 using bookmarks::BookmarkModel; | 27 using bookmarks::BookmarkModel; |
28 | 28 |
29 DurableStoragePermissionContext::DurableStoragePermissionContext( | 29 DurableStoragePermissionContext::DurableStoragePermissionContext( |
30 Profile* profile) | 30 Profile* profile) |
31 : PermissionContextBase(profile, | 31 : PermissionContextBase(profile, |
32 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE) {} | 32 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, |
| 33 blink::WebFeaturePolicyFeature::kNotFound) {} |
33 | 34 |
34 void DurableStoragePermissionContext::DecidePermission( | 35 void DurableStoragePermissionContext::DecidePermission( |
35 content::WebContents* web_contents, | 36 content::WebContents* web_contents, |
36 const PermissionRequestID& id, | 37 const PermissionRequestID& id, |
37 const GURL& requesting_origin, | 38 const GURL& requesting_origin, |
38 const GURL& embedding_origin, | 39 const GURL& embedding_origin, |
39 bool user_gesture, | 40 bool user_gesture, |
40 const BrowserPermissionCallback& callback) { | 41 const BrowserPermissionCallback& callback) { |
41 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 42 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
42 DCHECK_NE(CONTENT_SETTING_ALLOW, | 43 DCHECK_NE(CONTENT_SETTING_ALLOW, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 HostContentSettingsMapFactory::GetForProfile(profile()) | 103 HostContentSettingsMapFactory::GetForProfile(profile()) |
103 ->SetContentSettingDefaultScope(requesting_origin, GURL(), | 104 ->SetContentSettingDefaultScope(requesting_origin, GURL(), |
104 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, | 105 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, |
105 std::string(), content_setting); | 106 std::string(), content_setting); |
106 } | 107 } |
107 | 108 |
108 bool DurableStoragePermissionContext::IsRestrictedToSecureOrigins() const { | 109 bool DurableStoragePermissionContext::IsRestrictedToSecureOrigins() const { |
109 return true; | 110 return true; |
110 } | 111 } |
OLD | NEW |