Avi Drissman | 4e1b7bc | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 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 "content/browser/permissions/permission_service_context.h" |
| 6 | |
Arthur Sonzogni | c686e8f | 2024-01-11 08:36:37 | [diff] [blame] | 7 | #include <optional> |
dcheng | 36b6aec9 | 2015-12-26 06:16:36 | [diff] [blame] | 8 | #include <utility> |
| 9 | |
Avi Drissman | adac2199 | 2023-01-11 23:46:39 | [diff] [blame] | 10 | #include "base/functional/bind.h" |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 11 | #include "base/memory/raw_ptr.h" |
Thomas Nguyen | a4cf234 | 2022-12-01 13:15:41 | [diff] [blame] | 12 | #include "base/memory/weak_ptr.h" |
Andrey Lushnikov | ebff044 | 2018-07-12 20:02:58 | [diff] [blame] | 13 | #include "content/browser/permissions/permission_controller_impl.h" |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 14 | #include "content/browser/permissions/permission_service_impl.h" |
Illia Klimov | 7709f0c | 2021-07-05 09:42:39 | [diff] [blame] | 15 | #include "content/browser/permissions/permission_util.h" |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 16 | #include "content/public/browser/browser_context.h" |
jam | 5c2473dc | 2017-02-06 15:51:21 | [diff] [blame] | 17 | #include "content/public/browser/navigation_handle.h" |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 18 | #include "content/public/browser/render_frame_host.h" |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 19 | #include "content/public/browser/render_process_host.h" |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 20 | #include "content/public/browser/web_contents.h" |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 21 | #include "mojo/public/cpp/bindings/remote.h" |
Andy Paicu | a6d6d85 | 2022-04-28 18:08:36 | [diff] [blame] | 22 | #include "third_party/blink/public/common/permissions/permission_utils.h" |
Andy Paicu | bdb19c7 | 2022-04-22 09:24:31 | [diff] [blame] | 23 | #include "url/origin.h" |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 24 | |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 25 | namespace content { |
| 26 | |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 27 | // A holder owning document-associated PermissionServiceContext. The holder is |
| 28 | // used as PermissionServiceContext itself can't inherit from |
Sreeja Kamishetty | 0a0961f | 2021-10-11 16:23:53 | [diff] [blame] | 29 | // DocumentUserData, as PermissionServiceContext (unlike |
| 30 | // DocumentUserData) can be created when RenderFrameHost doesn't exist |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 31 | // (e.g. for service workers). |
| 32 | struct PermissionServiceContext::DocumentPermissionServiceContextHolder |
Sreeja Kamishetty | 0a0961f | 2021-10-11 16:23:53 | [diff] [blame] | 33 | : public DocumentUserData<DocumentPermissionServiceContextHolder> { |
Lukasz Anforowicz | cfeb95c | 2021-10-01 19:33:35 | [diff] [blame] | 34 | explicit DocumentPermissionServiceContextHolder(RenderFrameHost* rfh) |
Sreeja Kamishetty | 0a0961f | 2021-10-11 16:23:53 | [diff] [blame] | 35 | : DocumentUserData<DocumentPermissionServiceContextHolder>(rfh), |
Lukasz Anforowicz | cfeb95c | 2021-10-01 19:33:35 | [diff] [blame] | 36 | permission_service_context(rfh) {} |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 37 | |
| 38 | PermissionServiceContext permission_service_context; |
| 39 | |
Sreeja Kamishetty | 0a0961f | 2021-10-11 16:23:53 | [diff] [blame] | 40 | DOCUMENT_USER_DATA_KEY_DECL(); |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 41 | }; |
| 42 | |
Sreeja Kamishetty | 0a0961f | 2021-10-11 16:23:53 | [diff] [blame] | 43 | DOCUMENT_USER_DATA_KEY_IMPL( |
Daniel Cheng | 383df85 | 2021-10-02 03:28:01 | [diff] [blame] | 44 | PermissionServiceContext::DocumentPermissionServiceContextHolder); |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 45 | |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 46 | class PermissionServiceContext::PermissionSubscription { |
| 47 | public: |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 48 | PermissionSubscription( |
Illia Klimov | 2c6138b | 2023-08-14 09:39:25 | [diff] [blame] | 49 | PermissionStatus last_known_status, |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 50 | PermissionServiceContext* context, |
| 51 | mojo::PendingRemote<blink::mojom::PermissionObserver> observer) |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 52 | : last_known_status_(last_known_status), |
| 53 | context_(context), |
| 54 | observer_(std::move(observer)) { |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 55 | observer_.set_disconnect_handler(base::BindOnce( |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 56 | &PermissionSubscription::OnConnectionError, base::Unretained(this))); |
| 57 | } |
Lei Zhang | 67b7bf3 | 2019-10-08 18:46:01 | [diff] [blame] | 58 | PermissionSubscription(const PermissionSubscription&) = delete; |
| 59 | PermissionSubscription& operator=(const PermissionSubscription&) = delete; |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 60 | |
reillyg | 9c28b5c | 2017-01-06 20:51:31 | [diff] [blame] | 61 | ~PermissionSubscription() { |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 62 | DCHECK(id_); |
reillyg | 9c28b5c | 2017-01-06 20:51:31 | [diff] [blame] | 63 | BrowserContext* browser_context = context_->GetBrowserContext(); |
Andrey Lushnikov | ebff044 | 2018-07-12 20:02:58 | [diff] [blame] | 64 | if (browser_context) { |
| 65 | PermissionControllerImpl::FromBrowserContext(browser_context) |
Balazs Engedy | 33b441e | 2023-12-12 18:53:42 | [diff] [blame] | 66 | ->UnsubscribeFromPermissionStatusChange(id_); |
reillyg | 9c28b5c | 2017-01-06 20:51:31 | [diff] [blame] | 67 | } |
| 68 | } |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 69 | |
| 70 | void OnConnectionError() { |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 71 | DCHECK(id_); |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 72 | context_->ObserverHadConnectionError(id_); |
| 73 | } |
| 74 | |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 75 | void StoreStatusAtBFCacheEntry() { |
| 76 | status_at_bf_cache_entry_ = |
Arthur Sonzogni | c686e8f | 2024-01-11 08:36:37 | [diff] [blame] | 77 | std::make_optional<PermissionStatus>(last_known_status_); |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | void NotifyPermissionStatusChangedIfNeeded() { |
| 81 | DCHECK(status_at_bf_cache_entry_.has_value()); |
Thomas Nguyen | f9ccec8 | 2023-02-20 14:35:38 | [diff] [blame] | 82 | if (status_at_bf_cache_entry_ != last_known_status_) { |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 83 | observer_->OnPermissionStatusChange(last_known_status_); |
| 84 | } |
| 85 | status_at_bf_cache_entry_.reset(); |
| 86 | } |
| 87 | |
Illia Klimov | 2c6138b | 2023-08-14 09:39:25 | [diff] [blame] | 88 | void OnPermissionStatusChanged(PermissionStatus status) { |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 89 | if (!observer_.is_connected()) { |
| 90 | return; |
| 91 | } |
| 92 | |
| 93 | last_known_status_ = status; |
| 94 | |
| 95 | // Dispatching events while in BFCache is redundant. Permissions code in |
| 96 | // renderer process would decide to drop the event by looking at document's |
| 97 | // active status. |
| 98 | if (!status_at_bf_cache_entry_.has_value()) { |
Ravjit Singh Uppal | e306d3fa | 2021-07-05 13:47:45 | [diff] [blame] | 99 | observer_->OnPermissionStatusChange(status); |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 100 | } |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 101 | } |
| 102 | |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 103 | void set_id(PermissionController::SubscriptionId id) { id_ = id; } |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 104 | |
Thomas Nguyen | a4cf234 | 2022-12-01 13:15:41 | [diff] [blame] | 105 | base::WeakPtr<PermissionSubscription> GetWeakPtr() { |
| 106 | return weak_ptr_factory_.GetWeakPtr(); |
| 107 | } |
| 108 | |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 109 | private: |
Illia Klimov | 2c6138b | 2023-08-14 09:39:25 | [diff] [blame] | 110 | PermissionStatus last_known_status_ = PermissionStatus::LAST; |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 111 | const raw_ptr<PermissionServiceContext> context_; |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 112 | mojo::Remote<blink::mojom::PermissionObserver> observer_; |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 113 | PermissionController::SubscriptionId id_; |
Thomas Nguyen | a4cf234 | 2022-12-01 13:15:41 | [diff] [blame] | 114 | |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 115 | // Optional variable to store the last status before the corresponding |
| 116 | // RenderFrameHost enters BFCache, and will be cleared when the |
| 117 | // RenderFrameHost is restored from BFCache. Non-empty value indicates that |
| 118 | // the RenderFrameHost is in BFCache. |
Arthur Sonzogni | c686e8f | 2024-01-11 08:36:37 | [diff] [blame] | 119 | std::optional<PermissionStatus> status_at_bf_cache_entry_; |
Thomas Nguyen | a4cf234 | 2022-12-01 13:15:41 | [diff] [blame] | 120 | base::WeakPtrFactory<PermissionSubscription> weak_ptr_factory_{this}; |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 121 | }; |
| 122 | |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 123 | // static |
Thomas Nguyen | 1c30015 | 2023-02-02 09:56:11 | [diff] [blame] | 124 | PermissionServiceContext* |
| 125 | PermissionServiceContext::GetOrCreateForCurrentDocument( |
Alexander Timin | 72a2f0c | 2021-10-01 01:56:07 | [diff] [blame] | 126 | RenderFrameHost* render_frame_host) { |
| 127 | return &DocumentPermissionServiceContextHolder::GetOrCreateForCurrentDocument( |
| 128 | render_frame_host) |
| 129 | ->permission_service_context; |
| 130 | } |
Carlos Caballero | a0955348 | 2021-03-17 15:51:06 | [diff] [blame] | 131 | |
Thomas Nguyen | 1c30015 | 2023-02-02 09:56:11 | [diff] [blame] | 132 | // static |
| 133 | PermissionServiceContext* PermissionServiceContext::GetForCurrentDocument( |
| 134 | RenderFrameHost* render_frame_host) { |
| 135 | auto* holder = DocumentPermissionServiceContextHolder::GetForCurrentDocument( |
| 136 | render_frame_host); |
| 137 | return holder ? &holder->permission_service_context : nullptr; |
| 138 | } |
| 139 | |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 140 | PermissionServiceContext::PermissionServiceContext( |
| 141 | RenderFrameHost* render_frame_host) |
Ravjit | 715c2b4 | 2021-07-15 15:25:01 | [diff] [blame] | 142 | : render_frame_host_(render_frame_host), render_process_host_(nullptr) { |
| 143 | render_frame_host->GetProcess()->AddObserver(this); |
| 144 | } |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 145 | |
| 146 | PermissionServiceContext::PermissionServiceContext( |
| 147 | RenderProcessHost* render_process_host) |
Carlos Caballero | a0955348 | 2021-03-17 15:51:06 | [diff] [blame] | 148 | : render_frame_host_(nullptr), render_process_host_(render_process_host) {} |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 149 | |
| 150 | PermissionServiceContext::~PermissionServiceContext() { |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 151 | if (render_frame_host_) { |
Ravjit | 715c2b4 | 2021-07-15 15:25:01 | [diff] [blame] | 152 | render_frame_host_->GetProcess()->RemoveObserver(this); |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 153 | } |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | void PermissionServiceContext::CreateService( |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 157 | mojo::PendingReceiver<blink::mojom::PermissionService> receiver) { |
Sam McNally | 2e5c71f | 2017-12-11 03:24:27 | [diff] [blame] | 158 | DCHECK(render_frame_host_); |
Andy Paicu | bdb19c7 | 2022-04-22 09:24:31 | [diff] [blame] | 159 | services_.Add( |
| 160 | std::make_unique<PermissionServiceImpl>( |
| 161 | this, url::Origin::Create(PermissionUtil::GetLastCommittedOriginAsURL( |
| 162 | render_frame_host_))), |
| 163 | std::move(receiver)); |
Sam McNally | 2e5c71f | 2017-12-11 03:24:27 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | void PermissionServiceContext::CreateServiceForWorker( |
Miyoung Shin | e676be1f | 2019-09-25 00:47:02 | [diff] [blame] | 167 | const url::Origin& origin, |
| 168 | mojo::PendingReceiver<blink::mojom::PermissionService> receiver) { |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 169 | services_.Add(std::make_unique<PermissionServiceImpl>(this, origin), |
| 170 | std::move(receiver)); |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 171 | } |
| 172 | |
| 173 | void PermissionServiceContext::CreateSubscription( |
Andy Paicu | a6d6d85 | 2022-04-28 18:08:36 | [diff] [blame] | 174 | blink::PermissionType permission_type, |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 175 | const url::Origin& origin, |
Illia Klimov | 2c6138b | 2023-08-14 09:39:25 | [diff] [blame] | 176 | PermissionStatus current_status, |
| 177 | PermissionStatus last_known_status, |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 178 | mojo::PendingRemote<blink::mojom::PermissionObserver> observer) { |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 179 | BrowserContext* browser_context = GetBrowserContext(); |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 180 | if (!browser_context) { |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 181 | return; |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 182 | } |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 183 | |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 184 | auto subscription = std::make_unique<PermissionSubscription>( |
| 185 | last_known_status, this, std::move(observer)); |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 186 | |
| 187 | if (current_status != last_known_status) { |
| 188 | subscription->OnPermissionStatusChanged(current_status); |
Mario Sanchez Prada | 97f6616 | 2019-08-06 21:56:48 | [diff] [blame] | 189 | } |
| 190 | |
Thomas Nguyen | f9ccec8 | 2023-02-20 14:35:38 | [diff] [blame] | 191 | if (render_frame_host_ && |
| 192 | render_frame_host_->IsInLifecycleState( |
| 193 | content::RenderFrameHost::LifecycleState::kInBackForwardCache)) { |
| 194 | subscription->StoreStatusAtBFCacheEntry(); |
| 195 | } |
| 196 | |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 197 | GURL requesting_origin(origin.Serialize()); |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 198 | auto subscription_id = |
Andrey Lushnikov | ebff044 | 2018-07-12 20:02:58 | [diff] [blame] | 199 | PermissionControllerImpl::FromBrowserContext(browser_context) |
Balazs Engedy | 33b441e | 2023-12-12 18:53:42 | [diff] [blame] | 200 | ->SubscribeToPermissionStatusChange( |
Robbie McElrath | 8d5602a | 2022-04-01 17:39:18 | [diff] [blame] | 201 | permission_type, render_process_host_, render_frame_host_, |
| 202 | requesting_origin, |
Lei Zhang | 67b7bf3 | 2019-10-08 18:46:01 | [diff] [blame] | 203 | base::BindRepeating( |
| 204 | &PermissionSubscription::OnPermissionStatusChanged, |
Thomas Nguyen | a4cf234 | 2022-12-01 13:15:41 | [diff] [blame] | 205 | subscription->GetWeakPtr())); |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 206 | subscription->set_id(subscription_id); |
| 207 | subscriptions_[subscription_id] = std::move(subscription); |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 208 | } |
| 209 | |
Balazs Engedy | ad1489b | 2021-03-31 07:47:19 | [diff] [blame] | 210 | void PermissionServiceContext::ObserverHadConnectionError( |
| 211 | PermissionController::SubscriptionId subscription_id) { |
Lei Zhang | 67b7bf3 | 2019-10-08 18:46:01 | [diff] [blame] | 212 | size_t erased = subscriptions_.erase(subscription_id); |
| 213 | DCHECK_EQ(1u, erased); |
reillyg | 86dfcea | 2017-01-04 22:27:57 | [diff] [blame] | 214 | } |
| 215 | |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 216 | BrowserContext* PermissionServiceContext::GetBrowserContext() const { |
Carlos Caballero | a0955348 | 2021-03-17 15:51:06 | [diff] [blame] | 217 | if (render_frame_host_) |
| 218 | return render_frame_host_->GetBrowserContext(); |
Dominic Mazzoni | 94e567b | 2017-08-29 18:07:02 | [diff] [blame] | 219 | |
| 220 | if (render_process_host_) |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 221 | return render_process_host_->GetBrowserContext(); |
Dominic Mazzoni | 94e567b | 2017-08-29 18:07:02 | [diff] [blame] | 222 | |
| 223 | return nullptr; |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | GURL PermissionServiceContext::GetEmbeddingOrigin() const { |
Henrique Ferreiro | f89870f | 2022-03-30 17:08:13 | [diff] [blame] | 227 | return render_frame_host_ ? PermissionUtil::GetLastCommittedOriginAsURL( |
| 228 | render_frame_host_->GetMainFrame()) |
| 229 | : GURL(); |
timvolodine | 089c07c | 2014-12-11 19:32:26 | [diff] [blame] | 230 | } |
| 231 | |
Ravjit | 715c2b4 | 2021-07-15 15:25:01 | [diff] [blame] | 232 | void PermissionServiceContext::RenderProcessHostDestroyed( |
| 233 | RenderProcessHost* host) { |
| 234 | DCHECK(host == render_frame_host_->GetProcess()); |
| 235 | subscriptions_.clear(); |
| 236 | // RenderProcessHostImpl will always outlive 'this', but it gets cleaned up |
| 237 | // earlier so we need to listen to this event so we can do our clean up as |
| 238 | // well. |
| 239 | host->RemoveObserver(this); |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 240 | } |
| 241 | |
Thomas Nguyen | 1c30015 | 2023-02-02 09:56:11 | [diff] [blame] | 242 | void PermissionServiceContext::StoreStatusAtBFCacheEntry() { |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 243 | for (auto& iter : subscriptions_) { |
| 244 | iter.second->StoreStatusAtBFCacheEntry(); |
| 245 | } |
| 246 | } |
| 247 | |
Thomas Nguyen | 1c30015 | 2023-02-02 09:56:11 | [diff] [blame] | 248 | void PermissionServiceContext::NotifyPermissionStatusChangedIfNeeded() { |
Thomas Nguyen | 5fe1927 | 2022-12-15 10:38:00 | [diff] [blame] | 249 | for (auto& iter : subscriptions_) { |
| 250 | iter.second->NotifyPermissionStatusChangedIfNeeded(); |
| 251 | } |
Ravjit | 715c2b4 | 2021-07-15 15:25:01 | [diff] [blame] | 252 | } |
| 253 | |
Lei Zhang | 67b7bf3 | 2019-10-08 18:46:01 | [diff] [blame] | 254 | } // namespace content |