process_context.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2020 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 BASE_FUCHSIA_PROCESS_CONTEXT_H_
  5. #define BASE_FUCHSIA_PROCESS_CONTEXT_H_
  6. #include <memory>
  7. #include "base/base_export.h"
  8. namespace sys {
  9. class ComponentContext;
  10. class ComponentInspector;
  11. } // namespace sys
  12. namespace base {
  13. // Returns sys::ComponentInspector for the current process.
  14. BASE_EXPORT sys::ComponentInspector* ComponentInspectorForProcess();
  15. // Returns default sys::ComponentContext for the current process.
  16. BASE_EXPORT sys::ComponentContext* ComponentContextForProcess();
  17. // Replaces the default sys::ComponentContext for the current process, and
  18. // returns the previously-active one.
  19. // Use the base::TestComponentContextForProcess rather than calling this
  20. // directly.
  21. BASE_EXPORT std::unique_ptr<sys::ComponentContext>
  22. ReplaceComponentContextForProcessForTest(
  23. std::unique_ptr<sys::ComponentContext> context);
  24. } // namespace base
  25. #endif // BASE_FUCHSIA_PROCESS_CONTEXT_H_