#include "chrome/browser/enterprise/idle/dialog_manager.h"
#include <utility>
#include "base/check.h"
#include "base/check_is_test.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/task/single_thread_task_runner.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/chrome_switches.h"
#include "components/enterprise/idle/idle_pref_names.h"
#include "components/enterprise/idle/metrics.h"
#include "components/prefs/pref_service.h"
namespace enterprise_idle {
namespace {
constexpr base::TimeDelta kTestDialogTimeout = …;
constexpr base::TimeDelta kDialogTimeout = …;
IdleDialog::ActionSet GetActionSet(PrefService* prefs) { … }
}
DialogManager::DialogManager() = default;
DialogManager::~DialogManager() = default;
DialogManager* DialogManager::GetInstance() { … }
base::CallbackListSubscription DialogManager::MaybeShowDialog(
Profile* profile,
base::TimeDelta threshold,
const base::flat_set<ActionType>& action_types,
FinishedCallback on_finished) { … }
void DialogManager::DismissDialogForTesting() { … }
bool DialogManager::IsDialogOpenForTesting() const { … }
void DialogManager::OnDialogDismissedByUser() { … }
void DialogManager::OnDialogExpired() { … }
}