Commit 2bc53605 authored by Livvie Lin's avatar Livvie Lin Committed by Commit Bot

Moves SafetyTipsComponentInstallerPolicy into //components

Makes Safety Tip component updater logic available on iOS for use
in lookalike interstitials and Safety Tips.

Bug: 1140271
Change-Id: Iacf47c91d9fcaadf8a12a9475352eee27e882a0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521446Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Reviewed-by: default avatarJoe DeBlasio <jdeblasio@chromium.org>
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825463}
parent 31dd6c13
......@@ -321,8 +321,6 @@ static_library("browser") {
"component_updater/recovery_improved_component_installer.h",
"component_updater/registration.cc",
"component_updater/registration.h",
"component_updater/safety_tips_component_installer.cc",
"component_updater/safety_tips_component_installer.h",
"component_updater/ssl_error_assistant_component_installer.cc",
"component_updater/ssl_error_assistant_component_installer.h",
"component_updater/sth_set_component_remover.cc",
......
......@@ -23,7 +23,6 @@
#include "chrome/browser/component_updater/optimization_hints_component_installer.h"
#include "chrome/browser/component_updater/origin_trials_component_installer.h"
#include "chrome/browser/component_updater/pepper_flash_component_installer.h"
#include "chrome/browser/component_updater/safety_tips_component_installer.h"
#include "chrome/browser/component_updater/ssl_error_assistant_component_installer.h"
#include "chrome/browser/component_updater/sth_set_component_remover.h"
#include "chrome/browser/component_updater/subresource_filter_component_installer.h"
......@@ -36,6 +35,7 @@
#include "components/component_updater/component_updater_service.h"
#include "components/component_updater/crl_set_remover.h"
#include "components/component_updater/installer_policies/on_device_head_suggest_component_installer.h"
#include "components/component_updater/installer_policies/safety_tips_component_installer.h"
#include "components/nacl/common/buildflags.h"
#include "device/vr/buildflags/buildflags.h"
#include "third_party/widevine/cdm/buildflags.h"
......
......@@ -6,6 +6,8 @@ static_library("installer_policies") {
sources = [
"on_device_head_suggest_component_installer.cc",
"on_device_head_suggest_component_installer.h",
"safety_tips_component_installer.cc",
"safety_tips_component_installer.h",
]
deps = [
......@@ -13,5 +15,7 @@ static_library("installer_policies") {
"//components/component_updater",
"//components/omnibox/browser",
"//components/omnibox/common",
"//components/reputation/core",
"//components/reputation/core:proto",
]
}
include_rules = [
"+components/omnibox/browser",
"+components/omnibox/common",
"+components/reputation/core",
]
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/component_updater/safety_tips_component_installer.h"
#include "components/component_updater/installer_policies/safety_tips_component_installer.h"
#include <memory>
#include <utility>
......@@ -16,8 +16,6 @@
#include "base/task/thread_pool.h"
#include "components/reputation/core/safety_tips.pb.h"
#include "components/reputation/core/safety_tips_config.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
using component_updater::ComponentUpdateService;
......@@ -87,7 +85,6 @@ void SafetyTipsComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
std::unique_ptr<base::DictionaryValue> /* manifest */) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DVLOG(1) << "Component ready, version " << version.GetString() << " in "
<< install_dir.value();
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COMPONENT_UPDATER_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#define CHROME_BROWSER_COMPONENT_UPDATER_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#ifndef COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#define COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#include <memory>
#include <string>
......@@ -51,4 +51,4 @@ void RegisterSafetyTipsComponent(ComponentUpdateService* cus);
} // namespace component_updater
#endif // CHROME_BROWSER_COMPONENT_UPDATER_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#endif // COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment