in_process_patcher.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 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 COMPONENTS_UPDATE_CLIENT_PATCH_IN_PROCESS_PATCHER_H_
  5. #define COMPONENTS_UPDATE_CLIENT_PATCH_IN_PROCESS_PATCHER_H_
  6. #include "base/memory/scoped_refptr.h"
  7. #include "components/update_client/patcher.h"
  8. namespace update_client {
  9. // Creates an in-process patcher. It doesn't use Mojo abstractions and calls
  10. // Courgette lib APIs directly. This should only be used for testing
  11. // environments or other runtimes where multiprocess is infeasible, such as iOS,
  12. // Android WebView or Content dependencies are not allowed.
  13. class InProcessPatcherFactory : public PatcherFactory {
  14. public:
  15. InProcessPatcherFactory();
  16. InProcessPatcherFactory(const InProcessPatcherFactory&) = delete;
  17. InProcessPatcherFactory& operator=(const InProcessPatcherFactory&) = delete;
  18. scoped_refptr<Patcher> Create() const override;
  19. protected:
  20. ~InProcessPatcherFactory() override;
  21. };
  22. } // namespace update_client
  23. #endif // COMPONENTS_UPDATE_CLIENT_PATCH_IN_PROCESS_PATCHER_H_