scoped_testing_manifest_handler_registry.h 812 B

123456789101112131415161718192021222324252627
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef EXTENSIONS_COMMON_SCOPED_TESTING_MANIFEST_HANDLER_REGISTRY_H_
  5. #define EXTENSIONS_COMMON_SCOPED_TESTING_MANIFEST_HANDLER_REGISTRY_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "extensions/common/manifest_handler.h"
  8. namespace extensions {
  9. class ScopedTestingManifestHandlerRegistry {
  10. public:
  11. ScopedTestingManifestHandlerRegistry();
  12. ~ScopedTestingManifestHandlerRegistry();
  13. // TODO(devlin): Provide an accessor for |registry_|.
  14. private:
  15. ManifestHandlerRegistry registry_;
  16. raw_ptr<ManifestHandlerRegistry> old_registry_;
  17. };
  18. } // namespace extensions
  19. #endif // EXTENSIONS_COMMON_SCOPED_TESTING_MANIFEST_HANDLER_REGISTRY_H_