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
ash / system / diagnostics / fake_diagnostics_browser_delegate.h [blame]
// Copyright 2023 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_SYSTEM_DIAGNOSTICS_FAKE_DIAGNOSTICS_BROWSER_DELEGATE_H_
#define ASH_SYSTEM_DIAGNOSTICS_FAKE_DIAGNOSTICS_BROWSER_DELEGATE_H_
#include "ash/system/diagnostics/diagnostics_browser_delegate.h"
#include "base/files/file_path.h"
namespace ash::diagnostics {
namespace {
constexpr char kDefaultUserDir[] = "/fake/user-dir";
} // namespace
// Fake delegate used to set the expected user directory path.
class FakeDiagnosticsBrowserDelegate : public DiagnosticsBrowserDelegate {
public:
explicit FakeDiagnosticsBrowserDelegate(
const base::FilePath& path = base::FilePath(kDefaultUserDir));
FakeDiagnosticsBrowserDelegate(const FakeDiagnosticsBrowserDelegate&) =
delete;
FakeDiagnosticsBrowserDelegate& operator=(
const FakeDiagnosticsBrowserDelegate&) = delete;
~FakeDiagnosticsBrowserDelegate() override = default;
base::FilePath GetActiveUserProfileDir() override;
private:
base::FilePath active_user_dir_;
};
} // namespace ash::diagnostics
#endif // ASH_SYSTEM_DIAGNOSTICS_FAKE_DIAGNOSTICS_BROWSER_DELEGATE_H_