OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 "content/browser/shared_worker/shared_worker_content_settings_proxy_imp
l.h" | 5 #include "content/browser/shared_worker/shared_worker_content_settings_proxy_imp
l.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 9 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 base::WeakPtr<SharedWorkerHost> host) | 24 base::WeakPtr<SharedWorkerHost> host) |
25 : host_(std::move(host)) {} | 25 : host_(std::move(host)) {} |
26 | 26 |
27 SharedWorkerContentSettingsProxyImpl::~SharedWorkerContentSettingsProxyImpl() = | 27 SharedWorkerContentSettingsProxyImpl::~SharedWorkerContentSettingsProxyImpl() = |
28 default; | 28 default; |
29 | 29 |
30 void SharedWorkerContentSettingsProxyImpl::AllowIndexedDB( | 30 void SharedWorkerContentSettingsProxyImpl::AllowIndexedDB( |
31 const url::Origin& origin, | 31 const url::Origin& origin, |
32 const base::string16& name, | 32 const base::string16& name, |
33 AllowIndexedDBCallback callback) { | 33 AllowIndexedDBCallback callback) { |
34 if (!origin.unique() && host_) { | 34 if (!origin.opaque() && host_) { |
35 bool result = host_->AllowIndexedDB(origin.GetURL(), name); | 35 bool result = host_->AllowIndexedDB(origin.GetURL(), name); |
36 std::move(callback).Run(result); | 36 std::move(callback).Run(result); |
37 } else | 37 } else |
38 std::move(callback).Run(false); | 38 std::move(callback).Run(false); |
39 } | 39 } |
40 | 40 |
41 void SharedWorkerContentSettingsProxyImpl::RequestFileSystemAccessSync( | 41 void SharedWorkerContentSettingsProxyImpl::RequestFileSystemAccessSync( |
42 const url::Origin& origin, | 42 const url::Origin& origin, |
43 RequestFileSystemAccessSyncCallback callback) { | 43 RequestFileSystemAccessSyncCallback callback) { |
44 if (!origin.unique() && host_) { | 44 if (!origin.opaque() && host_) { |
45 host_->AllowFileSystem(origin.GetURL(), std::move(callback)); | 45 host_->AllowFileSystem(origin.GetURL(), std::move(callback)); |
46 } else | 46 } else |
47 std::move(callback).Run(false); | 47 std::move(callback).Run(false); |
48 } | 48 } |
49 | 49 |
50 } // namespace content | 50 } // namespace content |
OLD | NEW |