// 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 CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ #include <memory> #include <set> #include <string> #include "base/containers/queue.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "components/keyed_service/core/keyed_service.h" #include "extensions/browser/management_policy.h" #include "extensions/common/extension_id.h" namespace content { class BrowserContext; } namespace extensions { class Extension; class ExtensionPrefs; class InstallSigner; struct InstallSignature; // This class implements verification that a set of extensions are either from // the webstore or are allowlisted by enterprise policy. The webstore // verification process works by sending a request to a backend server to get a // signature proving that a set of extensions are verified. This signature is // written into the extension preferences and is checked for validity when // being read back again. // // This class should be kept notified of runtime changes to the set of // extensions installed from the webstore. class InstallVerifier : public KeyedService, public ManagementPolicy::Provider { … }; // Instances of this class can be constructed to disable install verification // during tests. class ScopedInstallVerifierBypassForTest { … }; } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_