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
38
39
40
41
42
43
44
45
46
47
48
49
ash / webui / diagnostics_ui / backend / diagnostics_manager.h [blame]
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WEBUI_DIAGNOSTICS_UI_BACKEND_DIAGNOSTICS_MANAGER_H_
#define ASH_WEBUI_DIAGNOSTICS_UI_BACKEND_DIAGNOSTICS_MANAGER_H_
#include <memory>
#include "base/memory/raw_ptr.h"
#include "ui/web_dialogs/web_dialog_ui.h"
namespace ash {
namespace diagnostics {
class NetworkHealthProvider;
class SessionLogHandler;
class SystemDataProvider;
class SystemRoutineController;
class InputDataProvider;
// DiagnosticsManager is responsible for managing the lifetime of the services
// used by the Diagnostics SWA.
class DiagnosticsManager {
public:
DiagnosticsManager(SessionLogHandler* session_log_handler,
content::WebUI* webui);
~DiagnosticsManager();
DiagnosticsManager(const DiagnosticsManager&) = delete;
DiagnosticsManager& operator=(const DiagnosticsManager&) = delete;
NetworkHealthProvider* GetNetworkHealthProvider() const;
SystemDataProvider* GetSystemDataProvider() const;
SystemRoutineController* GetSystemRoutineController() const;
InputDataProvider* GetInputDataProvider();
private:
std::unique_ptr<NetworkHealthProvider> network_health_provider_;
std::unique_ptr<SystemDataProvider> system_data_provider_;
std::unique_ptr<SystemRoutineController> system_routine_controller_;
std::unique_ptr<InputDataProvider> input_data_provider_;
raw_ptr<content::WebUI> webui_;
};
} // namespace diagnostics
} // namespace ash
#endif // ASH_WEBUI_DIAGNOSTICS_UI_BACKEND_DIAGNOSTICS_MANAGER_H_