summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch')
-rw-r--r--www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch837
1 files changed, 470 insertions, 367 deletions
diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch
index d71a532..f8ea612 100644
--- a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch
+++ b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch
@@ -1,8 +1,8 @@
1# Additional changes to Inox's fix-building-without-safebrowsing.patch 1# Additional changes to Inox's fix-building-without-safebrowsing.patch
2 2
3--- chrome/browser/BUILD.gn.orig 3--- a/chrome/browser/BUILD.gn
4+++ chrome/browser/BUILD.gn 4+++ b/chrome/browser/BUILD.gn
5@@ -1953,7 +1953,6 @@ static_library("browser") { 5@@ -1927,7 +1927,6 @@ static_library("browser") {
6 "//chrome/browser/net:probe_message_proto", 6 "//chrome/browser/net:probe_message_proto",
7 "//chrome/browser/new_tab_page/modules/drive:mojo_bindings", 7 "//chrome/browser/new_tab_page/modules/drive:mojo_bindings",
8 "//chrome/browser/new_tab_page/modules/photos:mojo_bindings", 8 "//chrome/browser/new_tab_page/modules/photos:mojo_bindings",
@@ -10,7 +10,7 @@
10 "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings", 10 "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings",
11 "//chrome/browser/notifications", 11 "//chrome/browser/notifications",
12 "//chrome/browser/notifications/scheduler:factory", 12 "//chrome/browser/notifications/scheduler:factory",
13@@ -3726,9 +3725,6 @@ static_library("browser") { 13@@ -3739,9 +3738,6 @@ static_library("browser") {
14 "download/offline_item_model_manager_factory.h", 14 "download/offline_item_model_manager_factory.h",
15 "enterprise/connectors/analysis/analysis_service_settings.cc", 15 "enterprise/connectors/analysis/analysis_service_settings.cc",
16 "enterprise/connectors/analysis/analysis_service_settings.h", 16 "enterprise/connectors/analysis/analysis_service_settings.h",
@@ -20,7 +20,7 @@
20 "enterprise/connectors/analysis/content_analysis_dialog.cc", 20 "enterprise/connectors/analysis/content_analysis_dialog.cc",
21 "enterprise/connectors/analysis/content_analysis_dialog.h", 21 "enterprise/connectors/analysis/content_analysis_dialog.h",
22 "enterprise/connectors/analysis/content_analysis_downloads_delegate.cc", 22 "enterprise/connectors/analysis/content_analysis_downloads_delegate.cc",
23@@ -3978,10 +3974,6 @@ static_library("browser") { 23@@ -3988,10 +3984,6 @@ static_library("browser") {
24 "new_tab_page/modules/photos/photos_service.h", 24 "new_tab_page/modules/photos/photos_service.h",
25 "new_tab_page/modules/photos/photos_service_factory.cc", 25 "new_tab_page/modules/photos/photos_service_factory.cc",
26 "new_tab_page/modules/photos/photos_service_factory.h", 26 "new_tab_page/modules/photos/photos_service_factory.h",
@@ -31,7 +31,7 @@
31 "new_tab_page/modules/task_module/task_module_handler.cc", 31 "new_tab_page/modules/task_module/task_module_handler.cc",
32 "new_tab_page/modules/task_module/task_module_handler.h", 32 "new_tab_page/modules/task_module/task_module_handler.h",
33 "new_tab_page/modules/task_module/task_module_service.cc", 33 "new_tab_page/modules/task_module/task_module_service.cc",
34@@ -7012,9 +7004,14 @@ static_library("browser") { 34@@ -7285,9 +7277,14 @@ static_library("browser") {
35 "//components/safe_browsing/content/browser:safe_browsing_blocking_page", 35 "//components/safe_browsing/content/browser:safe_browsing_blocking_page",
36 "//components/safe_browsing/content/browser/download:download_stats", 36 "//components/safe_browsing/content/browser/download:download_stats",
37 "//components/safe_browsing/content/common:file_type_policies", 37 "//components/safe_browsing/content/common:file_type_policies",
@@ -47,8 +47,8 @@
47 47
48 if (!is_fuchsia) { 48 if (!is_fuchsia) {
49 sources += [ 49 sources += [
50--- chrome/browser/accuracy_tips/accuracy_service_factory.cc.orig 50--- a/chrome/browser/accuracy_tips/accuracy_service_factory.cc
51+++ chrome/browser/accuracy_tips/accuracy_service_factory.cc 51+++ b/chrome/browser/accuracy_tips/accuracy_service_factory.cc
52@@ -48,10 +48,7 @@ KeyedService* AccuracyServiceFactory::Bu 52@@ -48,10 +48,7 @@ KeyedService* AccuracyServiceFactory::Bu
53 content::BrowserContext* browser_context) const { 53 content::BrowserContext* browser_context) const {
54 DCHECK(base::FeatureList::IsEnabled(safe_browsing::kAccuracyTipsFeature)); 54 DCHECK(base::FeatureList::IsEnabled(safe_browsing::kAccuracyTipsFeature));
@@ -61,9 +61,9 @@
61 auto* history_service = HistoryServiceFactory::GetForProfile( 61 auto* history_service = HistoryServiceFactory::GetForProfile(
62 profile, ServiceAccessType::IMPLICIT_ACCESS); 62 profile, ServiceAccessType::IMPLICIT_ACCESS);
63 auto delegate = std::make_unique<AccuracyServiceDelegate>(profile); 63 auto delegate = std::make_unique<AccuracyServiceDelegate>(profile);
64--- chrome/browser/chrome_content_browser_client.cc.orig 64--- a/chrome/browser/chrome_content_browser_client.cc
65+++ chrome/browser/chrome_content_browser_client.cc 65+++ b/chrome/browser/chrome_content_browser_client.cc
66@@ -4229,11 +4229,13 @@ ChromeContentBrowserClient::CreateThrott 66@@ -4285,11 +4285,13 @@ ChromeContentBrowserClient::CreateThrott
67 &throttles); 67 &throttles);
68 #endif 68 #endif
69 69
@@ -77,7 +77,7 @@
77 77
78 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch 78 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
79 // of lacros-chrome is complete. 79 // of lacros-chrome is complete.
80@@ -5632,26 +5634,7 @@ ChromeContentBrowserClient::GetSafeBrows 80@@ -5689,26 +5691,7 @@ ChromeContentBrowserClient::GetSafeBrows
81 const std::vector<std::string>& allowlist_domains) { 81 const std::vector<std::string>& allowlist_domains) {
82 DCHECK_CURRENTLY_ON(BrowserThread::IO); 82 DCHECK_CURRENTLY_ON(BrowserThread::IO);
83 83
@@ -105,7 +105,7 @@
105 } 105 }
106 106
107 safe_browsing::RealTimeUrlLookupServiceBase* 107 safe_browsing::RealTimeUrlLookupServiceBase*
108@@ -5672,11 +5655,6 @@ ChromeContentBrowserClient::GetUrlLookup 108@@ -5729,11 +5712,6 @@ ChromeContentBrowserClient::GetUrlLookup
109 GetForProfile(profile); 109 GetForProfile(profile);
110 } 110 }
111 #endif 111 #endif
@@ -117,9 +117,9 @@
117 return nullptr; 117 return nullptr;
118 } 118 }
119 119
120--- chrome/browser/chrome_content_browser_client_receiver_bindings.cc.orig 120--- a/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
121+++ chrome/browser/chrome_content_browser_client_receiver_bindings.cc 121+++ b/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
122@@ -139,45 +139,6 @@ void MaybeCreateSafeBrowsingForRenderer( 122@@ -143,45 +143,6 @@ void MaybeCreateSafeBrowsingForRenderer(
123 const std::vector<std::string>& allowlist_domains)> 123 const std::vector<std::string>& allowlist_domains)>
124 get_checker_delegate, 124 get_checker_delegate,
125 mojo::PendingReceiver<safe_browsing::mojom::SafeBrowsing> receiver) { 125 mojo::PendingReceiver<safe_browsing::mojom::SafeBrowsing> receiver) {
@@ -165,9 +165,9 @@
165 } 165 }
166 166
167 // BadgeManager is not used for Android. 167 // BadgeManager is not used for Android.
168--- chrome/browser/component_updater/client_side_phishing_component_installer.cc.orig 168--- a/chrome/browser/component_updater/chrome_client_side_phishing_component_installer.cc
169+++ chrome/browser/component_updater/client_side_phishing_component_installer.cc 169+++ b/chrome/browser/component_updater/chrome_client_side_phishing_component_installer.cc
170@@ -36,20 +36,6 @@ const char kClientSidePhishingManifestNa 170@@ -30,20 +30,6 @@ namespace {
171 171
172 void LoadFromDisk(const base::FilePath& pb_path, 172 void LoadFromDisk(const base::FilePath& pb_path,
173 const base::FilePath& visual_tflite_model_path) { 173 const base::FilePath& visual_tflite_model_path) {
@@ -187,9 +187,9 @@
187- ->PopulateFromDynamicUpdate(binary_pb, std::move(visual_tflite_model)); 187- ->PopulateFromDynamicUpdate(binary_pb, std::move(visual_tflite_model));
188 } 188 }
189 189
190 base::FilePath GetInstalledProtoPath(const base::FilePath& base) { 190 void PopulateModelFromFiles(const base::FilePath& install_dir) {
191@@ -123,9 +109,6 @@ update_client::InstallerAttributes 191@@ -57,9 +43,6 @@ void PopulateModelFromFiles(const base::
192 ClientSidePhishingComponentInstallerPolicy::GetInstallerAttributes() const { 192 update_client::InstallerAttributes GetInstallerAttributes() {
193 update_client::InstallerAttributes attributes; 193 update_client::InstallerAttributes attributes;
194 194
195- // Pass the tag parameter to the installer as the "tag" attribute; it will 195- // Pass the tag parameter to the installer as the "tag" attribute; it will
@@ -198,9 +198,9 @@
198 return attributes; 198 return attributes;
199 } 199 }
200 200
201--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 201--- a/chrome/browser/download/chrome_download_manager_delegate.cc
202+++ chrome/browser/download/chrome_download_manager_delegate.cc 202+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
203@@ -135,7 +135,6 @@ using content::DownloadManager; 203@@ -130,7 +130,6 @@ using content::DownloadManager;
204 using download::DownloadItem; 204 using download::DownloadItem;
205 using download::DownloadPathReservationTracker; 205 using download::DownloadPathReservationTracker;
206 using download::PathValidationResult; 206 using download::PathValidationResult;
@@ -208,7 +208,7 @@
208 using safe_browsing::DownloadProtectionService; 208 using safe_browsing::DownloadProtectionService;
209 using ConnectionType = net::NetworkChangeNotifier::ConnectionType; 209 using ConnectionType = net::NetworkChangeNotifier::ConnectionType;
210 210
211@@ -1517,8 +1516,6 @@ void ChromeDownloadManagerDelegate::OnDo 211@@ -1527,8 +1526,6 @@ void ChromeDownloadManagerDelegate::OnDo
212 if (item->GetOriginalMimeType() == "application/x-x509-user-cert") 212 if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
213 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); 213 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
214 #endif 214 #endif
@@ -217,7 +217,7 @@
217 } 217 }
218 if (ShouldBlockFile(target_info->danger_type, item)) { 218 if (ShouldBlockFile(target_info->danger_type, item)) {
219 MaybeReportDangerousDownloadBlocked( 219 MaybeReportDangerousDownloadBlocked(
220@@ -1670,7 +1667,6 @@ void ChromeDownloadManagerDelegate::Mayb 220@@ -1680,7 +1677,6 @@ void ChromeDownloadManagerDelegate::Mayb
221 service->MaybeSendDangerousDownloadOpenedReport(download, 221 service->MaybeSendDangerousDownloadOpenedReport(download,
222 show_download_in_folder); 222 show_download_in_folder);
223 } 223 }
@@ -225,7 +225,7 @@
225 if (!download->GetAutoOpened()) { 225 if (!download->GetAutoOpened()) {
226 download::DownloadContent download_content = 226 download::DownloadContent download_content =
227 download::DownloadContentFromMimeType(download->GetMimeType(), false); 227 download::DownloadContentFromMimeType(download->GetMimeType(), false);
228@@ -1678,6 +1674,7 @@ void ChromeDownloadManagerDelegate::Mayb 228@@ -1688,6 +1684,7 @@ void ChromeDownloadManagerDelegate::Mayb
229 download->GetDangerType(), download_content, base::Time::Now(), 229 download->GetDangerType(), download_content, base::Time::Now(),
230 download->GetEndTime(), show_download_in_folder); 230 download->GetEndTime(), show_download_in_folder);
231 } 231 }
@@ -233,7 +233,7 @@
233 } 233 }
234 234
235 void ChromeDownloadManagerDelegate::CheckDownloadAllowed( 235 void ChromeDownloadManagerDelegate::CheckDownloadAllowed(
236@@ -1754,30 +1751,6 @@ void ChromeDownloadManagerDelegate::Chec 236@@ -1764,30 +1761,6 @@ void ChromeDownloadManagerDelegate::Chec
237 std::move(callback).Run(true); 237 std::move(callback).Run(true);
238 return; 238 return;
239 } 239 }
@@ -264,17 +264,17 @@
264 #endif 264 #endif
265 std::move(callback).Run(true); 265 std::move(callback).Run(true);
266 } 266 }
267--- chrome/browser/download/download_stats.cc.orig 267--- a/chrome/browser/download/download_stats.cc
268+++ chrome/browser/download/download_stats.cc 268+++ b/chrome/browser/download/download_stats.cc
269@@ -8,6 +8,7 @@ 269@@ -9,6 +9,7 @@
270 #include "base/metrics/user_metrics.h"
271 #include "base/notreached.h" 270 #include "base/notreached.h"
271 #include "build/build_config.h"
272 #include "components/profile_metrics/browser_profile_type.h" 272 #include "components/profile_metrics/browser_profile_type.h"
273+#include "components/safe_browsing/buildflags.h" 273+#include "components/safe_browsing/buildflags.h"
274 #include "components/safe_browsing/content/browser/download/download_stats.h" 274 #include "components/safe_browsing/content/browser/download/download_stats.h"
275 275
276 void RecordDownloadCount(ChromeDownloadCountTypes type) { 276 void RecordDownloadCount(ChromeDownloadCountTypes type) {
277@@ -27,8 +28,10 @@ void RecordDangerousDownloadWarningShown 277@@ -28,8 +29,10 @@ void RecordDangerousDownloadWarningShown
278 bool has_user_gesture) { 278 bool has_user_gesture) {
279 base::UmaHistogramEnumeration("Download.ShowedDownloadWarning", danger_type, 279 base::UmaHistogramEnumeration("Download.ShowedDownloadWarning", danger_type,
280 download::DOWNLOAD_DANGER_TYPE_MAX); 280 download::DOWNLOAD_DANGER_TYPE_MAX);
@@ -285,23 +285,24 @@
285 } 285 }
286 286
287 void RecordOpenedDangerousConfirmDialog( 287 void RecordOpenedDangerousConfirmDialog(
288--- chrome/browser/download/download_target_determiner.cc.orig 288--- a/chrome/browser/download/download_target_determiner.cc
289+++ chrome/browser/download/download_target_determiner.cc 289+++ b/chrome/browser/download/download_target_determiner.cc
290@@ -872,11 +872,13 @@ void DownloadTargetDeterminer::CheckVisi 290@@ -869,12 +869,14 @@ void DownloadTargetDeterminer::CheckVisi
291 bool visited_referrer_before) { 291 bool visited_referrer_before) {
292 DCHECK_CURRENTLY_ON(BrowserThread::UI); 292 DCHECK_CURRENTLY_ON(BrowserThread::UI);
293 DCHECK_EQ(STATE_DETERMINE_INTERMEDIATE_PATH, next_state_); 293 DCHECK_EQ(STATE_DETERMINE_INTERMEDIATE_PATH, next_state_);
294+#if BUILDFLAG(FULL_SAFE_BROWSING) 294+#if BUILDFLAG(FULL_SAFE_BROWSING)
295 safe_browsing::RecordDownloadFileTypeAttributes( 295 safe_browsing::RecordDownloadFileTypeAttributes(
296 safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel( 296 safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel(
297 virtual_path_.BaseName()), 297 virtual_path_.BaseName(), download_->GetURL(),
298 GetProfile()->GetPrefs()),
298 download_->HasUserGesture(), visited_referrer_before, 299 download_->HasUserGesture(), visited_referrer_before,
299 GetLastDownloadBypassTimestamp()); 300 GetLastDownloadBypassTimestamp());
300+#endif // BUILDFLAG(FULL_SAFE_BROWSING) 301+#endif // BUILDFLAG(FULL_SAFE_BROWSING)
301 danger_level_ = GetDangerLevel( 302 danger_level_ = GetDangerLevel(
302 visited_referrer_before ? VISITED_REFERRER : NO_VISITS_TO_REFERRER); 303 visited_referrer_before ? VISITED_REFERRER : NO_VISITS_TO_REFERRER);
303 if (danger_level_ != DownloadFileType::NOT_DANGEROUS && 304 if (danger_level_ != DownloadFileType::NOT_DANGEROUS &&
304@@ -1111,6 +1113,7 @@ DownloadFileType::DangerLevel DownloadTa 305@@ -1109,6 +1111,7 @@ DownloadFileType::DangerLevel DownloadTa
305 306
306 absl::optional<base::Time> 307 absl::optional<base::Time>
307 DownloadTargetDeterminer::GetLastDownloadBypassTimestamp() const { 308 DownloadTargetDeterminer::GetLastDownloadBypassTimestamp() const {
@@ -309,7 +310,7 @@
309 safe_browsing::SafeBrowsingMetricsCollector* metrics_collector = 310 safe_browsing::SafeBrowsingMetricsCollector* metrics_collector =
310 safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( 311 safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile(
311 GetProfile()); 312 GetProfile());
312@@ -1119,6 +1122,9 @@ DownloadTargetDeterminer::GetLastDownloa 313@@ -1117,6 +1120,9 @@ DownloadTargetDeterminer::GetLastDownloa
313 safe_browsing::SafeBrowsingMetricsCollector:: 314 safe_browsing::SafeBrowsingMetricsCollector::
314 EventType::DANGEROUS_DOWNLOAD_BYPASS) 315 EventType::DANGEROUS_DOWNLOAD_BYPASS)
315 : absl::nullopt; 316 : absl::nullopt;
@@ -319,19 +320,19 @@
319 } 320 }
320 321
321 void DownloadTargetDeterminer::OnDownloadDestroyed( 322 void DownloadTargetDeterminer::OnDownloadDestroyed(
322--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc.orig 323--- a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
323+++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc 324+++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
324@@ -32,7 +32,6 @@ 325@@ -33,7 +33,6 @@
325 #include "chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h" 326 #include "chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h"
326 #include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h" 327 #include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h"
327 #include "chrome/browser/safe_browsing/cloud_content_scanning/file_analysis_request.h" 328 #include "chrome/browser/safe_browsing/cloud_content_scanning/file_analysis_request.h"
328-#include "chrome/browser/safe_browsing/download_protection/check_client_download_request.h" 329-#include "chrome/browser/safe_browsing/download_protection/check_client_download_request.h"
329 #include "chrome/grit/generated_resources.h" 330 #include "chrome/grit/generated_resources.h"
330 #include "components/enterprise/common/proto/connectors.pb.h" 331 #include "components/enterprise/common/proto/connectors.pb.h"
331 #include "components/policy/core/browser/url_util.h" 332 #include "components/policy/core/common/chrome_schema.h"
332--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 333--- a/chrome/browser/enterprise/connectors/connectors_service.cc
333+++ chrome/browser/enterprise/connectors/connectors_service.cc 334+++ b/chrome/browser/enterprise/connectors/connectors_service.cc
334@@ -475,19 +475,6 @@ absl::optional<std::string> ConnectorsSe 335@@ -460,19 +460,6 @@ absl::optional<std::string> ConnectorsSe
335 return absl::nullopt; 336 return absl::nullopt;
336 } 337 }
337 338
@@ -351,9 +352,9 @@
351 ConnectorsManager* ConnectorsService::ConnectorsManagerForTesting() { 352 ConnectorsManager* ConnectorsService::ConnectorsManagerForTesting() {
352 return connectors_manager_.get(); 353 return connectors_manager_.get();
353 } 354 }
354--- chrome/browser/enterprise/connectors/connectors_service.h.orig 355--- a/chrome/browser/enterprise/connectors/connectors_service.h
355+++ chrome/browser/enterprise/connectors/connectors_service.h 356+++ b/chrome/browser/enterprise/connectors/connectors_service.h
356@@ -78,12 +78,6 @@ class ConnectorsService : public KeyedSe 357@@ -80,12 +80,6 @@ class ConnectorsService : public KeyedSe
357 // is no token to use. 358 // is no token to use.
358 absl::optional<std::string> GetDMTokenForRealTimeUrlCheck() const; 359 absl::optional<std::string> GetDMTokenForRealTimeUrlCheck() const;
359 360
@@ -366,18 +367,18 @@
366 // Returns the CBCM domain or profile domain that enables connector policies. 367 // Returns the CBCM domain or profile domain that enables connector policies.
367 // If both set Connector policies, the CBCM domain is returned as it has 368 // If both set Connector policies, the CBCM domain is returned as it has
368 // precedence. 369 // precedence.
369--- chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc.orig 370--- a/chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc
370+++ chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc 371+++ b/chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc
371@@ -38,9 +38,6 @@ void CommonSignalsDecorator::Decorate(Si 372@@ -41,9 +41,6 @@ void CommonSignalsDecorator::Decorate(Si
372 // Get signals from policy values. 373 // Get signals from policy values.
373 signals.set_built_in_dns_client_enabled( 374 signals.set_built_in_dns_client_enabled(
374 enterprise_signals::utils::GetBuiltInDnsClientEnabled(local_state_)); 375 enterprise_signals::utils::GetBuiltInDnsClientEnabled(local_state_));
375- signals.set_safe_browsing_protection_level(static_cast<int32_t>( 376- signals.set_safe_browsing_protection_level(static_cast<int32_t>(
376- enterprise_signals::utils::GetSafeBrowsingProtectionLevel( 377- enterprise_signals::utils::GetSafeBrowsingProtectionLevel(
377- profile_prefs_))); 378- profile_prefs_)));
378 signals.set_remote_desktop_available( 379
379 enterprise_signals::utils::GetChromeRemoteDesktopAppBlocked( 380 absl::optional<bool> third_party_blocking_enabled =
380 policy_blocklist_service_)); 381 enterprise_signals::utils::GetThirdPartyBlockingEnabled(local_state_);
381@@ -58,15 +55,6 @@ void CommonSignalsDecorator::Decorate(Si 382@@ -58,15 +55,6 @@ void CommonSignalsDecorator::Decorate(Si
382 signals.set_chrome_cleanup_enabled(chrome_cleanup_enabled.value()); 383 signals.set_chrome_cleanup_enabled(chrome_cleanup_enabled.value());
383 } 384 }
@@ -391,12 +392,12 @@
391- static_cast<int32_t>(password_protection_warning_trigger.value())); 392- static_cast<int32_t>(password_protection_warning_trigger.value()));
392- } 393- }
393- 394-
394 std::move(done_closure).Run(); 395 if (cached_device_model_ && cached_device_manufacturer_) {
395 } 396 UpdateFromCache(signals);
396 397 LogSignalsCollectionLatency(kLatencyHistogramWithCacheVariant, start_time);
397--- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig 398--- a/chrome/browser/enterprise/signals/context_info_fetcher.cc
398+++ chrome/browser/enterprise/signals/context_info_fetcher.cc 399+++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc
399@@ -169,7 +169,6 @@ void ContextInfoFetcher::Fetch(ContextIn 400@@ -204,7 +204,6 @@ void ContextInfoFetcher::Fetch(ContextIn
400 GetAnalysisConnectorProviders(enterprise_connectors::FILE_DOWNLOADED); 401 GetAnalysisConnectorProviders(enterprise_connectors::FILE_DOWNLOADED);
401 info.on_bulk_data_entry_providers = 402 info.on_bulk_data_entry_providers =
402 GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY); 403 GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY);
@@ -404,7 +405,7 @@
404 info.on_security_event_providers = GetOnSecurityEventProviders(); 405 info.on_security_event_providers = GetOnSecurityEventProviders();
405 info.browser_version = version_info::GetVersionNumber(); 406 info.browser_version = version_info::GetVersionNumber();
406 info.site_isolation_enabled = 407 info.site_isolation_enabled =
407@@ -227,11 +226,6 @@ std::vector<std::string> ContextInfoFetc 408@@ -262,11 +261,6 @@ std::vector<std::string> ContextInfoFetc
408 return connectors_service_->GetAnalysisServiceProviderNames(connector); 409 return connectors_service_->GetAnalysisServiceProviderNames(connector);
409 } 410 }
410 411
@@ -416,8 +417,8 @@
416 std::vector<std::string> ContextInfoFetcher::GetOnSecurityEventProviders() { 417 std::vector<std::string> ContextInfoFetcher::GetOnSecurityEventProviders() {
417 return connectors_service_->GetReportingServiceProviderNames( 418 return connectors_service_->GetReportingServiceProviderNames(
418 enterprise_connectors::ReportingConnector::SECURITY_EVENT); 419 enterprise_connectors::ReportingConnector::SECURITY_EVENT);
419--- chrome/browser/enterprise/signals/context_info_fetcher.h.orig 420--- a/chrome/browser/enterprise/signals/context_info_fetcher.h
420+++ chrome/browser/enterprise/signals/context_info_fetcher.h 421+++ b/chrome/browser/enterprise/signals/context_info_fetcher.h
421@@ -6,6 +6,7 @@ 422@@ -6,6 +6,7 @@
422 #define CHROME_BROWSER_ENTERPRISE_SIGNALS_CONTEXT_INFO_FETCHER_H_ 423 #define CHROME_BROWSER_ENTERPRISE_SIGNALS_CONTEXT_INFO_FETCHER_H_
423 424
@@ -426,7 +427,7 @@
426 #include <vector> 427 #include <vector>
427 428
428 #include "base/callback_forward.h" 429 #include "base/callback_forward.h"
429@@ -37,7 +38,6 @@ struct ContextInfo { 430@@ -38,7 +39,6 @@ struct ContextInfo {
430 std::vector<std::string> on_file_downloaded_providers; 431 std::vector<std::string> on_file_downloaded_providers;
431 std::vector<std::string> on_bulk_data_entry_providers; 432 std::vector<std::string> on_bulk_data_entry_providers;
432 std::vector<std::string> on_security_event_providers; 433 std::vector<std::string> on_security_event_providers;
@@ -434,7 +435,7 @@
434 std::string browser_version; 435 std::string browser_version;
435 safe_browsing::SafeBrowsingState safe_browsing_protection_level; 436 safe_browsing::SafeBrowsingState safe_browsing_protection_level;
436 bool site_isolation_enabled; 437 bool site_isolation_enabled;
437@@ -88,7 +88,6 @@ class ContextInfoFetcher { 438@@ -89,7 +89,6 @@ class ContextInfoFetcher {
438 std::vector<std::string> GetAnalysisConnectorProviders( 439 std::vector<std::string> GetAnalysisConnectorProviders(
439 enterprise_connectors::AnalysisConnector connector); 440 enterprise_connectors::AnalysisConnector connector);
440 441
@@ -442,8 +443,8 @@
442 443
443 std::vector<std::string> GetOnSecurityEventProviders(); 444 std::vector<std::string> GetOnSecurityEventProviders();
444 445
445--- chrome/browser/enterprise/signals/signals_utils.cc.orig 446--- a/chrome/browser/enterprise/signals/signals_utils.cc
446+++ chrome/browser/enterprise/signals/signals_utils.cc 447+++ b/chrome/browser/enterprise/signals/signals_utils.cc
447@@ -33,24 +33,6 @@ bool IsURLBlocked(const GURL& url, Polic 448@@ -33,24 +33,6 @@ bool IsURLBlocked(const GURL& url, Polic
448 449
449 } // namespace 450 } // namespace
@@ -468,7 +469,7 @@
468- 469-
469 absl::optional<bool> GetThirdPartyBlockingEnabled(PrefService* local_state) { 470 absl::optional<bool> GetThirdPartyBlockingEnabled(PrefService* local_state) {
470 DCHECK(local_state); 471 DCHECK(local_state);
471 #if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) 472 #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
472@@ -65,15 +47,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ 473@@ -65,15 +47,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ
473 return local_state->GetBoolean(prefs::kBuiltInDnsClientEnabled); 474 return local_state->GetBoolean(prefs::kBuiltInDnsClientEnabled);
474 } 475 }
@@ -484,9 +485,9 @@
484- 485-
485 absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state) { 486 absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state) {
486 DCHECK(local_state); 487 DCHECK(local_state);
487 #if defined(OS_WIN) 488 #if BUILDFLAG(IS_WIN)
488--- chrome/browser/enterprise/signals/signals_utils.h.orig 489--- a/chrome/browser/enterprise/signals/signals_utils.h
489+++ chrome/browser/enterprise/signals/signals_utils.h 490+++ b/chrome/browser/enterprise/signals/signals_utils.h
490@@ -21,12 +21,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ 491@@ -21,12 +21,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ
491 492
492 absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state); 493 absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state);
@@ -500,9 +501,9 @@
500 bool GetChromeRemoteDesktopAppBlocked(PolicyBlocklistService* service); 501 bool GetChromeRemoteDesktopAppBlocked(PolicyBlocklistService* service);
501 502
502 } // namespace utils 503 } // namespace utils
503--- chrome/browser/extensions/BUILD.gn.orig 504--- a/chrome/browser/extensions/BUILD.gn
504+++ chrome/browser/extensions/BUILD.gn 505+++ b/chrome/browser/extensions/BUILD.gn
505@@ -650,8 +650,6 @@ static_library("extensions") { 506@@ -636,8 +636,6 @@ static_library("extensions") {
506 "menu_manager_factory.h", 507 "menu_manager_factory.h",
507 "navigation_observer.cc", 508 "navigation_observer.cc",
508 "navigation_observer.h", 509 "navigation_observer.h",
@@ -511,8 +512,8 @@
511 "pack_extension_job.cc", 512 "pack_extension_job.cc",
512 "pack_extension_job.h", 513 "pack_extension_job.h",
513 "pending_extension_info.cc", 514 "pending_extension_info.cc",
514--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 515--- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
515+++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc 516+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
516@@ -72,17 +72,8 @@ api::enterprise_reporting_private::Conte 517@@ -72,17 +72,8 @@ api::enterprise_reporting_private::Conte
517 : nullptr; 518 : nullptr;
518 info.os_firewall = ToInfoSettingValue(signals.os_firewall); 519 info.os_firewall = ToInfoSettingValue(signals.os_firewall);
@@ -531,9 +532,9 @@
531 info.browser_version = std::move(signals.browser_version); 532 info.browser_version = std::move(signals.browser_version);
532 info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled; 533 info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled;
533 534
534--- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc.orig 535--- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc
535+++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc 536+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc
536@@ -326,6 +326,7 @@ void SafeBrowsingPrivateEventRouter::OnD 537@@ -328,6 +328,7 @@ void SafeBrowsingPrivateEventRouter::OnP
537 event_router_->BroadcastEvent(std::move(extension_event)); 538 event_router_->BroadcastEvent(std::move(extension_event));
538 } 539 }
539 540
@@ -541,7 +542,7 @@
541 absl::optional<enterprise_connectors::ReportingSettings> settings = 542 absl::optional<enterprise_connectors::ReportingSettings> settings =
542 GetReportingSettings(); 543 GetReportingSettings();
543 if (!settings.has_value() || 544 if (!settings.has_value() ||
544@@ -356,6 +357,7 @@ void SafeBrowsingPrivateEventRouter::OnD 545@@ -399,6 +400,7 @@ void SafeBrowsingPrivateEventRouter::OnD
545 546
546 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), 547 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
547 std::move(event)); 548 std::move(event));
@@ -549,7 +550,7 @@
549 } 550 }
550 551
551 void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown( 552 void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown(
552@@ -383,6 +385,7 @@ void SafeBrowsingPrivateEventRouter::OnS 553@@ -426,6 +428,7 @@ void SafeBrowsingPrivateEventRouter::OnS
553 event_router_->BroadcastEvent(std::move(extension_event)); 554 event_router_->BroadcastEvent(std::move(extension_event));
554 } 555 }
555 556
@@ -557,7 +558,7 @@
557 absl::optional<enterprise_connectors::ReportingSettings> settings = 558 absl::optional<enterprise_connectors::ReportingSettings> settings =
558 GetReportingSettings(); 559 GetReportingSettings();
559 if (!settings.has_value() || 560 if (!settings.has_value() ||
560@@ -406,6 +409,7 @@ void SafeBrowsingPrivateEventRouter::OnS 561@@ -448,6 +451,7 @@ void SafeBrowsingPrivateEventRouter::OnS
561 562
562 ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()), 563 ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()),
563 std::move(event)); 564 std::move(event));
@@ -565,7 +566,7 @@
565 } 566 }
566 567
567 void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialProceeded( 568 void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialProceeded(
568@@ -433,6 +437,7 @@ void SafeBrowsingPrivateEventRouter::OnS 569@@ -475,6 +479,7 @@ void SafeBrowsingPrivateEventRouter::OnS
569 event_router_->BroadcastEvent(std::move(extension_event)); 570 event_router_->BroadcastEvent(std::move(extension_event));
570 } 571 }
571 572
@@ -573,7 +574,7 @@
573 absl::optional<enterprise_connectors::ReportingSettings> settings = 574 absl::optional<enterprise_connectors::ReportingSettings> settings =
574 GetReportingSettings(); 575 GetReportingSettings();
575 if (!settings.has_value() || 576 if (!settings.has_value() ||
576@@ -452,6 +457,7 @@ void SafeBrowsingPrivateEventRouter::OnS 577@@ -493,6 +498,7 @@ void SafeBrowsingPrivateEventRouter::OnS
577 578
578 ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()), 579 ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()),
579 std::move(event)); 580 std::move(event));
@@ -581,7 +582,7 @@
581 } 582 }
582 583
583 void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorResult( 584 void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorResult(
584@@ -465,6 +471,7 @@ void SafeBrowsingPrivateEventRouter::OnA 585@@ -506,6 +512,7 @@ void SafeBrowsingPrivateEventRouter::OnA
585 const enterprise_connectors::ContentAnalysisResponse::Result& result, 586 const enterprise_connectors::ContentAnalysisResponse::Result& result,
586 const int64_t content_size, 587 const int64_t content_size,
587 safe_browsing::EventResult event_result) { 588 safe_browsing::EventResult event_result) {
@@ -589,7 +590,7 @@
589 if (result.tag() == "malware") { 590 if (result.tag() == "malware") {
590 DCHECK_EQ(1, result.triggered_rules().size()); 591 DCHECK_EQ(1, result.triggered_rules().size());
591 OnDangerousDeepScanningResult( 592 OnDangerousDeepScanningResult(
592@@ -476,6 +483,7 @@ void SafeBrowsingPrivateEventRouter::OnA 593@@ -517,6 +524,7 @@ void SafeBrowsingPrivateEventRouter::OnA
593 OnSensitiveDataEvent(url, file_name, download_digest_sha256, mime_type, 594 OnSensitiveDataEvent(url, file_name, download_digest_sha256, mime_type,
594 trigger, scan_id, result, content_size, event_result); 595 trigger, scan_id, result, content_size, event_result);
595 } 596 }
@@ -597,7 +598,7 @@
597 } 598 }
598 599
599 void SafeBrowsingPrivateEventRouter::OnDangerousDeepScanningResult( 600 void SafeBrowsingPrivateEventRouter::OnDangerousDeepScanningResult(
600@@ -491,6 +499,7 @@ void SafeBrowsingPrivateEventRouter::OnD 601@@ -532,6 +540,7 @@ void SafeBrowsingPrivateEventRouter::OnD
601 const std::string& malware_category, 602 const std::string& malware_category,
602 const std::string& evidence_locker_filepath, 603 const std::string& evidence_locker_filepath,
603 const std::string& scan_id) { 604 const std::string& scan_id) {
@@ -605,7 +606,7 @@
605 absl::optional<enterprise_connectors::ReportingSettings> settings = 606 absl::optional<enterprise_connectors::ReportingSettings> settings =
606 GetReportingSettings(); 607 GetReportingSettings();
607 if (!settings.has_value() || 608 if (!settings.has_value() ||
608@@ -528,6 +537,7 @@ void SafeBrowsingPrivateEventRouter::OnD 609@@ -572,6 +581,7 @@ void SafeBrowsingPrivateEventRouter::OnD
609 610
610 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), 611 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
611 std::move(event)); 612 std::move(event));
@@ -613,7 +614,7 @@
613 } 614 }
614 615
615 void SafeBrowsingPrivateEventRouter::OnSensitiveDataEvent( 616 void SafeBrowsingPrivateEventRouter::OnSensitiveDataEvent(
616@@ -540,6 +550,7 @@ void SafeBrowsingPrivateEventRouter::OnS 617@@ -584,6 +594,7 @@ void SafeBrowsingPrivateEventRouter::OnS
617 const enterprise_connectors::ContentAnalysisResponse::Result& result, 618 const enterprise_connectors::ContentAnalysisResponse::Result& result,
618 const int64_t content_size, 619 const int64_t content_size,
619 safe_browsing::EventResult event_result) { 620 safe_browsing::EventResult event_result) {
@@ -621,7 +622,7 @@
621 absl::optional<enterprise_connectors::ReportingSettings> settings = 622 absl::optional<enterprise_connectors::ReportingSettings> settings =
622 GetReportingSettings(); 623 GetReportingSettings();
623 if (!settings.has_value() || 624 if (!settings.has_value() ||
624@@ -572,6 +583,7 @@ void SafeBrowsingPrivateEventRouter::OnS 625@@ -615,6 +626,7 @@ void SafeBrowsingPrivateEventRouter::OnS
625 626
626 ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()), 627 ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()),
627 std::move(event)); 628 std::move(event));
@@ -629,15 +630,15 @@
629 } 630 }
630 631
631 void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorWarningBypassed( 632 void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorWarningBypassed(
632@@ -584,6 +596,7 @@ void SafeBrowsingPrivateEventRouter::OnA 633@@ -628,6 +640,7 @@ void SafeBrowsingPrivateEventRouter::OnA
633 safe_browsing::DeepScanAccessPoint access_point,
634 const enterprise_connectors::ContentAnalysisResponse::Result& result, 634 const enterprise_connectors::ContentAnalysisResponse::Result& result,
635 const int64_t content_size) { 635 const int64_t content_size,
636 absl::optional<std::u16string> user_justification) {
636+#if defined(FULL_SAFE_BROWSING) 637+#if defined(FULL_SAFE_BROWSING)
637 absl::optional<enterprise_connectors::ReportingSettings> settings = 638 absl::optional<enterprise_connectors::ReportingSettings> settings =
638 GetReportingSettings(); 639 GetReportingSettings();
639 if (!settings.has_value() || 640 if (!settings.has_value() ||
640@@ -616,6 +629,7 @@ void SafeBrowsingPrivateEventRouter::OnA 641@@ -662,6 +675,7 @@ void SafeBrowsingPrivateEventRouter::OnA
641 642
642 ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()), 643 ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()),
643 std::move(event)); 644 std::move(event));
@@ -645,7 +646,7 @@
645 } 646 }
646 647
647 void SafeBrowsingPrivateEventRouter::OnUnscannedFileEvent( 648 void SafeBrowsingPrivateEventRouter::OnUnscannedFileEvent(
648@@ -628,6 +642,7 @@ void SafeBrowsingPrivateEventRouter::OnU 649@@ -674,6 +688,7 @@ void SafeBrowsingPrivateEventRouter::OnU
649 const std::string& reason, 650 const std::string& reason,
650 const int64_t content_size, 651 const int64_t content_size,
651 safe_browsing::EventResult event_result) { 652 safe_browsing::EventResult event_result) {
@@ -653,7 +654,7 @@
653 absl::optional<enterprise_connectors::ReportingSettings> settings = 654 absl::optional<enterprise_connectors::ReportingSettings> settings =
654 GetReportingSettings(); 655 GetReportingSettings();
655 if (!settings.has_value() || 656 if (!settings.has_value() ||
656@@ -654,6 +669,7 @@ void SafeBrowsingPrivateEventRouter::OnU 657@@ -700,6 +715,7 @@ void SafeBrowsingPrivateEventRouter::OnU
657 658
658 ReportRealtimeEvent(kKeyUnscannedFileEvent, std::move(settings.value()), 659 ReportRealtimeEvent(kKeyUnscannedFileEvent, std::move(settings.value()),
659 std::move(event)); 660 std::move(event));
@@ -661,7 +662,7 @@
661 } 662 }
662 663
663 void SafeBrowsingPrivateEventRouter::OnDangerousDownloadEvent( 664 void SafeBrowsingPrivateEventRouter::OnDangerousDownloadEvent(
664@@ -679,6 +695,7 @@ void SafeBrowsingPrivateEventRouter::OnD 665@@ -725,6 +741,7 @@ void SafeBrowsingPrivateEventRouter::OnD
665 const std::string& scan_id, 666 const std::string& scan_id,
666 const int64_t content_size, 667 const int64_t content_size,
667 safe_browsing::EventResult event_result) { 668 safe_browsing::EventResult event_result) {
@@ -669,7 +670,7 @@
669 absl::optional<enterprise_connectors::ReportingSettings> settings = 670 absl::optional<enterprise_connectors::ReportingSettings> settings =
670 GetReportingSettings(); 671 GetReportingSettings();
671 if (!settings.has_value() || 672 if (!settings.has_value() ||
672@@ -709,6 +726,7 @@ void SafeBrowsingPrivateEventRouter::OnD 673@@ -756,6 +773,7 @@ void SafeBrowsingPrivateEventRouter::OnD
673 674
674 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), 675 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
675 std::move(event)); 676 std::move(event));
@@ -677,7 +678,7 @@
677 } 678 }
678 679
679 void SafeBrowsingPrivateEventRouter::OnDangerousDownloadWarningBypassed( 680 void SafeBrowsingPrivateEventRouter::OnDangerousDownloadWarningBypassed(
680@@ -732,6 +750,7 @@ void SafeBrowsingPrivateEventRouter::OnD 681@@ -779,6 +797,7 @@ void SafeBrowsingPrivateEventRouter::OnD
681 const std::string& mime_type, 682 const std::string& mime_type,
682 const std::string& scan_id, 683 const std::string& scan_id,
683 const int64_t content_size) { 684 const int64_t content_size) {
@@ -685,7 +686,7 @@
685 absl::optional<enterprise_connectors::ReportingSettings> settings = 686 absl::optional<enterprise_connectors::ReportingSettings> settings =
686 GetReportingSettings(); 687 GetReportingSettings();
687 if (!settings.has_value() || 688 if (!settings.has_value() ||
688@@ -762,6 +781,7 @@ void SafeBrowsingPrivateEventRouter::OnD 689@@ -810,6 +829,7 @@ void SafeBrowsingPrivateEventRouter::OnD
689 690
690 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), 691 ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
691 std::move(event)); 692 std::move(event));
@@ -693,7 +694,7 @@
693 } 694 }
694 695
695 void SafeBrowsingPrivateEventRouter::OnLoginEvent( 696 void SafeBrowsingPrivateEventRouter::OnLoginEvent(
696@@ -1087,7 +1107,11 @@ void SafeBrowsingPrivateEventRouter::Rep 697@@ -1155,7 +1175,11 @@ void SafeBrowsingPrivateEventRouter::Rep
697 } 698 }
698 699
699 std::string SafeBrowsingPrivateEventRouter::GetProfileUserName() const { 700 std::string SafeBrowsingPrivateEventRouter::GetProfileUserName() const {
@@ -705,9 +706,27 @@
705 } 706 }
706 707
707 #if BUILDFLAG(IS_CHROMEOS_ASH) 708 #if BUILDFLAG(IS_CHROMEOS_ASH)
708--- chrome/browser/extensions/extension_service.cc.orig 709--- a/chrome/browser/extensions/chrome_extensions_browser_client.cc
709+++ chrome/browser/extensions/extension_service.cc 710+++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc
710@@ -52,7 +52,6 @@ 711@@ -608,15 +608,6 @@ void ChromeExtensionsBrowserClient::Noti
712 content::BrowserContext* context,
713 const ExtensionId& extension_id,
714 const std::string& code) const {
715- auto* telemetry_service =
716- safe_browsing::ExtensionTelemetryServiceFactory::GetForProfile(
717- Profile::FromBrowserContext(context));
718- if (!telemetry_service || !telemetry_service->enabled())
719- return;
720-
721- auto signal = std::make_unique<safe_browsing::TabsExecuteScriptSignal>(
722- extension_id, code);
723- telemetry_service->AddSignal(std::move(signal));
724 }
725
726 // static
727--- a/chrome/browser/extensions/extension_service.cc
728+++ b/chrome/browser/extensions/extension_service.cc
729@@ -51,7 +51,6 @@
711 #include "chrome/browser/extensions/forced_extensions/install_stage_tracker.h" 730 #include "chrome/browser/extensions/forced_extensions/install_stage_tracker.h"
712 #include "chrome/browser/extensions/install_verifier.h" 731 #include "chrome/browser/extensions/install_verifier.h"
713 #include "chrome/browser/extensions/installed_loader.h" 732 #include "chrome/browser/extensions/installed_loader.h"
@@ -715,7 +734,15 @@
715 #include "chrome/browser/extensions/pending_extension_manager.h" 734 #include "chrome/browser/extensions/pending_extension_manager.h"
716 #include "chrome/browser/extensions/permissions_updater.h" 735 #include "chrome/browser/extensions/permissions_updater.h"
717 #include "chrome/browser/extensions/shared_module_service.h" 736 #include "chrome/browser/extensions/shared_module_service.h"
718@@ -370,7 +369,6 @@ ExtensionService::ExtensionService(Profi 737@@ -205,7 +204,6 @@ void ExtensionService::BlocklistExtensio
738 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState(
739 extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE,
740 extension_prefs_);
741- OnBlocklistStateAdded(extension_id);
742 }
743
744 bool ExtensionService::OnExternalExtensionUpdateUrlFound(
745@@ -368,7 +366,6 @@ ExtensionService::ExtensionService(Profi
719 safe_browsing_verdict_handler_(extension_prefs, 746 safe_browsing_verdict_handler_(extension_prefs,
720 ExtensionRegistry::Get(profile), 747 ExtensionRegistry::Get(profile),
721 this), 748 this),
@@ -723,7 +750,7 @@
723 registry_(ExtensionRegistry::Get(profile)), 750 registry_(ExtensionRegistry::Get(profile)),
724 pending_extension_manager_(profile), 751 pending_extension_manager_(profile),
725 install_directory_(install_directory), 752 install_directory_(install_directory),
726@@ -852,47 +850,6 @@ bool ExtensionService::IsExtensionEnable 753@@ -868,100 +865,6 @@ bool ExtensionService::IsExtensionEnable
727 return extension_registrar_.IsExtensionEnabled(extension_id); 754 return extension_registrar_.IsExtensionEnabled(extension_id);
728 } 755 }
729 756
@@ -731,56 +758,14 @@
731- const std::string& extension_id, 758- const std::string& extension_id,
732- const base::Value& attributes) { 759- const base::Value& attributes) {
733- DCHECK_CURRENTLY_ON(BrowserThread::UI); 760- DCHECK_CURRENTLY_ON(BrowserThread::UI);
734- HandleMalwareOmahaAttribute(extension_id, attributes);
735- omaha_attributes_handler_.PerformActionBasedOnOmahaAttributes(extension_id, 761- omaha_attributes_handler_.PerformActionBasedOnOmahaAttributes(extension_id,
736- attributes); 762- attributes);
737- allowlist_.PerformActionBasedOnOmahaAttributes(extension_id, attributes); 763- allowlist_.PerformActionBasedOnOmahaAttributes(extension_id, attributes);
738-}
739-
740-void ExtensionService::HandleMalwareOmahaAttribute(
741- const std::string& extension_id,
742- const base::Value& attributes) {
743- bool has_malware_value =
744- OmahaAttributesHandler::HasOmahaBlocklistStateInAttributes(
745- attributes, BitMapBlocklistState::BLOCKLISTED_MALWARE);
746- if (!has_malware_value) {
747- OmahaAttributesHandler::ReportNoUpdateCheckKeys();
748- // Omaha attributes may have previously have the "_malware" key.
749- MaybeEnableRemotelyDisabledExtension(extension_id);
750- return;
751- }
752-
753- if (extension_prefs_->HasDisableReason(
754- extension_id, disable_reason::DISABLE_REMOTELY_FOR_MALWARE)) {
755- // The extension is already disabled. No work needs to be done.
756- return;
757- }
758-
759- OmahaAttributesHandler::ReportExtensionDisabledRemotely(
760- extension_registrar_.IsExtensionEnabled(extension_id),
761- ExtensionUpdateCheckDataKey::kMalware);
762-
763- // Add the extension to the blocklisted extensions set.
764- UpdateBlocklistedExtensions({extension_id},
765- registry_->blocklisted_extensions().GetIDs());
766- extension_prefs_->AddDisableReason(
767- extension_id, disable_reason::DISABLE_REMOTELY_FOR_MALWARE);
768- // Show an error for the newly blocklisted extension. 764- // Show an error for the newly blocklisted extension.
769- error_controller_->ShowErrorIfNeeded(); 765- error_controller_->ShowErrorIfNeeded();
770-} 766-}
771
772 void ExtensionService::MaybeEnableRemotelyDisabledExtension(
773 const std::string& extension_id) {
774@@ -909,56 +866,6 @@ void ExtensionService::MaybeEnableRemote
775 unchanged.erase(extension_id);
776 // Remove the extension from the blocklist.
777 UpdateBlocklistedExtensions({}, unchanged);
778- OmahaAttributesHandler::ReportReenableExtension(
779- ExtensionUpdateCheckDataKey::kMalware);
780-}
781- 767-
782-void ExtensionService::ClearGreylistedAcknowledgedStateAndMaybeReenable( 768-void ExtensionService::OnGreylistStateRemoved(const std::string& extension_id) {
783- const std::string& extension_id) {
784- bool is_on_sb_list = (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState( 769- bool is_on_sb_list = (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState(
785- extension_id, extension_prefs_) != 770- extension_id, extension_prefs_) !=
786- BitMapBlocklistState::NOT_BLOCKLISTED); 771- BitMapBlocklistState::NOT_BLOCKLISTED);
@@ -797,9 +782,8 @@
797- disable_reason::DISABLE_GREYLIST); 782- disable_reason::DISABLE_GREYLIST);
798-} 783-}
799- 784-
800-void ExtensionService::MaybeDisableGreylistedExtension( 785-void ExtensionService::OnGreylistStateAdded(const std::string& extension_id,
801- const std::string& extension_id, 786- BitMapBlocklistState new_state) {
802- BitMapBlocklistState new_state) {
803-#if DCHECK_IS_ON() 787-#if DCHECK_IS_ON()
804- bool has_new_state_on_sb_list = 788- bool has_new_state_on_sb_list =
805- (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState( 789- (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState(
@@ -825,12 +809,51 @@
825- blocklist_prefs::UpdateCurrentGreylistStatesAsAcknowledged(extension_id, 809- blocklist_prefs::UpdateCurrentGreylistStatesAsAcknowledged(extension_id,
826- extension_prefs_); 810- extension_prefs_);
827- DisableExtension(extension_id, disable_reason::DISABLE_GREYLIST); 811- DisableExtension(extension_id, disable_reason::DISABLE_GREYLIST);
828 } 812-}
829 813-
814-void ExtensionService::OnBlocklistStateRemoved(
815- const std::string& extension_id) {
816- if (blocklist_prefs::IsExtensionBlocklisted(extension_id, extension_prefs_)) {
817- return;
818- }
819-
820- // Clear acknowledged state.
821- blocklist_prefs::RemoveAcknowledgedBlocklistState(
822- extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE,
823- extension_prefs_);
824-
825- scoped_refptr<const Extension> extension =
826- registry_->blocklisted_extensions().GetByID(extension_id);
827- DCHECK(extension);
828- registry_->RemoveBlocklisted(extension_id);
829- AddExtension(extension.get());
830-}
831-
832-void ExtensionService::OnBlocklistStateAdded(const std::string& extension_id) {
833- DCHECK(
834- blocklist_prefs::IsExtensionBlocklisted(extension_id, extension_prefs_));
835- // The extension was already acknowledged by the user, it should already be in
836- // the unloaded state.
837- if (blocklist_prefs::HasAcknowledgedBlocklistState(
838- extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE,
839- extension_prefs_)) {
840- DCHECK(base::Contains(registry_->blocklisted_extensions().GetIDs(),
841- extension_id));
842- return;
843- }
844-
845- scoped_refptr<const Extension> extension =
846- registry_->GetInstalledExtension(extension_id);
847- registry_->AddBlocklisted(extension);
848- UnloadExtension(extension_id, UnloadedExtensionReason::BLOCKLIST);
849-}
850-
830 void ExtensionService::RemoveDisableReasonAndMaybeEnable( 851 void ExtensionService::RemoveDisableReasonAndMaybeEnable(
831--- chrome/browser/extensions/extension_service.h.orig 852 const std::string& extension_id,
832+++ chrome/browser/extensions/extension_service.h 853 disable_reason::DisableReason reason_to_remove) {
833@@ -25,7 +25,6 @@ 854--- a/chrome/browser/extensions/extension_service.h
855+++ b/chrome/browser/extensions/extension_service.h
856@@ -26,7 +26,6 @@
834 #include "chrome/browser/extensions/forced_extensions/force_installed_metrics.h" 857 #include "chrome/browser/extensions/forced_extensions/force_installed_metrics.h"
835 #include "chrome/browser/extensions/forced_extensions/force_installed_tracker.h" 858 #include "chrome/browser/extensions/forced_extensions/force_installed_tracker.h"
836 #include "chrome/browser/extensions/install_gate.h" 859 #include "chrome/browser/extensions/install_gate.h"
@@ -838,7 +861,7 @@
838 #include "chrome/browser/extensions/pending_extension_manager.h" 861 #include "chrome/browser/extensions/pending_extension_manager.h"
839 #include "chrome/browser/extensions/safe_browsing_verdict_handler.h" 862 #include "chrome/browser/extensions/safe_browsing_verdict_handler.h"
840 #include "chrome/browser/profiles/profile_manager.h" 863 #include "chrome/browser/profiles/profile_manager.h"
841@@ -269,28 +268,11 @@ class ExtensionService : public Extensio 864@@ -276,40 +275,11 @@ class ExtensionService : public Extensio
842 // nothing. 865 // nothing.
843 void EnableExtension(const std::string& extension_id); 866 void EnableExtension(const std::string& extension_id);
844 867
@@ -846,14 +869,26 @@
846- // whether to remove greylist disabled reason. Called when a greylisted 869- // whether to remove greylist disabled reason. Called when a greylisted
847- // state is removed from the Safe Browsing blocklist or Omaha blocklist. Also 870- // state is removed from the Safe Browsing blocklist or Omaha blocklist. Also
848- // clears all acknowledged states if the greylist disabled reason is removed. 871- // clears all acknowledged states if the greylist disabled reason is removed.
849- void ClearGreylistedAcknowledgedStateAndMaybeReenable( 872- void OnGreylistStateRemoved(const std::string& extension_id);
850- const std::string& extension_id);
851- 873-
852- // Takes acknowledged blocklist states into account and decides whether to 874- // Takes acknowledged blocklist states into account and decides whether to
853- // disable the greylisted extension. Called when a new greylisted state is 875- // disable the greylisted extension. Called when a new greylisted state is
854- // added to the Safe Browsing blocklist or Omaha blocklist. 876- // added to the Safe Browsing blocklist or Omaha blocklist.
855- void MaybeDisableGreylistedExtension(const std::string& extension_id, 877- void OnGreylistStateAdded(const std::string& extension_id,
856- BitMapBlocklistState new_state); 878- BitMapBlocklistState new_state);
879-
880- // Takes Safe Browsing and Omaha malware blocklist states into account and
881- // decides whether to remove the extension from the blocklist and reload it.
882- // Called when a blocklisted extension is removed from the Safe Browsing
883- // malware blocklist or Omaha malware blocklist. Also clears the acknowledged
884- // state if the extension is reloaded.
885- void OnBlocklistStateRemoved(const std::string& extension_id);
886-
887- // Takes acknowledged malware blocklist state into account and decides whether
888- // to add the extension to the blocklist and unload it. Called when the
889- // extension is added to the Safe Browsing malware blocklist or the Omaha
890- // malware blocklist.
891- void OnBlocklistStateAdded(const std::string& extension_id);
857- 892-
858 // Removes the disable reason and enable the extension if there are no disable 893 // Removes the disable reason and enable the extension if there are no disable
859 // reasons left and is not blocked for another reason. 894 // reasons left and is not blocked for another reason.
@@ -867,30 +902,18 @@
867 // Disables the extension. If the extension is already disabled, just adds 902 // Disables the extension. If the extension is already disabled, just adds
868 // the |disable_reasons| (a bitmask of disable_reason::DisableReason - there 903 // the |disable_reasons| (a bitmask of disable_reason::DisableReason - there
869 // can be multiple DisableReasons e.g. when an extension comes in disabled 904 // can be multiple DisableReasons e.g. when an extension comes in disabled
870@@ -562,11 +544,6 @@ class ExtensionService : public Extensio 905@@ -649,8 +619,6 @@ class ExtensionService : public Extensio
871 // Helper method to determine if an extension can be blocked.
872 bool CanBlockExtension(const Extension* extension) const;
873
874- // Handles the malware Omaha attribute for remotely disabled extensions.
875- // TODO(crbug.com/1193695): Move this function to OmahaAttributesHandler.
876- void HandleMalwareOmahaAttribute(const std::string& extension_id,
877- const base::Value& attributes);
878-
879 // Enables an extension that was only previously disabled remotely.
880 void MaybeEnableRemotelyDisabledExtension(const std::string& extension_id);
881
882@@ -639,8 +616,6 @@ class ExtensionService : public Extensio
883 906
884 SafeBrowsingVerdictHandler safe_browsing_verdict_handler_; 907 SafeBrowsingVerdictHandler safe_browsing_verdict_handler_;
885 908
886- OmahaAttributesHandler omaha_attributes_handler_; 909- OmahaAttributesHandler omaha_attributes_handler_;
887- 910-
888 // Sets of enabled/disabled/terminated/blocklisted extensions. Not owned. 911 // Sets of enabled/disabled/terminated/blocklisted extensions. Not owned.
889 ExtensionRegistry* registry_ = nullptr; 912 raw_ptr<ExtensionRegistry> registry_ = nullptr;
890 913
891--- chrome/browser/extensions/extension_system_impl.cc.orig 914--- a/chrome/browser/extensions/extension_system_impl.cc
892+++ chrome/browser/extensions/extension_system_impl.cc 915+++ b/chrome/browser/extensions/extension_system_impl.cc
893@@ -465,8 +465,6 @@ void ExtensionSystemImpl::InstallUpdate( 916@@ -464,8 +464,6 @@ void ExtensionSystemImpl::InstallUpdate(
894 void ExtensionSystemImpl::PerformActionBasedOnOmahaAttributes( 917 void ExtensionSystemImpl::PerformActionBasedOnOmahaAttributes(
895 const std::string& extension_id, 918 const std::string& extension_id,
896 const base::Value& attributes) { 919 const base::Value& attributes) {
@@ -899,28 +922,42 @@
899 } 922 }
900 923
901 bool ExtensionSystemImpl::FinishDelayedInstallationIfReady( 924 bool ExtensionSystemImpl::FinishDelayedInstallationIfReady(
902--- chrome/browser/extensions/safe_browsing_verdict_handler.cc.orig 925--- a/chrome/browser/extensions/safe_browsing_verdict_handler.cc
903+++ chrome/browser/extensions/safe_browsing_verdict_handler.cc 926+++ b/chrome/browser/extensions/safe_browsing_verdict_handler.cc
904@@ -101,8 +101,6 @@ void SafeBrowsingVerdictHandler::UpdateG 927@@ -119,7 +119,6 @@ void SafeBrowsingVerdictHandler::UpdateB
928 blocklist_.Remove(id);
929 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState(
930 id, BitMapBlocklistState::NOT_BLOCKLISTED, extension_prefs_);
931- extension_service_->OnBlocklistStateRemoved(id);
932 UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.UnblacklistInstalled",
933 extension->location());
934 }
935@@ -133,7 +132,6 @@ void SafeBrowsingVerdictHandler::UpdateB
936 blocklist_.Insert(extension);
937 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState(
938 id, BitMapBlocklistState::BLOCKLISTED_MALWARE, extension_prefs_);
939- extension_service_->OnBlocklistStateAdded(id);
940 UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.BlacklistInstalled",
941 extension->location());
942 }
943@@ -157,7 +155,6 @@ void SafeBrowsingVerdictHandler::UpdateG
905 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( 944 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState(
906 extension->id(), BitMapBlocklistState::NOT_BLOCKLISTED, 945 extension->id(), BitMapBlocklistState::NOT_BLOCKLISTED,
907 extension_prefs_); 946 extension_prefs_);
908- extension_service_->ClearGreylistedAcknowledgedStateAndMaybeReenable( 947- extension_service_->OnGreylistStateRemoved(extension->id());
909- extension->id());
910 UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Enabled", 948 UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Enabled",
911 extension->location()); 949 extension->location());
912 } 950 }
913@@ -125,8 +123,6 @@ void SafeBrowsingVerdictHandler::UpdateG 951@@ -177,7 +174,6 @@ void SafeBrowsingVerdictHandler::UpdateG
914 blocklist_prefs::BlocklistStateToBitMapBlocklistState(greylist_state); 952 blocklist_prefs::BlocklistStateToBitMapBlocklistState(greylist_state);
915 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( 953 blocklist_prefs::SetSafeBrowsingExtensionBlocklistState(
916 extension->id(), bitmap_greylist_state, extension_prefs_); 954 extension->id(), bitmap_greylist_state, extension_prefs_);
917- extension_service_->MaybeDisableGreylistedExtension(id, 955- extension_service_->OnGreylistStateAdded(id, bitmap_greylist_state);
918- bitmap_greylist_state);
919 UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Disabled", 956 UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Disabled",
920 extension->location()); 957 extension->location());
921 } 958 }
922--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 959--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
923+++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc 960+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
924@@ -35,8 +35,6 @@ 961@@ -35,8 +35,6 @@
925 #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h" 962 #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
926 #include "chrome/browser/installable/installable_utils.h" 963 #include "chrome/browser/installable/installable_utils.h"
@@ -930,7 +967,7 @@
930 #include "chrome/browser/ui/file_system_access_dialogs.h" 967 #include "chrome/browser/ui/file_system_access_dialogs.h"
931 #include "chrome/common/chrome_paths.h" 968 #include "chrome/common/chrome_paths.h"
932 #include "components/content_settings/core/browser/host_content_settings_map.h" 969 #include "components/content_settings/core/browser/host_content_settings_map.h"
933@@ -299,83 +297,6 @@ BindResultCallbackToCurrentSequence( 970@@ -305,83 +303,6 @@ BindResultCallbackToCurrentSequence(
934 base::SequencedTaskRunnerHandle::Get(), std::move(callback)); 971 base::SequencedTaskRunnerHandle::Get(), std::move(callback));
935 } 972 }
936 973
@@ -1014,7 +1051,7 @@
1014 std::string GenerateLastPickedDirectoryKey(const std::string& id) { 1051 std::string GenerateLastPickedDirectoryKey(const std::string& id) {
1015 return id.empty() ? kDefaultLastPickedDirectoryKey 1052 return id.empty() ? kDefaultLastPickedDirectoryKey
1016 : base::StrCat({kCustomLastPickedDirectoryKey, "-", id}); 1053 : base::StrCat({kCustomLastPickedDirectoryKey, "-", id});
1017@@ -1106,28 +1027,6 @@ void ChromeFileSystemAccessPermissionCon 1054@@ -1134,28 +1055,6 @@ void ChromeFileSystemAccessPermissionCon
1018 std::move(callback))); 1055 std::move(callback)));
1019 } 1056 }
1020 1057
@@ -1043,9 +1080,9 @@
1043 void ChromeFileSystemAccessPermissionContext:: 1080 void ChromeFileSystemAccessPermissionContext::
1044 DidConfirmSensitiveDirectoryAccess( 1081 DidConfirmSensitiveDirectoryAccess(
1045 const url::Origin& origin, 1082 const url::Origin& origin,
1046--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.h.orig 1083--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
1047+++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.h 1084+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
1048@@ -85,10 +85,6 @@ class ChromeFileSystemAccessPermissionCo 1085@@ -86,10 +86,6 @@ class ChromeFileSystemAccessPermissionCo
1049 HandleType handle_type, 1086 HandleType handle_type,
1050 content::GlobalRenderFrameHostId frame_id, 1087 content::GlobalRenderFrameHostId frame_id,
1051 base::OnceCallback<void(SensitiveDirectoryResult)> callback) override; 1088 base::OnceCallback<void(SensitiveDirectoryResult)> callback) override;
@@ -1056,9 +1093,9 @@
1056 bool CanObtainReadPermission(const url::Origin& origin) override; 1093 bool CanObtainReadPermission(const url::Origin& origin) override;
1057 bool CanObtainWritePermission(const url::Origin& origin) override; 1094 bool CanObtainWritePermission(const url::Origin& origin) override;
1058 1095
1059--- chrome/browser/media/webrtc/display_media_access_handler.cc.orig 1096--- a/chrome/browser/media/webrtc/display_media_access_handler.cc
1060+++ chrome/browser/media/webrtc/display_media_access_handler.cc 1097+++ b/chrome/browser/media/webrtc/display_media_access_handler.cc
1061@@ -25,6 +25,7 @@ 1098@@ -23,6 +23,7 @@
1062 #include "chrome/browser/safe_browsing/user_interaction_observer.h" 1099 #include "chrome/browser/safe_browsing/user_interaction_observer.h"
1063 #include "chrome/common/pref_names.h" 1100 #include "chrome/common/pref_names.h"
1064 #include "components/prefs/pref_service.h" 1101 #include "components/prefs/pref_service.h"
@@ -1066,7 +1103,7 @@
1066 #include "components/url_formatter/elide_url.h" 1103 #include "components/url_formatter/elide_url.h"
1067 #include "content/public/browser/browser_thread.h" 1104 #include "content/public/browser/browser_thread.h"
1068 #include "content/public/browser/desktop_capture.h" 1105 #include "content/public/browser/desktop_capture.h"
1069@@ -111,6 +112,7 @@ void DisplayMediaAccessHandler::HandleRe 1106@@ -106,6 +107,7 @@ void DisplayMediaAccessHandler::HandleRe
1070 return; 1107 return;
1071 } 1108 }
1072 1109
@@ -1074,25 +1111,41 @@
1074 // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing 1111 // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing
1075 // warnings until user interaction. If the current page has a delayed warning, 1112 // warnings until user interaction. If the current page has a delayed warning,
1076 // it'll have a user interaction observer attached. Show the warning 1113 // it'll have a user interaction observer attached. Show the warning
1077@@ -125,6 +127,7 @@ void DisplayMediaAccessHandler::HandleRe 1114@@ -121,6 +123,7 @@ void DisplayMediaAccessHandler::HandleRe
1078 observer->OnDesktopCaptureRequest(); 1115 observer->OnDesktopCaptureRequest();
1079 return; 1116 return;
1080 } 1117 }
1081+ #endif // BUILDFLAG(FULL_SAFE_BROWSING) 1118+ #endif // BUILDFLAG(FULL_SAFE_BROWSING)
1082 1119
1083 #if defined(OS_MAC) 1120 #if BUILDFLAG(IS_MAC)
1084 // Do not allow picker UI to be shown on a page that isn't in the foreground 1121 // Do not allow picker UI to be shown on a page that isn't in the foreground
1085--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 1122--- a/chrome/browser/notifications/notification_display_service_impl.cc
1086+++ chrome/browser/password_manager/chrome_password_manager_client.cc 1123+++ b/chrome/browser/notifications/notification_display_service_impl.cc
1087@@ -33,7 +33,6 @@ 1124@@ -89,13 +89,6 @@ NotificationDisplayServiceImpl::Notifica
1088 #include "chrome/browser/password_manager/password_reuse_manager_factory.h" 1125 profile_));
1126 #endif
1127
1128-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
1129- BUILDFLAG(IS_WIN)
1130- AddNotificationHandler(
1131- NotificationHandler::Type::TAILORED_SECURITY,
1132- std::make_unique<safe_browsing::TailoredSecurityNotificationHandler>());
1133-#endif
1134-
1135 #if BUILDFLAG(ENABLE_EXTENSIONS)
1136 AddNotificationHandler(
1137 NotificationHandler::Type::EXTENSION,
1138--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
1139+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
1140@@ -34,7 +34,6 @@
1141 #include "chrome/browser/password_manager/password_scripts_fetcher_factory.h"
1089 #include "chrome/browser/password_manager/password_store_factory.h" 1142 #include "chrome/browser/password_manager/password_store_factory.h"
1090 #include "chrome/browser/profiles/profile.h" 1143 #include "chrome/browser/profiles/profile.h"
1091-#include "chrome/browser/safe_browsing/chrome_password_protection_service.h" 1144-#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
1092 #include "chrome/browser/safe_browsing/user_interaction_observer.h" 1145 #include "chrome/browser/safe_browsing/user_interaction_observer.h"
1093 #include "chrome/browser/signin/identity_manager_factory.h" 1146 #include "chrome/browser/signin/identity_manager_factory.h"
1094 #include "chrome/browser/sync/sync_service_factory.h" 1147 #include "chrome/browser/sync/sync_service_factory.h"
1095@@ -110,11 +109,11 @@ 1148@@ -112,11 +111,11 @@
1096 #if BUILDFLAG(FULL_SAFE_BROWSING) 1149 #if BUILDFLAG(FULL_SAFE_BROWSING)
1097 #include "chrome/browser/safe_browsing/advanced_protection_status_manager.h" 1150 #include "chrome/browser/safe_browsing/advanced_protection_status_manager.h"
1098 #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h" 1151 #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h"
@@ -1103,9 +1156,9 @@
1103 #include "ui/events/keycodes/keyboard_codes.h" 1156 #include "ui/events/keycodes/keyboard_codes.h"
1104-#endif 1157-#endif
1105 1158
1106 #if defined(OS_ANDROID) 1159 #if BUILDFLAG(IS_ANDROID)
1107 #include "chrome/browser/android/tab_android.h" 1160 #include "chrome/browser/android/tab_android.h"
1108@@ -826,6 +825,7 @@ autofill::LanguageCode ChromePasswordMan 1161@@ -807,6 +806,7 @@ autofill::LanguageCode ChromePasswordMan
1109 return autofill::LanguageCode(); 1162 return autofill::LanguageCode();
1110 } 1163 }
1111 1164
@@ -1113,32 +1166,9 @@
1113 safe_browsing::PasswordProtectionService* 1166 safe_browsing::PasswordProtectionService*
1114 ChromePasswordManagerClient::GetPasswordProtectionService() const { 1167 ChromePasswordManagerClient::GetPasswordProtectionService() const {
1115 return safe_browsing::ChromePasswordProtectionService:: 1168 return safe_browsing::ChromePasswordProtectionService::
1116@@ -836,13 +836,6 @@ ChromePasswordManagerClient::GetPassword 1169@@ -842,13 +842,9 @@ void ChromePasswordManagerClient::CheckP
1117 void ChromePasswordManagerClient::CheckSafeBrowsingReputation( 1170 web_contents(), web_contents()->GetLastCommittedURL(), username,
1118 const GURL& form_action, 1171 password_type, matching_reused_credentials, password_field_exists);
1119 const GURL& frame_url) {
1120- safe_browsing::PasswordProtectionService* pps =
1121- GetPasswordProtectionService();
1122- if (pps) {
1123- pps->MaybeStartPasswordFieldOnFocusRequest(
1124- web_contents(), web_contents()->GetLastCommittedURL(), form_action,
1125- frame_url, pps->GetAccountInfo().hosted_domain);
1126- }
1127 }
1128 #endif // defined(ON_FOCUS_PING_ENABLED)
1129
1130@@ -852,22 +845,10 @@ void ChromePasswordManagerClient::CheckP
1131 const std::vector<password_manager::MatchingReusedCredential>&
1132 matching_reused_credentials,
1133 bool password_field_exists) {
1134- safe_browsing::PasswordProtectionService* pps =
1135- GetPasswordProtectionService();
1136- if (!pps)
1137- return;
1138-
1139- pps->MaybeStartProtectedPasswordEntryRequest(
1140- web_contents(), web_contents()->GetLastCommittedURL(), username,
1141- password_type, matching_reused_credentials, password_field_exists);
1142 } 1172 }
1143+#endif // BUILDFLAG(FULL_SAFE_BROWSING) 1173+#endif // BUILDFLAG(FULL_SAFE_BROWSING)
1144 1174
@@ -1150,8 +1180,8 @@
1150- } 1180- }
1151 } 1181 }
1152 1182
1153 #if !defined(OS_ANDROID) 1183 #if !BUILDFLAG(IS_ANDROID)
1154@@ -1365,9 +1346,11 @@ void ChromePasswordManagerClient::OnPast 1184@@ -1355,9 +1351,11 @@ void ChromePasswordManagerClient::OnPast
1155 } 1185 }
1156 1186
1157 was_on_paste_called_ = true; 1187 was_on_paste_called_ = true;
@@ -1160,11 +1190,11 @@
1160+#endif // defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED) 1190+#endif // defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
1161 } 1191 }
1162-#endif 1192-#endif
1163+#endif // !defined(OS_ANDROID) 1193+#endif // !BUILDFLAG(IS_ANDROID)
1164 1194
1165 void ChromePasswordManagerClient::RenderFrameCreated( 1195 void ChromePasswordManagerClient::RenderFrameCreated(
1166 content::RenderFrameHost* render_frame_host) { 1196 content::RenderFrameHost* render_frame_host) {
1167@@ -1402,7 +1385,9 @@ void ChromePasswordManagerClient::OnInpu 1197@@ -1392,7 +1390,9 @@ void ChromePasswordManagerClient::OnInpu
1168 if (key_event.windows_key_code == (ui::VKEY_V & 0x1f)) { 1198 if (key_event.windows_key_code == (ui::VKEY_V & 0x1f)) {
1169 OnPaste(); 1199 OnPaste();
1170 } else { 1200 } else {
@@ -1172,9 +1202,9 @@
1172 password_reuse_detection_manager_.OnKeyPressedCommitted(key_event.text); 1202 password_reuse_detection_manager_.OnKeyPressedCommitted(key_event.text);
1173+#endif // defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) 1203+#endif // defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
1174 } 1204 }
1175 #endif // defined(OS_ANDROID) 1205 #endif // BUILDFLAG(IS_ANDROID)
1176 } 1206 }
1177@@ -1441,6 +1426,7 @@ bool ChromePasswordManagerClient::IsPass 1207@@ -1431,6 +1431,7 @@ bool ChromePasswordManagerClient::IsPass
1178 is_enabled = false; 1208 is_enabled = false;
1179 } 1209 }
1180 1210
@@ -1182,7 +1212,7 @@
1182 // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing 1212 // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing
1183 // warnings until user interaction. If the current page has a delayed warning, 1213 // warnings until user interaction. If the current page has a delayed warning,
1184 // it'll have a user interaction observer attached. Disable password 1214 // it'll have a user interaction observer attached. Disable password
1185@@ -1451,6 +1437,7 @@ bool ChromePasswordManagerClient::IsPass 1215@@ -1441,6 +1442,7 @@ bool ChromePasswordManagerClient::IsPass
1186 observer->OnPasswordSaveOrAutofillDenied(); 1216 observer->OnPasswordSaveOrAutofillDenied();
1187 is_enabled = false; 1217 is_enabled = false;
1188 } 1218 }
@@ -1190,9 +1220,9 @@
1190 1220
1191 if (log_manager_->IsLoggingActive()) { 1221 if (log_manager_->IsLoggingActive()) {
1192 password_manager::BrowserSavePasswordProgressLogger logger( 1222 password_manager::BrowserSavePasswordProgressLogger logger(
1193--- chrome/browser/password_manager/chrome_password_manager_client.h.orig 1223--- a/chrome/browser/password_manager/chrome_password_manager_client.h
1194+++ chrome/browser/password_manager/chrome_password_manager_client.h 1224+++ b/chrome/browser/password_manager/chrome_password_manager_client.h
1195@@ -207,13 +207,14 @@ class ChromePasswordManagerClient 1225@@ -206,13 +206,14 @@ class ChromePasswordManagerClient
1196 void AnnotateNavigationEntry(bool has_password_field) override; 1226 void AnnotateNavigationEntry(bool has_password_field) override;
1197 autofill::LanguageCode GetPageLanguage() const override; 1227 autofill::LanguageCode GetPageLanguage() const override;
1198 1228
@@ -1208,7 +1238,7 @@
1208 1238
1209 void CheckProtectedPasswordEntry( 1239 void CheckProtectedPasswordEntry(
1210 password_manager::metrics_util::PasswordType reused_password_type, 1240 password_manager::metrics_util::PasswordType reused_password_type,
1211@@ -221,6 +222,7 @@ class ChromePasswordManagerClient 1241@@ -220,6 +221,7 @@ class ChromePasswordManagerClient
1212 const std::vector<password_manager::MatchingReusedCredential>& 1242 const std::vector<password_manager::MatchingReusedCredential>&
1213 matching_reused_credentials, 1243 matching_reused_credentials,
1214 bool password_field_exists) override; 1244 bool password_field_exists) override;
@@ -1216,8 +1246,8 @@
1216 1246
1217 void LogPasswordReuseDetectedEvent() override; 1247 void LogPasswordReuseDetectedEvent() override;
1218 1248
1219--- chrome/browser/permissions/abusive_origin_permission_revocation_request.cc.orig 1249--- a/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc
1220+++ chrome/browser/permissions/abusive_origin_permission_revocation_request.cc 1250+++ b/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc
1221@@ -136,6 +136,7 @@ void AbusiveOriginPermissionRevocationRe 1251@@ -136,6 +136,7 @@ void AbusiveOriginPermissionRevocationRe
1222 DCHECK(profile_); 1252 DCHECK(profile_);
1223 DCHECK(callback_); 1253 DCHECK(callback_);
@@ -1234,8 +1264,8 @@
1234 } 1264 }
1235 1265
1236 void AbusiveOriginPermissionRevocationRequest::OnSafeBrowsingVerdictReceived( 1266 void AbusiveOriginPermissionRevocationRequest::OnSafeBrowsingVerdictReceived(
1237--- chrome/browser/permissions/contextual_notification_permission_ui_selector.cc.orig 1267--- a/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc
1238+++ chrome/browser/permissions/contextual_notification_permission_ui_selector.cc 1268+++ b/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc
1239@@ -17,7 +17,6 @@ 1269@@ -17,7 +17,6 @@
1240 #include "chrome/browser/browser_process.h" 1270 #include "chrome/browser/browser_process.h"
1241 #include "chrome/browser/permissions/quiet_notification_permission_ui_config.h" 1271 #include "chrome/browser/permissions/quiet_notification_permission_ui_config.h"
@@ -1284,22 +1314,77 @@
1284 } 1314 }
1285 1315
1286 void ContextualNotificationPermissionUiSelector::OnSafeBrowsingVerdictReceived( 1316 void ContextualNotificationPermissionUiSelector::OnSafeBrowsingVerdictReceived(
1287--- chrome/browser/permissions/prediction_based_permission_ui_selector.cc.orig 1317--- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
1288+++ chrome/browser/permissions/prediction_based_permission_ui_selector.cc 1318+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
1289@@ -212,10 +212,8 @@ bool PredictionBasedPermissionUiSelector 1319@@ -312,47 +312,5 @@ bool PredictionBasedPermissionUiSelector
1320
1321 PredictionSource PredictionBasedPermissionUiSelector::GetPredictionTypeToUse(
1290 permissions::RequestType request_type) { 1322 permissions::RequestType request_type) {
1291 // We need to also check `kQuietNotificationPrompts` here since there is no 1323- if (!safe_browsing::IsSafeBrowsingEnabled(*(profile_->GetPrefs()))) {
1292 // generic safeguard anywhere else in the stack. 1324 return PredictionSource::USE_NONE;
1293- if (!base::FeatureList::IsEnabled(features::kQuietNotificationPrompts) || 1325- }
1294- !safe_browsing::IsSafeBrowsingEnabled(*(profile_->GetPrefs()))) { 1326-
1295+ if (!base::FeatureList::IsEnabled(features::kQuietNotificationPrompts)) 1327- bool is_server_side_prediction_enabled = false;
1296 return false; 1328- bool is_ondevice_prediction_enabled = false;
1329-
1330- bool is_tflite_available = false;
1331-#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
1332- is_tflite_available = true;
1333-#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
1334-
1335- // Notification supports both flavours of the quiet prompt
1336- if (request_type == permissions::RequestType::kNotifications &&
1337- (base::FeatureList::IsEnabled(features::kQuietNotificationPrompts) ||
1338- base::FeatureList::IsEnabled(
1339- permissions::features::kPermissionQuietChip))) {
1340- is_server_side_prediction_enabled =
1341- base::FeatureList::IsEnabled(features::kPermissionPredictions);
1342-
1343- is_ondevice_prediction_enabled =
1344- is_tflite_available &&
1345- base::FeatureList::IsEnabled(
1346- permissions::features::kPermissionOnDeviceNotificationPredictions);
1347- }
1348-
1349- // Geolocation supports only the quiet chip ui
1350- if (request_type == permissions::RequestType::kGeolocation &&
1351- base::FeatureList::IsEnabled(
1352- permissions::features::kPermissionQuietChip)) {
1353- is_server_side_prediction_enabled = base::FeatureList::IsEnabled(
1354- features::kPermissionGeolocationPredictions);
1355- }
1356-
1357- if (is_server_side_prediction_enabled && is_ondevice_prediction_enabled) {
1358- return PredictionSource::USE_ANY;
1359- } else if (is_server_side_prediction_enabled) {
1360- return PredictionSource::USE_SERVER_SIDE;
1361- } else if (is_ondevice_prediction_enabled) {
1362- return PredictionSource::USE_ONDEVICE;
1363- } else {
1364- return PredictionSource::USE_NONE;
1297- } 1365- }
1298 double hold_back_chance = 0.0; 1366 }
1299 bool is_permissions_predictions_enabled = false; 1367--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
1300 switch (request_type) { 1368+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
1301--- chrome/browser/prefs/browser_prefs.cc.orig 1369@@ -92,6 +92,7 @@
1302+++ chrome/browser/prefs/browser_prefs.cc 1370 #include "components/policy/core/common/schema.h"
1371 #include "components/policy/policy_constants.h"
1372 #include "components/proxy_config/proxy_policy_handler.h"
1373+#include "components/safe_browsing/buildflags.h"
1374 #include "components/safe_browsing/content/common/file_type_policies_prefs.h"
1375 #include "components/safe_browsing/core/common/safe_browsing_policy_handler.h"
1376 #include "components/safe_browsing/core/common/safe_browsing_prefs.h"
1377@@ -2297,7 +2298,7 @@ std::unique_ptr<ConfigurationPolicyHandl
1378 base::Value::Type::BOOLEAN)));
1379 #endif // BUILDFLAG(IS_LINUX)
1380
1381-#if !BUILDFLAG(IS_ANDROID)
1382+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(FULL_SAFE_BROWSING)
1383 handlers->AddHandler(std::make_unique<SimpleSchemaValidatingPolicyHandler>(
1384 key::kExemptDomainFileTypePairsFromFileTypeDownloadWarnings,
1385 safe_browsing::file_type::prefs::
1386--- a/chrome/browser/prefs/browser_prefs.cc
1387+++ b/chrome/browser/prefs/browser_prefs.cc
1303@@ -243,7 +243,6 @@ 1388@@ -243,7 +243,6 @@
1304 #include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h" 1389 #include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
1305 #include "chrome/browser/new_tab_page/modules/drive/drive_service.h" 1390 #include "chrome/browser/new_tab_page/modules/drive/drive_service.h"
@@ -1308,7 +1393,7 @@
1308 #include "chrome/browser/new_tab_page/modules/task_module/task_module_service.h" 1393 #include "chrome/browser/new_tab_page/modules/task_module/task_module_service.h"
1309 #include "chrome/browser/new_tab_page/promos/promo_service.h" 1394 #include "chrome/browser/new_tab_page/promos/promo_service.h"
1310 #include "chrome/browser/search/background/ntp_custom_background_service.h" 1395 #include "chrome/browser/search/background/ntp_custom_background_service.h"
1311@@ -1277,7 +1276,6 @@ void RegisterProfilePrefs(user_prefs::Pr 1396@@ -1354,7 +1353,6 @@ void RegisterProfilePrefs(user_prefs::Pr
1312 NewTabPageHandler::RegisterProfilePrefs(registry); 1397 NewTabPageHandler::RegisterProfilePrefs(registry);
1313 NewTabPageUI::RegisterProfilePrefs(registry); 1398 NewTabPageUI::RegisterProfilePrefs(registry);
1314 NewTabUI::RegisterProfilePrefs(registry); 1399 NewTabUI::RegisterProfilePrefs(registry);
@@ -1316,8 +1401,18 @@
1316 ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry); 1401 ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry);
1317 PhotosService::RegisterProfilePrefs(registry); 1402 PhotosService::RegisterProfilePrefs(registry);
1318 PinnedTabCodec::RegisterProfilePrefs(registry); 1403 PinnedTabCodec::RegisterProfilePrefs(registry);
1319--- chrome/browser/reputation/reputation_service.cc.orig 1404--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
1320+++ chrome/browser/reputation/reputation_service.cc 1405+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
1406@@ -525,7 +525,6 @@ void ChromeBrowserMainExtraPartsProfiles
1407 SystemExtensionsProviderFactory::GetInstance();
1408 #endif
1409 TabRestoreServiceFactory::GetInstance();
1410- safe_browsing::TailoredSecurityServiceFactory::GetInstance();
1411 TemplateURLFetcherFactory::GetInstance();
1412 TemplateURLServiceFactory::GetInstance();
1413 #if !BUILDFLAG(IS_ANDROID)
1414--- a/chrome/browser/reputation/reputation_service.cc
1415+++ b/chrome/browser/reputation/reputation_service.cc
1321@@ -120,9 +120,7 @@ void ReputationService::GetReputationSta 1416@@ -120,9 +120,7 @@ void ReputationService::GetReputationSta
1322 ReputationCheckCallback callback) { 1417 ReputationCheckCallback callback) {
1323 DCHECK(url.SchemeIsHTTPOrHTTPS()); 1418 DCHECK(url.SchemeIsHTTPOrHTTPS());
@@ -1329,8 +1424,18 @@
1329 1424
1330 LookalikeUrlService* service = LookalikeUrlService::Get(profile_); 1425 LookalikeUrlService* service = LookalikeUrlService::Get(profile_);
1331 if (service->EngagedSitesNeedUpdating()) { 1426 if (service->EngagedSitesNeedUpdating()) {
1332--- chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc.orig 1427--- a/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_page.ts
1333+++ chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc 1428+++ b/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_page.ts
1429@@ -17,7 +17,6 @@ import './privacy_guide_completion_fragm
1430 import './privacy_guide_cookies_fragment.js';
1431 import './privacy_guide_history_sync_fragment.js';
1432 import './privacy_guide_msbb_fragment.js';
1433-import './privacy_guide_safe_browsing_fragment.js';
1434 import './privacy_guide_welcome_fragment.js';
1435 import './step_indicator.js';
1436
1437--- a/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc
1438+++ b/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc
1334@@ -17,15 +17,6 @@ SafeBrowsingMetricsProvider::~SafeBrowsi 1439@@ -17,15 +17,6 @@ SafeBrowsingMetricsProvider::~SafeBrowsi
1335 1440
1336 void SafeBrowsingMetricsProvider::ProvideCurrentSessionData( 1441 void SafeBrowsingMetricsProvider::ProvideCurrentSessionData(
@@ -1347,8 +1452,8 @@
1347 } 1452 }
1348 1453
1349 } // namespace safe_browsing 1454 } // namespace safe_browsing
1350--- chrome/browser/safe_browsing/url_lookup_service_factory.cc.orig 1455--- a/chrome/browser/safe_browsing/url_lookup_service_factory.cc
1351+++ chrome/browser/safe_browsing/url_lookup_service_factory.cc 1456+++ b/chrome/browser/safe_browsing/url_lookup_service_factory.cc
1352@@ -59,28 +59,7 @@ RealTimeUrlLookupServiceFactory::RealTim 1457@@ -59,28 +59,7 @@ RealTimeUrlLookupServiceFactory::RealTim
1353 1458
1354 KeyedService* RealTimeUrlLookupServiceFactory::BuildServiceInstanceFor( 1459 KeyedService* RealTimeUrlLookupServiceFactory::BuildServiceInstanceFor(
@@ -1379,9 +1484,9 @@
1379 } 1484 }
1380 1485
1381 } // namespace safe_browsing 1486 } // namespace safe_browsing
1382--- chrome/browser/ssl/chrome_security_blocking_page_factory.cc.orig 1487--- a/chrome/browser/ssl/chrome_security_blocking_page_factory.cc
1383+++ chrome/browser/ssl/chrome_security_blocking_page_factory.cc 1488+++ b/chrome/browser/ssl/chrome_security_blocking_page_factory.cc
1384@@ -142,15 +142,6 @@ CreateSettingsPageHelper() { 1489@@ -143,15 +143,6 @@ CreateSettingsPageHelper() {
1385 CreateChromeSettingsPageHelper(); 1490 CreateChromeSettingsPageHelper();
1386 } 1491 }
1387 1492
@@ -1397,9 +1502,9 @@
1397 } // namespace 1502 } // namespace
1398 1503
1399 std::unique_ptr<SSLBlockingPage> 1504 std::unique_ptr<SSLBlockingPage>
1400@@ -192,10 +183,6 @@ ChromeSecurityBlockingPageFactory::Creat 1505@@ -175,10 +166,6 @@ ChromeSecurityBlockingPageFactory::Creat
1401 } 1506 Profile::FromBrowserContext(web_contents->GetBrowserContext()));
1402 } 1507 state->DidDisplayErrorPage(cert_error);
1403 1508
1404- LogSafeBrowsingSecuritySensitiveAction( 1509- LogSafeBrowsingSecuritySensitiveAction(
1405- safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( 1510- safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile(
@@ -1408,18 +1513,7 @@
1408 auto controller_client = std::make_unique<SSLErrorControllerClient>( 1513 auto controller_client = std::make_unique<SSLErrorControllerClient>(
1409 web_contents, ssl_info, cert_error, request_url, 1514 web_contents, ssl_info, cert_error, request_url,
1410 std::move(metrics_helper), CreateSettingsPageHelper()); 1515 std::move(metrics_helper), CreateSettingsPageHelper());
1411@@ -264,10 +251,6 @@ ChromeSecurityBlockingPageFactory::Creat 1516@@ -248,10 +235,6 @@ ChromeSecurityBlockingPageFactory::Creat
1412 const GURL& request_url,
1413 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
1414 const net::SSLInfo& ssl_info) {
1415- LogSafeBrowsingSecuritySensitiveAction(
1416- safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile(
1417- Profile::FromBrowserContext(web_contents->GetBrowserContext())));
1418-
1419 auto page = std::make_unique<LegacyTLSBlockingPage>(
1420 web_contents, cert_error, request_url, std::move(ssl_cert_reporter),
1421 /*can_show_enhanced_protection_message=*/true, ssl_info,
1422@@ -289,10 +272,6 @@ ChromeSecurityBlockingPageFactory::Creat
1423 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, 1517 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
1424 const net::SSLInfo& ssl_info, 1518 const net::SSLInfo& ssl_info,
1425 const std::string& mitm_software_name) { 1519 const std::string& mitm_software_name) {
@@ -1430,7 +1524,7 @@
1430 auto page = std::make_unique<MITMSoftwareBlockingPage>( 1524 auto page = std::make_unique<MITMSoftwareBlockingPage>(
1431 web_contents, cert_error, request_url, std::move(ssl_cert_reporter), 1525 web_contents, cert_error, request_url, std::move(ssl_cert_reporter),
1432 /*can_show_enhanced_protection_message=*/true, ssl_info, 1526 /*can_show_enhanced_protection_message=*/true, ssl_info,
1433@@ -314,10 +293,6 @@ ChromeSecurityBlockingPageFactory::Creat 1527@@ -273,10 +256,6 @@ ChromeSecurityBlockingPageFactory::Creat
1434 const GURL& request_url, 1528 const GURL& request_url,
1435 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, 1529 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
1436 const net::SSLInfo& ssl_info) { 1530 const net::SSLInfo& ssl_info) {
@@ -1441,8 +1535,8 @@
1441 auto page = std::make_unique<BlockedInterceptionBlockingPage>( 1535 auto page = std::make_unique<BlockedInterceptionBlockingPage>(
1442 web_contents, cert_error, request_url, std::move(ssl_cert_reporter), 1536 web_contents, cert_error, request_url, std::move(ssl_cert_reporter),
1443 /*can_show_enhanced_protection_message=*/true, ssl_info, 1537 /*can_show_enhanced_protection_message=*/true, ssl_info,
1444--- chrome/browser/ssl/sct_reporting_service_factory.cc.orig 1538--- a/chrome/browser/ssl/sct_reporting_service_factory.cc
1445+++ chrome/browser/ssl/sct_reporting_service_factory.cc 1539+++ b/chrome/browser/ssl/sct_reporting_service_factory.cc
1446@@ -32,15 +32,7 @@ SCTReportingServiceFactory::~SCTReportin 1540@@ -32,15 +32,7 @@ SCTReportingServiceFactory::~SCTReportin
1447 1541
1448 KeyedService* SCTReportingServiceFactory::BuildServiceInstanceFor( 1542 KeyedService* SCTReportingServiceFactory::BuildServiceInstanceFor(
@@ -1460,8 +1554,8 @@
1460 } 1554 }
1461 1555
1462 content::BrowserContext* SCTReportingServiceFactory::GetBrowserContextToUse( 1556 content::BrowserContext* SCTReportingServiceFactory::GetBrowserContextToUse(
1463--- chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc.orig 1557--- a/chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc
1464+++ chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc 1558+++ b/chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc
1465@@ -6,7 +6,6 @@ 1559@@ -6,7 +6,6 @@
1466 1560
1467 #include "chrome/browser/browser_process.h" 1561 #include "chrome/browser/browser_process.h"
@@ -1482,9 +1576,9 @@
1482 } 1576 }
1483 1577
1484 } // namespace 1578 } // namespace
1485--- chrome/browser/ui/BUILD.gn.orig 1579--- a/chrome/browser/ui/BUILD.gn
1486+++ chrome/browser/ui/BUILD.gn 1580+++ b/chrome/browser/ui/BUILD.gn
1487@@ -533,7 +533,6 @@ static_library("ui") { 1581@@ -534,7 +534,6 @@ static_library("ui") {
1488 "//components/renderer_context_menu", 1582 "//components/renderer_context_menu",
1489 "//components/resources", 1583 "//components/resources",
1490 "//components/safe_browsing/content/browser", 1584 "//components/safe_browsing/content/browser",
@@ -1492,8 +1586,17 @@
1492 "//components/safe_browsing/content/browser/password_protection", 1586 "//components/safe_browsing/content/browser/password_protection",
1493 "//components/safe_browsing/content/browser/web_ui", 1587 "//components/safe_browsing/content/browser/web_ui",
1494 "//components/safe_browsing/core/browser/db:database_manager", 1588 "//components/safe_browsing/core/browser/db:database_manager",
1495--- chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc.orig 1589@@ -4602,8 +4601,6 @@ static_library("ui") {
1496+++ chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc 1590 "views/safe_browsing/password_reuse_modal_warning_dialog.h",
1591 "views/safe_browsing/prompt_for_scanning_modal_dialog.cc",
1592 "views/safe_browsing/prompt_for_scanning_modal_dialog.h",
1593- "views/safe_browsing/tailored_security_unconsented_modal.cc",
1594- "views/safe_browsing/tailored_security_unconsented_modal.h",
1595 "views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc",
1596 "views/send_tab_to_self/send_tab_to_self_bubble_device_button.h",
1597 "views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc",
1598--- a/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
1599+++ b/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
1497@@ -16,6 +16,7 @@ 1600@@ -16,6 +16,7 @@
1498 #include "components/javascript_dialogs/tab_modal_dialog_manager.h" 1601 #include "components/javascript_dialogs/tab_modal_dialog_manager.h"
1499 #include "components/javascript_dialogs/tab_modal_dialog_view.h" 1602 #include "components/javascript_dialogs/tab_modal_dialog_view.h"
@@ -1518,12 +1621,12 @@
1518 } 1621 }
1519 1622
1520 void JavaScriptTabModalDialogManagerDelegateDesktop::DidCloseDialog() { 1623 void JavaScriptTabModalDialogManagerDelegateDesktop::DidCloseDialog() {
1521--- chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc.orig 1624--- a/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc
1522+++ chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc 1625+++ b/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc
1523@@ -11,7 +11,10 @@ 1626@@ -11,7 +11,10 @@
1524 #include "base/task/post_task.h" 1627 #include "base/task/post_task.h"
1628 #include "base/task/task_runner_util.h"
1525 #include "base/task/thread_pool.h" 1629 #include "base/task/thread_pool.h"
1526 #include "base/task_runner_util.h"
1527+#include "components/safe_browsing/buildflags.h" 1630+#include "components/safe_browsing/buildflags.h"
1528+#if BUILDFLAG(FULL_SAFE_BROWSING) 1631+#if BUILDFLAG(FULL_SAFE_BROWSING)
1529 #include "chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.h" 1632 #include "chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.h"
@@ -1580,7 +1683,7 @@
1580 if (!enterprise_connectors::ContentAnalysisDelegate::IsEnabled( 1683 if (!enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
1581 profile, web_contents->GetLastCommittedURL(), &data, connector)) { 1684 profile, web_contents->GetLastCommittedURL(), &data, connector)) {
1582 std::move(callback).Run( 1685 std::move(callback).Run(
1583@@ -154,4 +164,8 @@ void HandleOnPerformDrop( 1686@@ -152,4 +162,8 @@ void HandleOnPerformDrop(
1584 std::move(callback).Run( 1687 std::move(callback).Run(
1585 content::WebContentsViewDelegate::DropCompletionResult::kContinue); 1688 content::WebContentsViewDelegate::DropCompletionResult::kContinue);
1586 } 1689 }
@@ -1589,9 +1692,9 @@
1589+ content::WebContentsViewDelegate::DropCompletionResult::kContinue); 1692+ content::WebContentsViewDelegate::DropCompletionResult::kContinue);
1590+#endif // BUILDFLAG(FULL_SAFE_BROWSING) 1693+#endif // BUILDFLAG(FULL_SAFE_BROWSING)
1591 } 1694 }
1592--- chrome/browser/ui/views/download/download_item_view.cc.orig 1695--- a/chrome/browser/ui/views/download/download_item_view.cc
1593+++ chrome/browser/ui/views/download/download_item_view.cc 1696+++ b/chrome/browser/ui/views/download/download_item_view.cc
1594@@ -837,9 +837,7 @@ void DownloadItemView::UpdateLabels() { 1697@@ -838,9 +838,7 @@ void DownloadItemView::UpdateLabels() {
1595 deep_scanning_label_->SetVisible(mode_ == 1698 deep_scanning_label_->SetVisible(mode_ ==
1596 download::DownloadItemMode::kDeepScanning); 1699 download::DownloadItemMode::kDeepScanning);
1597 if (deep_scanning_label_->GetVisible()) { 1700 if (deep_scanning_label_->GetVisible()) {
@@ -1602,7 +1705,7 @@
1602 ? IDS_PROMPT_DEEP_SCANNING_DOWNLOAD 1705 ? IDS_PROMPT_DEEP_SCANNING_DOWNLOAD
1603 : IDS_PROMPT_DEEP_SCANNING_APP_DOWNLOAD; 1706 : IDS_PROMPT_DEEP_SCANNING_APP_DOWNLOAD;
1604 const std::u16string filename = ElidedFilename(*deep_scanning_label_); 1707 const std::u16string filename = ElidedFilename(*deep_scanning_label_);
1605@@ -886,11 +884,15 @@ void DownloadItemView::UpdateButtons() { 1708@@ -887,11 +885,15 @@ void DownloadItemView::UpdateButtons() {
1606 } 1709 }
1607 1710
1608 const bool allow_open_during_deep_scan = 1711 const bool allow_open_during_deep_scan =
@@ -1618,7 +1721,7 @@
1618 open_button_->SetEnabled((mode_ == download::DownloadItemMode::kNormal) || 1721 open_button_->SetEnabled((mode_ == download::DownloadItemMode::kNormal) ||
1619 prompt_to_scan || allow_open_during_deep_scan); 1722 prompt_to_scan || allow_open_during_deep_scan);
1620 1723
1621@@ -1427,7 +1429,9 @@ void DownloadItemView::ShowContextMenuIm 1724@@ -1432,7 +1434,9 @@ void DownloadItemView::ShowContextMenuIm
1622 } 1725 }
1623 1726
1624 void DownloadItemView::OpenDownloadDuringAsyncScanning() { 1727 void DownloadItemView::OpenDownloadDuringAsyncScanning() {
@@ -1628,9 +1731,9 @@
1628 model_->SetOpenWhenComplete(true); 1731 model_->SetOpenWhenComplete(true);
1629 } 1732 }
1630 1733
1631--- chrome/browser/ui/webui/downloads/downloads_dom_handler.cc.orig 1734--- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
1632+++ chrome/browser/ui/webui/downloads/downloads_dom_handler.cc 1735+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
1633@@ -366,7 +366,6 @@ void DownloadsDOMHandler::OpenDuringScan 1736@@ -367,7 +367,6 @@ void DownloadsDOMHandler::OpenDuringScan
1634 if (download) { 1737 if (download) {
1635 DownloadItemModel model(download); 1738 DownloadItemModel model(download);
1636 model.SetOpenWhenComplete(true); 1739 model.SetOpenWhenComplete(true);
@@ -1638,9 +1741,9 @@
1638 } 1741 }
1639 } 1742 }
1640 1743
1641--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 1744--- a/chrome/browser/ui/webui/management/management_ui_handler.cc
1642+++ chrome/browser/ui/webui/management/management_ui_handler.cc 1745+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
1643@@ -805,12 +805,6 @@ base::Value ManagementUIHandler::GetThre 1746@@ -834,12 +834,6 @@ base::Value ManagementUIHandler::GetThre
1644 &info); 1747 &info);
1645 } 1748 }
1646 1749
@@ -1653,9 +1756,9 @@
1653 const std::string enterprise_manager = 1756 const std::string enterprise_manager =
1654 connectors_service->GetManagementDomain(); 1757 connectors_service->GetManagementDomain();
1655 1758
1656--- chrome/browser/webshare/share_service_impl.cc.orig 1759--- a/chrome/browser/webshare/share_service_impl.cc
1657+++ chrome/browser/webshare/share_service_impl.cc 1760+++ b/chrome/browser/webshare/share_service_impl.cc
1658@@ -14,7 +14,9 @@ 1761@@ -17,7 +17,9 @@
1659 #include "chrome/browser/browser_process.h" 1762 #include "chrome/browser/browser_process.h"
1660 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 1763 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
1661 #include "chrome/common/chrome_features.h" 1764 #include "chrome/common/chrome_features.h"
@@ -1665,10 +1768,10 @@
1665 #include "components/safe_browsing/core/browser/db/database_manager.h" 1768 #include "components/safe_browsing/core/browser/db/database_manager.h"
1666 #include "content/public/browser/web_contents.h" 1769 #include "content/public/browser/web_contents.h"
1667 #include "mojo/public/cpp/bindings/self_owned_receiver.h" 1770 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
1668@@ -182,11 +184,13 @@ void ShareServiceImpl::Share(const std:: 1771@@ -198,11 +200,13 @@ void ShareServiceImpl::Share(const std::
1772
1669 // Check if at least one file is marked by the download protection service 1773 // Check if at least one file is marked by the download protection service
1670 // to send a ping to check this file type. 1774 // to send a ping to check this file type.
1671 const base::FilePath path = base::FilePath::FromUTF8Unsafe(file->name);
1672+#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) 1775+#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
1673 if (!should_check_url && 1776 if (!should_check_url &&
1674 safe_browsing::FileTypePolicies::GetInstance()->IsCheckedBinaryFile( 1777 safe_browsing::FileTypePolicies::GetInstance()->IsCheckedBinaryFile(
@@ -1679,7 +1782,7 @@
1679 1782
1680 // In the case where the original blob handle was to a native file (of 1783 // In the case where the original blob handle was to a native file (of
1681 // unknown size), the serialized data does not contain an accurate file 1784 // unknown size), the serialized data does not contain an accurate file
1682@@ -196,6 +200,7 @@ void ShareServiceImpl::Share(const std:: 1785@@ -212,6 +216,7 @@ void ShareServiceImpl::Share(const std::
1683 } 1786 }
1684 1787
1685 DCHECK(!safe_browsing_request_); 1788 DCHECK(!safe_browsing_request_);
@@ -1687,7 +1790,7 @@
1687 if (should_check_url && g_browser_process->safe_browsing_service()) { 1790 if (should_check_url && g_browser_process->safe_browsing_service()) {
1688 safe_browsing_request_.emplace( 1791 safe_browsing_request_.emplace(
1689 g_browser_process->safe_browsing_service()->database_manager(), 1792 g_browser_process->safe_browsing_service()->database_manager(),
1690@@ -205,6 +210,7 @@ void ShareServiceImpl::Share(const std:: 1793@@ -221,6 +226,7 @@ void ShareServiceImpl::Share(const std::
1691 std::move(files), std::move(callback))); 1794 std::move(files), std::move(callback)));
1692 return; 1795 return;
1693 } 1796 }
@@ -1695,9 +1798,9 @@
1695 1798
1696 OnSafeBrowsingResultReceived(title, text, share_url, std::move(files), 1799 OnSafeBrowsingResultReceived(title, text, share_url, std::move(files),
1697 std::move(callback), 1800 std::move(callback),
1698--- chrome/test/BUILD.gn.orig 1801--- a/chrome/test/BUILD.gn
1699+++ chrome/test/BUILD.gn 1802+++ b/chrome/test/BUILD.gn
1700@@ -1196,7 +1196,6 @@ if (!is_android && !is_fuchsia) { 1803@@ -1283,7 +1283,6 @@ if (!is_android) {
1701 "//components/resources", 1804 "//components/resources",
1702 "//components/safe_browsing:buildflags", 1805 "//components/safe_browsing:buildflags",
1703 "//components/safe_browsing/content/browser", 1806 "//components/safe_browsing/content/browser",
@@ -1705,7 +1808,7 @@
1705 "//components/safe_browsing/content/browser:safe_browsing_service", 1808 "//components/safe_browsing/content/browser:safe_browsing_service",
1706 "//components/safe_browsing/content/browser/password_protection", 1809 "//components/safe_browsing/content/browser/password_protection",
1707 "//components/safe_browsing/content/browser/password_protection:test_support", 1810 "//components/safe_browsing/content/browser/password_protection:test_support",
1708@@ -5349,7 +5348,6 @@ test("unit_tests") { 1811@@ -5540,7 +5539,6 @@ test("unit_tests") {
1709 "//components/resources", 1812 "//components/resources",
1710 "//components/safe_browsing:buildflags", 1813 "//components/safe_browsing:buildflags",
1711 "//components/safe_browsing/content/browser", 1814 "//components/safe_browsing/content/browser",
@@ -1713,20 +1816,20 @@
1713 "//components/safe_browsing/content/browser/password_protection", 1816 "//components/safe_browsing/content/browser/password_protection",
1714 "//components/safe_browsing/content/browser/password_protection:mock_password_protection", 1817 "//components/safe_browsing/content/browser/password_protection:mock_password_protection",
1715 "//components/safe_browsing/content/browser/web_ui", 1818 "//components/safe_browsing/content/browser/web_ui",
1716--- components/password_manager/content/browser/content_password_manager_driver.cc.orig 1819--- a/components/password_manager/content/browser/content_password_manager_driver.cc
1717+++ components/password_manager/content/browser/content_password_manager_driver.cc 1820+++ b/components/password_manager/content/browser/content_password_manager_driver.cc
1718@@ -407,7 +407,7 @@ void ContentPasswordManagerDriver::Check 1821@@ -408,7 +408,7 @@ void ContentPasswordManagerDriver::Check
1719 if (client_->GetMetricsRecorder()) { 1822 if (!password_manager::bad_message::CheckFrameNotPrerendering(
1720 client_->GetMetricsRecorder()->RecordUserFocusedPasswordField(); 1823 render_frame_host_))
1721 } 1824 return;
1722-#if defined(ON_FOCUS_PING_ENABLED) 1825-#if defined(ON_FOCUS_PING_ENABLED)
1723+#if defined(ON_FOCUS_PING_ENABLED) && BUILDFLAG(FULL_SAFE_BROWSING) 1826+#if defined(ON_FOCUS_PING_ENABLED) && BUILDFLAG(FULL_SAFE_BROWSING)
1724 client_->CheckSafeBrowsingReputation(form_action, frame_url); 1827 client_->CheckSafeBrowsingReputation(form_action, frame_url);
1725 #endif 1828 #endif
1726 } 1829 }
1727--- components/password_manager/core/browser/password_manager_client.h.orig 1830--- a/components/password_manager/core/browser/password_manager_client.h
1728+++ components/password_manager/core/browser/password_manager_client.h 1831+++ b/components/password_manager/core/browser/password_manager_client.h
1729@@ -339,11 +339,14 @@ class PasswordManagerClient { 1832@@ -344,11 +344,14 @@ class PasswordManagerClient {
1730 // Returns the current best guess as to the page's display language. 1833 // Returns the current best guess as to the page's display language.
1731 virtual autofill::LanguageCode GetPageLanguage() const; 1834 virtual autofill::LanguageCode GetPageLanguage() const;
1732 1835
@@ -1742,7 +1845,7 @@
1742 // Checks the safe browsing reputation of the webpage when the 1845 // Checks the safe browsing reputation of the webpage when the
1743 // user focuses on a username/password field. This is used for reporting 1846 // user focuses on a username/password field. This is used for reporting
1744 // only, and won't trigger a warning. 1847 // only, and won't trigger a warning.
1745@@ -351,6 +354,7 @@ class PasswordManagerClient { 1848@@ -356,6 +359,7 @@ class PasswordManagerClient {
1746 const GURL& frame_url) = 0; 1849 const GURL& frame_url) = 0;
1747 #endif 1850 #endif
1748 1851
@@ -1750,7 +1853,7 @@
1750 // Checks the safe browsing reputation of the webpage where password reuse 1853 // Checks the safe browsing reputation of the webpage where password reuse
1751 // happens. This is called by the PasswordReuseDetectionManager when a 1854 // happens. This is called by the PasswordReuseDetectionManager when a
1752 // protected password is typed on the wrong domain. This may trigger a 1855 // protected password is typed on the wrong domain. This may trigger a
1753@@ -363,6 +367,7 @@ class PasswordManagerClient { 1856@@ -368,6 +372,7 @@ class PasswordManagerClient {
1754 const std::string& username, 1857 const std::string& username,
1755 const std::vector<MatchingReusedCredential>& matching_reused_credentials, 1858 const std::vector<MatchingReusedCredential>& matching_reused_credentials,
1756 bool password_field_exists) = 0; 1859 bool password_field_exists) = 0;
@@ -1758,8 +1861,8 @@
1758 1861
1759 // Records a Chrome Sync event that GAIA password reuse was detected. 1862 // Records a Chrome Sync event that GAIA password reuse was detected.
1760 virtual void LogPasswordReuseDetectedEvent() = 0; 1863 virtual void LogPasswordReuseDetectedEvent() = 0;
1761--- components/password_manager/core/browser/password_reuse_detection_manager.cc.orig 1864--- a/components/password_manager/core/browser/password_reuse_detection_manager.cc
1762+++ components/password_manager/core/browser/password_reuse_detection_manager.cc 1865+++ b/components/password_manager/core/browser/password_reuse_detection_manager.cc
1763@@ -161,9 +161,11 @@ void PasswordReuseDetectionManager::OnRe 1866@@ -161,9 +161,11 @@ void PasswordReuseDetectionManager::OnRe
1764 ? reused_protected_password_hash->username 1867 ? reused_protected_password_hash->username
1765 : ""; 1868 : "";
@@ -1772,19 +1875,8 @@
1772 } 1875 }
1773 1876
1774 void PasswordReuseDetectionManager::SetClockForTesting(base::Clock* clock) { 1877 void PasswordReuseDetectionManager::SetClockForTesting(base::Clock* clock) {
1775--- components/safe_browsing/content/browser/BUILD.gn.orig 1878--- a/components/safe_browsing/content/common/proto/BUILD.gn
1776+++ components/safe_browsing/content/browser/BUILD.gn 1879+++ b/components/safe_browsing/content/common/proto/BUILD.gn
1777@@ -82,8 +82,6 @@ source_set("browser") {
1778 "threat_details_cache.h",
1779 "threat_details_history.cc",
1780 "threat_details_history.h",
1781- "user_population.cc",
1782- "user_population.h",
1783 "web_api_handshake_checker.cc",
1784 "web_api_handshake_checker.h",
1785 ]
1786--- components/safe_browsing/content/common/proto/BUILD.gn.orig
1787+++ components/safe_browsing/content/common/proto/BUILD.gn
1788@@ -5,8 +5,12 @@ 1880@@ -5,8 +5,12 @@
1789 import("//components/safe_browsing/buildflags.gni") 1881 import("//components/safe_browsing/buildflags.gni")
1790 import("//third_party/protobuf/proto_library.gni") 1882 import("//third_party/protobuf/proto_library.gni")
@@ -1800,8 +1892,8 @@
1800 } 1892 }
1801-} 1893-}
1802+# } 1894+# }
1803--- components/safe_browsing/content/common/safe_browsing.mojom.orig 1895--- a/components/safe_browsing/content/common/safe_browsing.mojom
1804+++ components/safe_browsing/content/common/safe_browsing.mojom 1896+++ b/components/safe_browsing/content/common/safe_browsing.mojom
1805@@ -120,7 +120,6 @@ enum PhishingDetectorResult { 1897@@ -120,7 +120,6 @@ enum PhishingDetectorResult {
1806 INVALID_SCORE = 4, 1898 INVALID_SCORE = 4,
1807 }; 1899 };
@@ -1810,9 +1902,20 @@
1810 // Interface for setting the CSD model and to start phishing classification. 1902 // Interface for setting the CSD model and to start phishing classification.
1811 interface PhishingDetector { 1903 interface PhishingDetector {
1812 // A classification model for client-side phishing detection. 1904 // A classification model for client-side phishing detection.
1813--- content/browser/file_system_access/safe_move_helper.cc.orig 1905--- a/components/safe_browsing/core/browser/BUILD.gn
1814+++ content/browser/file_system_access/safe_move_helper.cc 1906+++ b/components/safe_browsing/core/browser/BUILD.gn
1815@@ -150,14 +150,8 @@ void SafeMoveHelper::Start(SafeMoveHelpe 1907@@ -11,8 +11,6 @@ source_set("browser") {
1908 "safe_browsing_url_checker_impl.cc",
1909 "safe_browsing_url_checker_impl.h",
1910 "url_checker_delegate.h",
1911- "user_population.cc",
1912- "user_population.h",
1913 ]
1914
1915 public_deps = [ "//google_apis:google_apis" ]
1916--- a/content/browser/file_system_access/safe_move_helper.cc
1917+++ b/content/browser/file_system_access/safe_move_helper.cc
1918@@ -151,14 +151,8 @@ void SafeMoveHelper::Start(SafeMoveHelpe
1816 return; 1919 return;
1817 } 1920 }
1818 1921
@@ -1827,7 +1930,7 @@
1827 } 1930 }
1828 1931
1829 void SafeMoveHelper::ComputeHashForSourceFile(HashCallback callback) { 1932 void SafeMoveHelper::ComputeHashForSourceFile(HashCallback callback) {
1830@@ -177,38 +171,6 @@ void SafeMoveHelper::ComputeHashForSourc 1933@@ -178,38 +172,6 @@ void SafeMoveHelper::ComputeHashForSourc
1831 std::move(wrapped_callback), source_url())); 1934 std::move(wrapped_callback), source_url()));
1832 } 1935 }
1833 1936
@@ -1866,8 +1969,8 @@
1866 void SafeMoveHelper::DidAfterWriteCheck( 1969 void SafeMoveHelper::DidAfterWriteCheck(
1867 FileSystemAccessPermissionContext::AfterWriteCheckResult result) { 1970 FileSystemAccessPermissionContext::AfterWriteCheckResult result) {
1868 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 1971 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
1869--- content/browser/file_system_access/safe_move_helper.h.orig 1972--- a/content/browser/file_system_access/safe_move_helper.h
1870+++ content/browser/file_system_access/safe_move_helper.h 1973+++ b/content/browser/file_system_access/safe_move_helper.h
1871@@ -52,9 +52,6 @@ class CONTENT_EXPORT SafeMoveHelper { 1974@@ -52,9 +52,6 @@ class CONTENT_EXPORT SafeMoveHelper {
1872 private: 1975 private:
1873 SEQUENCE_CHECKER(sequence_checker_); 1976 SEQUENCE_CHECKER(sequence_checker_);
@@ -1878,8 +1981,8 @@
1878 void DidAfterWriteCheck( 1981 void DidAfterWriteCheck(
1879 FileSystemAccessPermissionContext::AfterWriteCheckResult result); 1982 FileSystemAccessPermissionContext::AfterWriteCheckResult result);
1880 void DidFileSkipQuarantine(base::File::Error result); 1983 void DidFileSkipQuarantine(base::File::Error result);
1881--- content/public/browser/file_system_access_permission_context.h.orig 1984--- a/content/public/browser/file_system_access_permission_context.h
1882+++ content/public/browser/file_system_access_permission_context.h 1985+++ b/content/public/browser/file_system_access_permission_context.h
1883@@ -107,12 +107,6 @@ class FileSystemAccessPermissionContext 1986@@ -107,12 +107,6 @@ class FileSystemAccessPermissionContext
1884 base::OnceCallback<void(SensitiveDirectoryResult)> callback) = 0; 1987 base::OnceCallback<void(SensitiveDirectoryResult)> callback) = 0;
1885 1988
@@ -1893,9 +1996,9 @@
1893 1996
1894 // Returns whether the give |origin| already allows read permission, or it is 1997 // Returns whether the give |origin| already allows read permission, or it is
1895 // possible to request one. This is used to block file dialogs from being 1998 // possible to request one. This is used to block file dialogs from being
1896--- extensions/browser/updater/update_service.cc.orig 1999--- a/extensions/browser/updater/update_service.cc
1897+++ extensions/browser/updater/update_service.cc 2000+++ b/extensions/browser/updater/update_service.cc
1898@@ -111,13 +111,6 @@ void UpdateService::OnEvent(Events event 2001@@ -122,13 +122,6 @@ void UpdateService::OnEvent(Events event
1899 break; 2002 break;
1900 } 2003 }
1901 2004
@@ -1909,9 +2012,9 @@
1909 } 2012 }
1910 2013
1911 UpdateService::UpdateService( 2014 UpdateService::UpdateService(
1912--- weblayer/BUILD.gn.orig 2015--- a/weblayer/BUILD.gn
1913+++ weblayer/BUILD.gn 2016+++ b/weblayer/BUILD.gn
1914@@ -463,7 +463,6 @@ source_set("weblayer_lib_base") { 2017@@ -462,7 +462,6 @@ source_set("weblayer_lib_base") {
1915 "//components/prefs", 2018 "//components/prefs",
1916 "//components/profile_metrics", 2019 "//components/profile_metrics",
1917 "//components/safe_browsing/content/browser", 2020 "//components/safe_browsing/content/browser",