#include "chrome/browser/ui/file_system_access/file_system_access_dangerous_file_dialog.h"
#include "base/functional/callback_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/file_system_access/file_system_access_ui_helpers.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_field.h"
#include "ui/base/mojom/dialog_button.mojom.h"
namespace {
DangerousFileResult;
std::unique_ptr<ui::DialogModel> CreateFileSystemAccessDangerousFileDialog(
content::WebContents* web_contents,
const url::Origin& origin,
const base::FilePath& path,
base::OnceCallback<
void(content::FileSystemAccessPermissionContext::SensitiveEntryResult)>
callback) { … }
}
void ShowFileSystemAccessDangerousFileDialog(
const url::Origin& origin,
const base::FilePath& path,
base::OnceCallback<
void(content::FileSystemAccessPermissionContext::SensitiveEntryResult)>
callback,
content::WebContents* web_contents) { … }
std::unique_ptr<ui::DialogModel>
CreateFileSystemAccessDangerousFileDialogForTesting(
const url::Origin& origin,
const base::FilePath& path,
base::OnceCallback<
void(content::FileSystemAccessPermissionContext::SensitiveEntryResult)>
callback) { … }