#ifndef CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_CONTROLLER_H_
#define CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_CONTROLLER_H_
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/memory/singleton.h"
namespace base {
class CommandLine;
}
namespace diagnostics {
class DiagnosticsWriter;
class DiagnosticsModel;
class DiagnosticsController {
public:
static DiagnosticsController* GetInstance();
DiagnosticsController(const DiagnosticsController&) = delete;
DiagnosticsController& operator=(const DiagnosticsController&) = delete;
int Run(const base::CommandLine& command_line, DiagnosticsWriter* writer);
int RunRecovery(const base::CommandLine& command_line,
DiagnosticsWriter* writer);
const DiagnosticsModel& GetResults() const;
bool HasResults();
void ClearResults();
private:
friend struct base::DefaultSingletonTraits<DiagnosticsController>;
DiagnosticsController();
~DiagnosticsController();
std::unique_ptr<DiagnosticsModel> model_;
raw_ptr<DiagnosticsWriter> writer_;
};
}
#endif