diff --git a/app/brave_main_delegate.cc b/app/brave_main_delegate.cc index a3314e745ca7..f97b30fc6021 100644 --- a/app/brave_main_delegate.cc +++ b/app/brave_main_delegate.cc @@ -37,6 +37,7 @@ #include "components/omnibox/common/omnibox_features.h" #include "components/password_manager/core/common/password_manager_features.h" #include "components/safe_browsing/core/features.h" +#include "components/security_state/core/features.h" #include "components/sync/base/sync_base_switches.h" #include "components/translate/core/browser/translate_prefs.h" #include "components/variations/variations_switches.h" @@ -212,6 +213,7 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) { #if defined(OS_WIN) features::kWinrtGeolocationImplementation.name, #endif + security_state::features::kSafetyTipUI.name, }; // Disabled features. diff --git a/chromium_src/chrome/browser/component_updater/safety_tips_component_installer.cc b/chromium_src/chrome/browser/component_updater/safety_tips_component_installer.cc new file mode 100644 index 000000000000..0a6549c935e9 --- /dev/null +++ b/chromium_src/chrome/browser/component_updater/safety_tips_component_installer.cc @@ -0,0 +1,27 @@ +/* Copyright (c) 2020 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 https://mozilla.org/MPL/2.0/. */ + +#define RegisterSafetyTipsComponent RegisterSafetyTipsComponent_ChromiumImpl +#include "../../../../../chrome/browser/component_updater/safety_tips_component_installer.cc" // NOLINT +#undef RegisterSafetyTipsComponent + +#include "chrome/browser/component_updater/component_updater_utils.h" +#include "components/component_updater/component_updater_service.h" + +namespace component_updater { + +const char kSafetyTipsComponentId[] = "jflookgnkcckhobaglndicnbbgbonegd"; + +void OnSafetyTipsRegistered() { + component_updater::BraveOnDemandUpdate(kSafetyTipsComponentId); +} + +void RegisterSafetyTipsComponent(ComponentUpdateService* cus) { + auto installer = base::MakeRefCounted( + std::make_unique()); + installer->Register(cus, base::Bind(&OnSafetyTipsRegistered)); +} + +} // namespace component_updater diff --git a/chromium_src/components/component_updater/component_installer.cc b/chromium_src/components/component_updater/component_installer.cc index 630b6206ec30..b89261396c21 100644 --- a/chromium_src/components/component_updater/component_installer.cc +++ b/chromium_src/components/component_updater/component_installer.cc @@ -24,7 +24,6 @@ void ComponentInstaller::Register(ComponentUpdateService* cus, "eeigpngbgcognadeebkilcpcaedhellh", // Autofill States Data "gcmjkmgdlgnkkcocmoeiminaijmmjnii", // Subresource Filter Rules "ggkkehgbnfjpeggfpleeakpidbkibbmn", // Crowd Deny - "jflookgnkcckhobaglndicnbbgbonegd", // Safety Tips "llkgjffcdpffmhiakmfcdcblohccpfmo", // Origin Trials "ojhpjlocmbogdgmfpkhlaaeamibhnphh", // Zxcvbn Data Dictionaries #if defined(OS_ANDROID)