Commit a9a3c32e authored by Jarryd's avatar Jarryd Committed by Commit Bot

ClearBrowsingData: Plumb top installed apps to CBD.

Add a function that'll return to WebUI the top 5 recently launched
installed apps sorted by site engagement) that have engagement within
the specified time period. Time period will be specified by the window
that the user selects in the clear browsing data dialog. This list of
apps will be used to warn users that they will be clearing data for
installed apps, similar to what is done on Android for important sites.

Bug: 997258
Change-Id: I7e06b6e000ffd0b2eec6173de22cc9b69c380659
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906876
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722628}
parent a2dbef49
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/time/time.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/banners/app_banner_settings_helper.h" #include "chrome/browser/banners/app_banner_settings_helper.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/engagement/site_engagement_details.mojom.h"
#include "chrome/browser/engagement/site_engagement_score.h" #include "chrome/browser/engagement/site_engagement_score.h"
#include "chrome/browser/engagement/site_engagement_service.h" #include "chrome/browser/engagement/site_engagement_service.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
...@@ -352,6 +352,23 @@ void PopulateInfoMapWithBookmarks( ...@@ -352,6 +352,23 @@ void PopulateInfoMapWithBookmarks(
} }
} }
void PopulateInfoMapWithInstalled(
browsing_data::TimePeriod time_period,
Profile* profile,
std::map<std::string, ImportantDomainInfo>* output) {
SiteEngagementService* service = SiteEngagementService::Get(profile);
std::vector<mojom::SiteEngagementDetails> engagement_details =
service->GetAllDetailsEngagedInTimePeriod(time_period);
std::set<GURL> content_origins;
for (const auto& detail : engagement_details) {
if (detail.installed_bonus > 0) {
MaybePopulateImportantInfoForReason(detail.origin, &content_origins,
ImportantReason::HOME_SCREEN, output);
}
}
}
} // namespace } // namespace
std::string ImportantSitesUtil::GetRegisterableDomainOrIP(const GURL& url) { std::string ImportantSitesUtil::GetRegisterableDomainOrIP(const GURL& url) {
...@@ -425,6 +442,32 @@ ImportantSitesUtil::GetImportantRegisterableDomains(Profile* profile, ...@@ -425,6 +442,32 @@ ImportantSitesUtil::GetImportantRegisterableDomains(Profile* profile,
return final_list; return final_list;
} }
std::vector<ImportantDomainInfo>
ImportantSitesUtil::GetInstalledRegisterableDomains(
browsing_data::TimePeriod time_period,
Profile* profile,
size_t max_results) {
std::vector<ImportantDomainInfo> installed_domains;
std::map<std::string, ImportantDomainInfo> important_info;
PopulateInfoMapWithInstalled(time_period, profile, &important_info);
std::unordered_set<std::string> excluded_domains =
GetBlacklistedImportantDomains(profile);
std::vector<std::pair<std::string, ImportantDomainInfo>> items(
important_info.begin(), important_info.end());
std::sort(items.begin(), items.end(), &CompareDescendingImportantInfo);
for (std::pair<std::string, ImportantDomainInfo>& domain_info : items) {
if (installed_domains.size() >= max_results)
break;
if (excluded_domains.find(domain_info.first) != excluded_domains.end())
continue;
installed_domains.push_back(domain_info.second);
}
return installed_domains;
}
void ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites( void ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites(
Profile* profile, Profile* profile,
const std::vector<std::string>& blacklisted_sites, const std::vector<std::string>& blacklisted_sites,
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <vector> #include <vector>
#include "base/macros.h" #include "base/macros.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "url/gurl.h" #include "url/gurl.h"
class Profile; class Profile;
...@@ -65,6 +66,13 @@ class ImportantSitesUtil { ...@@ -65,6 +66,13 @@ class ImportantSitesUtil {
Profile* profile, Profile* profile,
size_t max_results); size_t max_results);
// Return the top |<=max_results| important registrable domains that have an
// associated installed app. |max_results| is assumed to be small.
static std::vector<ImportantDomainInfo> GetInstalledRegisterableDomains(
browsing_data::TimePeriod time_period,
Profile* profile,
size_t max_results);
// Record the sites that the user chose to blacklist from clearing (in the // Record the sites that the user chose to blacklist from clearing (in the
// Clear Browsing Dialog) and the sites they ignored. The blacklisted sites // Clear Browsing Dialog) and the sites they ignored. The blacklisted sites
// are NOT cleared as they are 'blacklisted' from the clear operation. // are NOT cleared as they are 'blacklisted' from the clear operation.
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_pattern.h" #include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/history/core/browser/history_service.h" #include "components/history/core/browser/history_service.h"
...@@ -111,16 +112,27 @@ mojom::SiteEngagementDetails GetDetailsImpl(base::Clock* clock, ...@@ -111,16 +112,27 @@ mojom::SiteEngagementDetails GetDetailsImpl(base::Clock* clock,
} }
std::vector<mojom::SiteEngagementDetails> GetAllDetailsImpl( std::vector<mojom::SiteEngagementDetails> GetAllDetailsImpl(
browsing_data::TimePeriod time_period,
base::Clock* clock, base::Clock* clock,
HostContentSettingsMap* map) { HostContentSettingsMap* map) {
std::set<GURL> origins = GetEngagementOriginsFromContentSettings(map); std::set<GURL> origins = GetEngagementOriginsFromContentSettings(map);
std::vector<mojom::SiteEngagementDetails> details; std::vector<mojom::SiteEngagementDetails> details;
details.reserve(origins.size()); details.reserve(origins.size());
auto begin_time = browsing_data::CalculateBeginDeleteTime(time_period);
auto end_time = browsing_data::CalculateEndDeleteTime(time_period);
for (const GURL& origin : origins) { for (const GURL& origin : origins) {
if (!origin.is_valid()) if (!origin.is_valid())
continue; continue;
details.push_back(GetDetailsImpl(clock, origin, map));
auto score = CreateEngagementScoreImpl(clock, origin, map);
auto last_engagement_time = score.last_engagement_time();
if (begin_time > last_engagement_time || end_time < last_engagement_time)
continue;
details.push_back(score.GetDetails());
} }
return details; return details;
...@@ -183,7 +195,8 @@ SiteEngagementService::GetAllDetailsInBackground( ...@@ -183,7 +195,8 @@ SiteEngagementService::GetAllDetailsInBackground(
base::Time now, base::Time now,
scoped_refptr<HostContentSettingsMap> map) { scoped_refptr<HostContentSettingsMap> map) {
StoppedClock clock(now); StoppedClock clock(now);
return GetAllDetailsImpl(&clock, map.get()); return GetAllDetailsImpl(browsing_data::TimePeriod::ALL_TIME, &clock,
map.get());
} }
SiteEngagementService::SiteEngagementService(Profile* profile) SiteEngagementService::SiteEngagementService(Profile* profile)
...@@ -226,7 +239,19 @@ std::vector<mojom::SiteEngagementDetails> SiteEngagementService::GetAllDetails() ...@@ -226,7 +239,19 @@ std::vector<mojom::SiteEngagementDetails> SiteEngagementService::GetAllDetails()
CleanupEngagementScores(true); CleanupEngagementScores(true);
return GetAllDetailsImpl( return GetAllDetailsImpl(
clock_, HostContentSettingsMapFactory::GetForProfile(profile_)); browsing_data::TimePeriod::ALL_TIME, clock_,
HostContentSettingsMapFactory::GetForProfile(profile_));
}
std::vector<mojom::SiteEngagementDetails>
SiteEngagementService::GetAllDetailsEngagedInTimePeriod(
browsing_data::TimePeriod time_period) const {
if (IsLastEngagementStale())
CleanupEngagementScores(true);
return GetAllDetailsImpl(
time_period, clock_,
HostContentSettingsMapFactory::GetForProfile(profile_));
} }
void SiteEngagementService::HandleNotificationInteraction(const GURL& url) { void SiteEngagementService::HandleNotificationInteraction(const GURL& url) {
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/engagement/site_engagement_details.mojom.h" #include "chrome/browser/engagement/site_engagement_details.mojom.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "components/history/core/browser/history_service_observer.h" #include "components/history/core/browser/history_service_observer.h"
#include "components/keyed_service/core/keyed_service.h" #include "components/keyed_service/core/keyed_service.h"
#include "third_party/blink/public/mojom/site_engagement/site_engagement.mojom.h" #include "third_party/blink/public/mojom/site_engagement/site_engagement.mojom.h"
...@@ -153,6 +154,14 @@ class SiteEngagementService : public KeyedService, ...@@ -153,6 +154,14 @@ class SiteEngagementService : public KeyedService,
// performance-critical code. // performance-critical code.
std::vector<mojom::SiteEngagementDetails> GetAllDetails() const; std::vector<mojom::SiteEngagementDetails> GetAllDetails() const;
// Return an array of engagement score details for all origins which have
// had engagement since the specified time.
//
// Note that this method is quite expensive, so try to avoid calling it in
// performance-critical code.
std::vector<mojom::SiteEngagementDetails> GetAllDetailsEngagedInTimePeriod(
browsing_data::TimePeriod time_period) const;
// Update the engagement score of |url| for a notification interaction. // Update the engagement score of |url| for a notification interaction.
void HandleNotificationInteraction(const GURL& url); void HandleNotificationInteraction(const GURL& url);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
#include "chrome/browser/browsing_data/counters/browsing_data_counter_factory.h" #include "chrome/browser/browsing_data/counters/browsing_data_counter_factory.h"
#include "chrome/browser/browsing_data/counters/browsing_data_counter_utils.h" #include "chrome/browser/browsing_data/counters/browsing_data_counter_utils.h"
#include "chrome/browser/engagement/important_sites_util.h"
#include "chrome/browser/history/web_history_service_factory.h" #include "chrome/browser/history/web_history_service_factory.h"
#include "chrome/browser/signin/account_reconcilor_factory.h" #include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/identity_manager_factory.h"
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
#include "chrome/common/channel_info.h" #include "chrome/common/channel_info.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "components/browsing_data/core/history_notice_utils.h" #include "components/browsing_data/core/history_notice_utils.h"
#include "components/browsing_data/core/pref_names.h" #include "components/browsing_data/core/pref_names.h"
#include "components/feature_engagement/buildflags.h" #include "components/feature_engagement/buildflags.h"
...@@ -48,6 +50,7 @@ using BrowsingDataType = browsing_data::BrowsingDataType; ...@@ -48,6 +50,7 @@ using BrowsingDataType = browsing_data::BrowsingDataType;
namespace { namespace {
const int kMaxTimesHistoryNoticeShown = 1; const int kMaxTimesHistoryNoticeShown = 1;
const int kMaxInstalledAppsToWarnOf = 5;
// TODO(msramek): Get the list of deletion preferences from the JS side. // TODO(msramek): Get the list of deletion preferences from the JS side.
const char* kCounterPrefsAdvanced[] = { const char* kCounterPrefsAdvanced[] = {
...@@ -66,14 +69,19 @@ const char* kCounterPrefsBasic[] = { ...@@ -66,14 +69,19 @@ const char* kCounterPrefsBasic[] = {
browsing_data::prefs::kDeleteCacheBasic, browsing_data::prefs::kDeleteCacheBasic,
}; };
const char kRegisterableDomainField[] = "registerableDomain";
const char kReasonBitfieldField[] = "reasonBitfield";
const char kIsCheckedField[] = "isChecked";
} // namespace } // namespace
namespace settings { namespace settings {
// ClearBrowsingDataHandler ---------------------------------------------------- // ClearBrowsingDataHandler ----------------------------------------------------
ClearBrowsingDataHandler::ClearBrowsingDataHandler(content::WebUI* webui) ClearBrowsingDataHandler::ClearBrowsingDataHandler(content::WebUI* webui,
: profile_(Profile::FromWebUI(webui)), Profile* profile)
: profile_(profile),
sync_service_(ProfileSyncServiceFactory::GetForProfile(profile_)), sync_service_(ProfileSyncServiceFactory::GetForProfile(profile_)),
sync_service_observer_(this), sync_service_observer_(this),
show_history_deletion_dialog_(false) {} show_history_deletion_dialog_(false) {}
...@@ -82,6 +90,11 @@ ClearBrowsingDataHandler::~ClearBrowsingDataHandler() { ...@@ -82,6 +90,11 @@ ClearBrowsingDataHandler::~ClearBrowsingDataHandler() {
} }
void ClearBrowsingDataHandler::RegisterMessages() { void ClearBrowsingDataHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback(
"getImportantInstalledApps",
base::BindRepeating(
&ClearBrowsingDataHandler::GetRecentlyLaunchedInstalledApps,
base::Unretained(this)));
web_ui()->RegisterMessageCallback( web_ui()->RegisterMessageCallback(
"clearBrowsingData", "clearBrowsingData",
base::BindRepeating(&ClearBrowsingDataHandler::HandleClearBrowsingData, base::BindRepeating(&ClearBrowsingDataHandler::HandleClearBrowsingData,
...@@ -144,6 +157,43 @@ void ClearBrowsingDataHandler::HandleClearBrowsingDataForTest() { ...@@ -144,6 +157,43 @@ void ClearBrowsingDataHandler::HandleClearBrowsingDataForTest() {
HandleClearBrowsingData(&list_args); HandleClearBrowsingData(&list_args);
} }
void ClearBrowsingDataHandler::GetRecentlyLaunchedInstalledApps(
const base::ListValue* args) {
CHECK_EQ(2U, args->GetSize());
std::string webui_callback_id;
int period_selected;
CHECK(args->GetString(0, &webui_callback_id));
CHECK(args->GetInteger(1, &period_selected));
browsing_data::TimePeriod time_period =
static_cast<browsing_data::TimePeriod>(period_selected);
auto installed_apps = ImportantSitesUtil::GetInstalledRegisterableDomains(
time_period, profile_, kMaxInstalledAppsToWarnOf);
OnGotInstalledApps(webui_callback_id, installed_apps);
}
void ClearBrowsingDataHandler::OnGotInstalledApps(
const std::string& webui_callback_id,
std::vector<ImportantSitesUtil::ImportantDomainInfo> installed_apps) {
base::ListValue installed_apps_list;
for (auto info : installed_apps) {
auto entry = std::make_unique<base::DictionaryValue>();
// Used to get favicon in ClearBrowsingDataDialog and display URL next to
// app name in the dialog.
entry->SetString(kRegisterableDomainField, info.registerable_domain);
// The |reason_bitfield| is only passed to Javascript to be logged
// from |HandleClearBrowsingData|.
entry->SetInteger(kReasonBitfieldField, info.reason_bitfield);
// Initially all sites are selected for deletion.
entry->SetBoolean(kIsCheckedField, true);
installed_apps_list.Append(std::move(entry));
}
ResolveJavascriptCallback(base::Value(webui_callback_id),
installed_apps_list);
}
void ClearBrowsingDataHandler::HandleClearBrowsingData( void ClearBrowsingDataHandler::HandleClearBrowsingData(
const base::ListValue* args) { const base::ListValue* args) {
CHECK_EQ(3U, args->GetSize()); CHECK_EQ(3U, args->GetSize());
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/scoped_observer.h" #include "base/scoped_observer.h"
#include "chrome/browser/engagement/important_sites_util.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
#include "components/browsing_data/core/browsing_data_utils.h" #include "components/browsing_data/core/browsing_data_utils.h"
...@@ -33,7 +34,7 @@ namespace settings { ...@@ -33,7 +34,7 @@ namespace settings {
class ClearBrowsingDataHandler : public SettingsPageUIHandler, class ClearBrowsingDataHandler : public SettingsPageUIHandler,
public syncer::SyncServiceObserver { public syncer::SyncServiceObserver {
public: public:
explicit ClearBrowsingDataHandler(content::WebUI* webui); ClearBrowsingDataHandler(content::WebUI* webui, Profile* profile);
~ClearBrowsingDataHandler() override; ~ClearBrowsingDataHandler() override;
// WebUIMessageHandler implementation. // WebUIMessageHandler implementation.
...@@ -44,7 +45,17 @@ class ClearBrowsingDataHandler : public SettingsPageUIHandler, ...@@ -44,7 +45,17 @@ class ClearBrowsingDataHandler : public SettingsPageUIHandler,
// Calls |HandleClearBrowsingData| with test data for browser test. // Calls |HandleClearBrowsingData| with test data for browser test.
void HandleClearBrowsingDataForTest(); void HandleClearBrowsingDataForTest();
protected:
// Fetches a list of installed apps to be displayed in the clear browsing
// data confirmation dialog. Called by Javascript.
void GetRecentlyLaunchedInstalledApps(const base::ListValue* args);
private: private:
// Respond to the WebUI callback with the list of installed apps.
void OnGotInstalledApps(
const std::string& webui_callback_id,
std::vector<ImportantSitesUtil::ImportantDomainInfo> installed_apps);
// Clears browsing data, called by Javascript. // Clears browsing data, called by Javascript.
void HandleClearBrowsingData(const base::ListValue* value); void HandleClearBrowsingData(const base::ListValue* value);
......
// Copyright 2015 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.
#include <memory>
#include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h"
#include "base/values.h"
#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_ui.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_web_ui.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace {
constexpr char kGetInstalledApps[] = "getImportantInstalledApps";
constexpr char kWebUiFunctionName[] = "webUiCallbackName";
} // namespace
namespace settings {
class TestingClearBrowsingDataHandler : public ClearBrowsingDataHandler {
public:
TestingClearBrowsingDataHandler(content::WebUI* webui, Profile* profile)
: ClearBrowsingDataHandler(webui, profile) {
set_web_ui(webui);
}
TestingClearBrowsingDataHandler& operator=(
const TestingClearBrowsingDataHandler&) = delete;
TestingClearBrowsingDataHandler(const TestingClearBrowsingDataHandler&) =
delete;
};
class ClearBrowsingDataHandlerBrowserTest
: public web_app::WebAppControllerBrowserTest {
public:
ClearBrowsingDataHandlerBrowserTest() = default;
~ClearBrowsingDataHandlerBrowserTest() = default;
void SetUpOnMainThread() override {
WebAppControllerBrowserTest::SetUpOnMainThread();
handler_ = std::make_unique<TestingClearBrowsingDataHandler>(
web_ui(), browser()->profile());
handler_->AllowJavascriptForTesting();
handler_->RegisterMessages();
ASSERT_TRUE(https_server()->Start());
}
void TearDownOnMainThread() override { handler_.reset(); }
protected:
web_app::AppId InstallAndLaunchApp(GURL& url) {
auto app_id = InstallPWA(url);
ui_test_utils::UrlLoadObserver url_observer(
url, content::NotificationService::AllSources());
auto* app_browser =
ClearBrowsingDataHandlerBrowserTest::LaunchWebAppBrowser(app_id);
url_observer.Wait();
DCHECK(app_browser);
DCHECK(app_browser != browser());
return app_id;
}
ClearBrowsingDataHandler* handler() { return handler_.get(); }
content::TestWebUI* web_ui() { return &web_ui_; }
private:
std::unique_ptr<ClearBrowsingDataHandler> handler_;
content::TestWebUI web_ui_;
};
IN_PROC_BROWSER_TEST_P(ClearBrowsingDataHandlerBrowserTest, GetInstalledApps) {
GURL url(https_server()->GetURL("/"));
InstallAndLaunchApp(url);
base::ListValue args;
args.AppendString(kWebUiFunctionName);
args.AppendInteger(1U);
web_ui()->HandleReceivedMessage(kGetInstalledApps, &args);
const content::TestWebUI::CallData& call_data = *web_ui()->call_data().back();
EXPECT_EQ("cr.webUIResponse", call_data.function_name());
EXPECT_EQ(kWebUiFunctionName, call_data.arg1()->GetString());
ASSERT_TRUE(call_data.arg2()->GetBool());
// Get results from JS callback.
const base::span<const base::Value> result = call_data.arg3()->GetList();
ASSERT_EQ(1U, result.size());
auto& installed_app = result.back();
ASSERT_EQ(url.host(), *(installed_app.FindStringKey("registerableDomain")));
}
INSTANTIATE_TEST_SUITE_P(
All,
ClearBrowsingDataHandlerBrowserTest,
::testing::Values(
web_app::ControllerType::kHostedAppController,
web_app::ControllerType::kUnifiedControllerWithBookmarkApp,
web_app::ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
} // namespace settings
...@@ -192,7 +192,8 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) ...@@ -192,7 +192,8 @@ SettingsUI::SettingsUI(content::WebUI* web_ui)
AddSettingsPageUIHandler(std::make_unique<AccessibilityMainHandler>()); AddSettingsPageUIHandler(std::make_unique<AccessibilityMainHandler>());
AddSettingsPageUIHandler(std::make_unique<BrowserLifetimeHandler>()); AddSettingsPageUIHandler(std::make_unique<BrowserLifetimeHandler>());
AddSettingsPageUIHandler(std::make_unique<ClearBrowsingDataHandler>(web_ui)); AddSettingsPageUIHandler(
std::make_unique<ClearBrowsingDataHandler>(web_ui, profile));
AddSettingsPageUIHandler(std::make_unique<CookiesViewHandler>()); AddSettingsPageUIHandler(std::make_unique<CookiesViewHandler>());
AddSettingsPageUIHandler(std::make_unique<DownloadsHandler>(profile)); AddSettingsPageUIHandler(std::make_unique<DownloadsHandler>(profile));
AddSettingsPageUIHandler(std::make_unique<ExtensionControlHandler>()); AddSettingsPageUIHandler(std::make_unique<ExtensionControlHandler>());
......
...@@ -1354,6 +1354,7 @@ if (!is_android) { ...@@ -1354,6 +1354,7 @@ if (!is_android) {
"../browser/ui/webui/policy_ui_browsertest.cc", "../browser/ui/webui/policy_ui_browsertest.cc",
"../browser/ui/webui/prefs_internals_browsertest.cc", "../browser/ui/webui/prefs_internals_browsertest.cc",
"../browser/ui/webui/profile_helper_browsertest.cc", "../browser/ui/webui/profile_helper_browsertest.cc",
"../browser/ui/webui/settings/settings_clear_browsing_data_handler_browsertest.cc",
"../browser/ui/webui/settings/settings_ui_browsertest.cc", "../browser/ui/webui/settings/settings_ui_browsertest.cc",
"../browser/ui/webui/signin/user_manager_ui_browsertest.cc", "../browser/ui/webui/signin/user_manager_ui_browsertest.cc",
"../browser/ui/webui/webui_load_timer_browsertest.cc", "../browser/ui/webui/webui_load_timer_browsertest.cc",
......
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