blob: da7060e30f6fe695d31f806a0d04d024822cd6f1 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_DIALOG_H_
#define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_DIALOG_H_
#include "base/callback_forward.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
// Hide this function on platforms where the dialog does not exist.
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
class Profile;
namespace first_run {
// Shows the first run dialog. Only called for organic first runs on Mac and
// desktop Linux official builds when metrics reporting is not already enabled.
// Invokes ChangeMetricsReportingState() if consent is given to enable crash
// reporting, and may initiate the flow to set the default browser.
void ShowFirstRunDialog(Profile* profile);
void ShowFirstRunDialogViews(Profile* profile);
// Maintain Cocoa-based first run dialog until we are confident that views'
// implementation works well on macOS.
#if BUILDFLAG(IS_MAC)
void ShowFirstRunDialogCocoa(Profile* profile);
#endif
// Returns a Closure invoked before calling ShowFirstRunDialog(). For testing.
base::OnceClosure& GetBeforeShowFirstRunDialogHookForTesting();
} // namespace first_run
#endif
#endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_DIALOG_H_