From 55e172e6bbf82fd0a51d6af6367d180a2cb10a58 Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Thu, 8 Dec 2022 09:55:43 +0900 Subject: [PATCH] Hide first run dialog fix https://github.com/brave/brave-browser/issues/27225 Temporarily hide till we have numbers from new welcome flow. If welcome flow do better than FR dialog, we'll delete FR dialog. --- .../first_run/first_run_internal_posix.cc | 39 ------------------ .../first_run/first_run_internal_win.cc | 40 ------------------- 2 files changed, 79 deletions(-) delete mode 100644 chromium_src/chrome/browser/first_run/first_run_internal_posix.cc delete mode 100644 chromium_src/chrome/browser/first_run/first_run_internal_win.cc diff --git a/chromium_src/chrome/browser/first_run/first_run_internal_posix.cc b/chromium_src/chrome/browser/first_run/first_run_internal_posix.cc deleted file mode 100644 index 8b6f8725c0c2..000000000000 --- a/chromium_src/chrome/browser/first_run/first_run_internal_posix.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2021 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "chrome/browser/first_run/first_run_internal.h" - -#include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/no_destructor.h" -#include "base/path_service.h" -#include "build/branding_buildflags.h" -#include "build/build_config.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/first_run/first_run.h" -#include "chrome/browser/first_run/first_run_dialog.h" -#include "chrome/browser/metrics/metrics_reporting_state.h" -#include "chrome/common/chrome_constants.h" -#include "chrome/common/chrome_paths.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/installer/util/google_update_settings.h" -#include "chrome/installer/util/initial_preferences.h" -#include "components/metrics/metrics_pref_names.h" -#include "components/metrics/metrics_reporting_default_state.h" -#include "components/prefs/pref_service.h" -#include "components/startup_metric_utils/browser/startup_metric_utils.h" - -// All above headers copied from original first_run_internal_posix.cc are -// included to prevent below GOOGLE_CHROME_BUILD affect them. - -// First run dialog is only enabled for google chrome by default. -#if defined(OFFICIAL_BUILD) -#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING -#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (1) -#endif -#include "src/chrome/browser/first_run/first_run_internal_posix.cc" -#if defined(OFFICIAL_BUILD) -#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING -#endif diff --git a/chromium_src/chrome/browser/first_run/first_run_internal_win.cc b/chromium_src/chrome/browser/first_run/first_run_internal_win.cc deleted file mode 100644 index f54560a1ecab..000000000000 --- a/chromium_src/chrome/browser/first_run/first_run_internal_win.cc +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2022 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "chrome/browser/first_run/first_run_dialog.h" -#include "chrome/browser/first_run/first_run_internal.h" - -namespace { - -bool ShouldShowFirstRunDialog() { -#if defined(OFFICIAL_BUILD) - return first_run::internal::IsOrganicFirstRun(); -#else - return false; -#endif -} - -} // namespace - -#define DoPostImportPlatformSpecificTasks \ - DoPostImportPlatformSpecificTasks_ChromiumImpl - -#include "src/chrome/browser/first_run/first_run_internal_win.cc" - -#undef DoPostImportPlatformSpecificTasks - -namespace first_run { -namespace internal { - -void DoPostImportPlatformSpecificTasks() { - if (ShouldShowFirstRunDialog()) { - ShowFirstRunDialog(); - } - - DoPostImportPlatformSpecificTasks_ChromiumImpl(); -} - -} // namespace internal -} // namespace first_run