summaryrefslogtreecommitdiff
path: root/chromium/base/fuchsia/default_context.h
blob: d45b68cc82b3ebf364366685fbade148e159c521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_FUCHSIA_DEFAULT_CONTEXT_H_
#define BASE_FUCHSIA_DEFAULT_CONTEXT_H_

#include <memory>

#include "base/base_export.h"

namespace sys {
class ComponentContext;
}  // namespace sys

namespace base {

namespace fuchsia {

// TODO(https://crbug.com/1090364): Remove this file when external dependencies
// have been migrated to process_context.
// Returns default sys::ComponentContext for the current process.
BASE_EXPORT sys::ComponentContext* ComponentContextForCurrentProcess();

}  // namespace fuchsia

// Replaces the default sys::ComponentContext for the current process, and
// returns the previously-active one.
// Use the base::TestComponentContextForProcess rather than calling this
// directly.
BASE_EXPORT std::unique_ptr<sys::ComponentContext>
ReplaceComponentContextForCurrentProcessForTest(
    std::unique_ptr<sys::ComponentContext> context);

}  // namespace base

#endif  // BASE_FUCHSIA_DEFAULT_CONTEXT_H_