| Index: extensions/common/manifest_handlers/webview_info.cc
|
| diff --git a/extensions/common/manifest_handlers/webview_info.cc b/extensions/common/manifest_handlers/webview_info.cc
|
| index 57a5aa01f79a8f9de0c13d16c95cc97cb5fef946..cbb913d0a065d6d6c4d535946eb6b1cb65f68ed2 100644
|
| --- a/extensions/common/manifest_handlers/webview_info.cc
|
| +++ b/extensions/common/manifest_handlers/webview_info.cc
|
| @@ -86,6 +86,22 @@ bool WebviewInfo::IsResourceWebviewAccessible(
|
| return false;
|
| }
|
|
|
| +// static
|
| +bool WebviewInfo::HasWebviewAccessibleResources(
|
| + const Extension& extension,
|
| + const std::string& partition_id) {
|
| + const WebviewInfo* webview_info = static_cast<const WebviewInfo*>(
|
| + extension.GetManifestData(keys::kWebviewAccessibleResources));
|
| + if (!webview_info)
|
| + return false;
|
| +
|
| + for (const auto& item : webview_info->partition_items_) {
|
| + if (item->Matches(partition_id))
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| void WebviewInfo::AddPartitionItem(std::unique_ptr<PartitionItem> item) {
|
| partition_items_.push_back(std::move(item));
|
| }
|
|
|