// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ #include <map> #include <memory> #include <string> #include "base/synchronization/lock.h" #include "base/threading/thread_checker.h" #include "extensions/common/extension_id.h" #include "extensions/common/manifest.h" #include "extensions/common/mojom/api_permission_id.mojom-shared.h" #include "extensions/common/mojom/manifest.mojom-shared.h" #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/permission_message.h" #include "extensions/common/permissions/permission_set.h" class GURL; namespace extensions { class URLPatternSet; // The possible type of requirements needed in order to capture the current // page. enum class CaptureRequirement { … }; // A container for the permissions state of an extension, including active, // withheld, and tab-specific permissions. // Thread-Safety: Since this is an object on the Extension object, *some* thread // safety is provided. All utility functions for checking if a permission is // present or an operation is allowed are thread-safe. However, permissions can // only be set (or updated) on the thread to which this object is bound. // Permissions may be accessed synchronously on that same thread. // Accessing on an improper thread will DCHECK(). // This is necessary to prevent a scenario in which one thread will access // permissions while another thread changes them. class PermissionsData { … }; } // namespace extensions #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_