-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0012-Disable-conversion-measurement-api.patch
More file actions
1207 lines (1141 loc) · 55.6 KB
/
0012-Disable-conversion-measurement-api.patch
File metadata and controls
1207 lines (1141 loc) · 55.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 1accddd5793bd783e0cb033bb959bafd8708e432 Mon Sep 17 00:00:00 2001
From: uazo <uazo@users.noreply.github.com>
Date: Mon, 15 Nov 2021 09:43:29 +0000
Subject: [PATCH 12/12] Disable conversion measurement api
Disable Conversion Measurement API by disabling the flag and removing
support for the AttributionReporting provider. it also removes
the handling of attributions via intents between apps.
This patch enforces the deactivation by preventing the report from
being sent and being saved to disk, although it is currently in uncalled code.
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../browser/aw_content_browser_client.cc | 3 +
.../chromium/android_webview/AwSettings.java | 4 +-
.../apk/AndroidManifest.xml | 3 -
chrome/android/java/AndroidManifest.xml | 4 -
.../ChromeSiteSettingsDelegate.java | 2 +
.../privacy_page/privacy_page_index.html | 9 -
chrome/browser/resources/settings/route.ts | 2 +-
.../site_settings/site_settings_page.ts | 1 +
.../aggregatable_trigger_config.cc | 2 +-
components/attribution_reporting/features.cc | 1 +
.../core/browser/content_settings_registry.cc | 2 +-
.../origin_trials/features.cc | 1 +
.../render_view_context_menu_base.cc | 3 -
.../aggregatable_report_sender.cc | 15 +-
.../attribution_data_host_manager_impl.cc | 8 +-
.../attribution_reporting/attribution_host.cc | 3 +-
.../attribution_manager_impl.cc | 4 -
.../attribution_os_level_manager.cc | 3 +-
.../attribution_report_network_sender.cc | 9 +
.../attribution_storage_sql.cc | 8 +-
.../renderer_host/render_frame_host_impl.cc | 11 +
content/browser/storage_partition_impl.cc | 12 -
content/public/android/BUILD.gn | 2 -
.../browser/AttributionOsLevelManager.java | 349 +-----------------
.../public/browser/content_browser_client.cc | 7 +-
.../public/browser/navigation_controller.cc | 1 -
.../Disable-conversion-measurement-api.inc | 2 +
.../Disable-conversion-measurement-api.inc | 8 +
.../attribution/request_headers_internal.cc | 1 +
services/network/network_context.cc | 24 +-
.../network/public/cpp/attribution_utils.cc | 2 +
.../core/frame/attribution_src_loader.cc | 2 -
third_party/blink/renderer/core/page/page.cc | 2 +-
.../platform/runtime_enabled_features.json5 | 20 +-
ui/events/android/motion_event_android.cc | 8 +-
35 files changed, 102 insertions(+), 436 deletions(-)
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index fae9f1451b871..ba526b0c2e741 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -1350,6 +1350,7 @@ network::mojom::AttributionSupport
AwContentBrowserClient::GetAttributionSupport(
AttributionReportingOsApiState state,
bool client_os_disabled) {
+ if ((true)) return network::mojom::AttributionSupport::kNone;
// WebView only supports OS-level attribution and not web-attribution.
switch (state) {
case AttributionReportingOsApiState::kDisabled:
@@ -1368,6 +1369,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed(
const url::Origin* destination_origin,
const url::Origin* reporting_origin,
bool* can_bypass) {
+ if ((true))
+ return false;
AwBrowserContext* aw_context =
static_cast<AwBrowserContext*>(browser_context);
// WebView only supports OS-level attribution and not web-attribution.
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
index 8c715428f0a52..8553e7fdfbee4 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -201,7 +201,7 @@ public class AwSettings {
private boolean mSpatialNavigationEnabled; // Default depends on device features.
private boolean mEnableSupportedHardwareAcceleratedFeatures;
private int mMixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW;
- private int mAttributionBehavior = AttributionBehavior.APP_SOURCE_AND_WEB_TRIGGER;
+ private int mAttributionBehavior = AttributionBehavior.DISABLED;
@SpeculativeLoadingAllowedFlags
private int mSpeculativeLoadingAllowedFlags =
@@ -1813,7 +1813,7 @@ public class AwSettings {
public void setAttributionBehavior(@AttributionBehavior int behavior) {
synchronized (mAwSettingsLock) {
if (mAttributionBehavior != behavior) {
- mAttributionBehavior = behavior;
+ mAttributionBehavior = AttributionBehavior.DISABLED;
mEventHandler.updateWebkitPreferencesLocked();
}
}
diff --git a/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml b/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml
index 512b7bf3bdc0d..4fcbc89f7f7ad 100644
--- a/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml
+++ b/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml
@@ -190,9 +190,6 @@
android:exported="true">
</activity>
- <property android:name="android.adservices.AD_SERVICES_CONFIG"
- android:resource="@xml/ad_services_config" />
-
<service android:name="android.webkit.MetaDataHolderService"
android:enabled="false"
android:exported="false">
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 1aef3a4966f40..1032de9a5c7ca 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -39,7 +39,6 @@ by a child template that "extends" this file.
<uses-permission-sdk-23 android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission-sdk-23 android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION" />
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_CONNECT"/>
<!--
@@ -1237,9 +1236,6 @@ by a child template that "extends" this file.
android:name="com.google.android.gms.cast.framework.ReconnectionService"
tools:node="remove" />
- <property android:name="android.adservices.AD_SERVICES_CONFIG"
- android:resource="@xml/ad_services_config" />
-
{% set enable_openxr = enable_openxr|default(0) %}
{% if enable_openxr == "true" %}
<!-- launchMode is set to singleTask because there should never be multiple copies of the app running. -->
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
index 6901bab8ed827..311f223b78a63 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
@@ -152,6 +152,8 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate {
// not great to dynamically remove the preference in this way.
case SiteSettingsCategory.Type.ADS:
return SiteSettingsCategory.adsCategoryEnabled();
+ case SiteSettingsCategory.Type.ANTI_ABUSE:
+ return false;
case SiteSettingsCategory.Type.AUTO_DARK_WEB_CONTENT:
return ChromeFeatureList.isEnabled(
ChromeFeatureList.DARKEN_WEBSITES_CHECKBOX_IN_THEMES_SETTING);
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page_index.html b/chrome/browser/resources/settings/privacy_page/privacy_page_index.html
index a293331f085d1..ba32933d1c426 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page_index.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page_index.html
@@ -179,15 +179,6 @@
</settings-ar-page>
</template>
- <template is="dom-if" if="[[renderView_(
- routes_.SITE_SETTINGS_AUTO_VERIFY, currentRoute, inSearchMode)]]"
- update-when-false>
- <settings-anti-abuse-page slot="view" id="siteSettingsAutoVerify"
- data-parent-view-id="privacy"
- route-path$="[[routes_.SITE_SETTINGS_AUTO_VERIFY.path]]">
- </settings-anti-abuse-page>
- </template>
-
<template is="dom-if" if="[[renderView_(
routes_.SITE_SETTINGS_AUTO_PICTURE_IN_PICTURE, currentRoute,
inSearchMode)]]" update-when-false>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
index 00a5445f87711..4ad8d8f38b16a 100644
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -79,7 +79,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS.createChild('smartCardReaders');
}
// </if>
- r.SITE_SETTINGS_AUTO_VERIFY = r.SITE_SETTINGS.createChild('autoVerify');
+ // r.SITE_SETTINGS_AUTO_VERIFY = r.SITE_SETTINGS.createChild('autoVerify');
r.SITE_SETTINGS_BACKGROUND_SYNC =
r.SITE_SETTINGS.createChild('backgroundSync');
r.SITE_SETTINGS_CAMERA = r.SITE_SETTINGS.createChild('camera');
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_page.ts b/chrome/browser/resources/settings/site_settings/site_settings_page.ts
index 4575f9c814d37..94b3bf883c4aa 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings/site_settings_page.ts
@@ -67,6 +67,7 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
route: routes.SITE_SETTINGS_AUTO_VERIFY,
id: Id.ANTI_ABUSE,
label: 'siteSettingsAntiAbuse',
+ shouldShow: () => false,
icon: 'privacy20:person-check',
enabledLabel: 'siteSettingsAntiAbuseEnabledSubLabel',
disabledLabel: 'siteSettingsAntiAbuseDisabledSubLabel',
diff --git a/components/attribution_reporting/aggregatable_trigger_config.cc b/components/attribution_reporting/aggregatable_trigger_config.cc
index 512a652a2f8dc..f68bfbc08b4c1 100644
--- a/components/attribution_reporting/aggregatable_trigger_config.cc
+++ b/components/attribution_reporting/aggregatable_trigger_config.cc
@@ -102,7 +102,7 @@ bool IsValid(SourceRegistrationTimeConfig source_registration_time_config,
base::expected<std::optional<std::string>, TriggerRegistrationError>
ParseTriggerContextId(base::Value* value) {
- if (!value) {
+ if ((true)) {
return std::nullopt;
}
diff --git a/components/attribution_reporting/features.cc b/components/attribution_reporting/features.cc
index b199e7682ad33..a5929da4e4ba1 100644
--- a/components/attribution_reporting/features.cc
+++ b/components/attribution_reporting/features.cc
@@ -11,4 +11,5 @@ namespace attribution_reporting::features {
// Controls whether the Conversion Measurement API infrastructure is enabled.
BASE_FEATURE(kConversionMeasurement, base::FEATURE_ENABLED_BY_DEFAULT);
+SET_CROMITE_FEATURE_DISABLED(kConversionMeasurement);
} // namespace attribution_reporting::features
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
index 164baa1e1de0d..02c5049295765 100644
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -648,7 +648,7 @@ void ContentSettingsRegistry::Init() {
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
PermissionSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY);
- Register(ContentSettingsType::ANTI_ABUSE, "anti-abuse", CONTENT_SETTING_ALLOW,
+ Register(ContentSettingsType::ANTI_ABUSE, "anti-abuse", CONTENT_SETTING_BLOCK,
WebsiteSettingsInfo::SYNCABLE,
/*allowlisted_primary_schemes=*/{},
/*valid_settings=*/{CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK},
diff --git a/components/embedder_support/origin_trials/features.cc b/components/embedder_support/origin_trials/features.cc
index df26d9e881731..89237d70dcf4b 100644
--- a/components/embedder_support/origin_trials/features.cc
+++ b/components/embedder_support/origin_trials/features.cc
@@ -15,4 +15,5 @@ namespace embedder_support {
// from the origin trial.
BASE_FEATURE(kOriginTrialsSampleAPIThirdPartyAlternativeUsage,
base::FEATURE_ENABLED_BY_DEFAULT);
+SET_CROMITE_FEATURE_DISABLED(kOriginTrialsSampleAPIThirdPartyAlternativeUsage);
} // namespace embedder_support
diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc
index ad4a62e7b5296..87d4ac9560279 100644
--- a/components/renderer_context_menu/render_view_context_menu_base.cc
+++ b/components/renderer_context_menu/render_view_context_menu_base.cc
@@ -541,9 +541,6 @@ RenderViewContextMenuBase::GetOpenURLParamsWithExtraHeaders(
open_url_params.source_site_instance = site_instance_;
- if (disposition != WindowOpenDisposition::OFF_THE_RECORD)
- open_url_params.impression = params_.impression;
-
return open_url_params;
}
diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b/content/browser/aggregation_service/aggregatable_report_sender.cc
index bdec3320a8416..062360fc938ca 100644
--- a/content/browser/aggregation_service/aggregatable_report_sender.cc
+++ b/content/browser/aggregation_service/aggregatable_report_sender.cc
@@ -192,13 +192,8 @@ void AggregatableReportSender::SendReport(GURL url,
// Allow bodies of non-2xx responses to be returned.
simple_url_loader_ptr->SetAllowHttpErrorResults(true);
- // Unretained is safe because the URLLoader is owned by `this` and will be
- // deleted before `this`.
- simple_url_loader_ptr->DownloadHeadersOnly(
- url_loader_factory_.get(),
- base::BindOnce(&AggregatableReportSender::OnReportSent,
- base::Unretained(this), std::move(it), std::move(callback),
- delay_type, std::move(serialized_url)));
+ // this is never called on Bromite but nothing would be sent if it were
+ OnReportSent(std::move(it), std::move(callback), delay_type, std::move(serialized_url), nullptr);
}
void AggregatableReportSender::OnReportSent(
@@ -206,7 +201,11 @@ void AggregatableReportSender::OnReportSent(
ReportSentCallback callback,
std::optional<DelayType> delay_type,
std::string serialized_url,
- scoped_refptr<net::HttpResponseHeaders> headers) {
+ scoped_refptr<net::HttpResponseHeaders> headers) { // disable in Bromite
+ if ((true)) {
+ std::move(callback).Run(RequestStatus::kOk);
+ return;
+ }
std::optional<int> http_response_code;
if (headers) {
http_response_code = headers->response_code();
diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc
index 22ab0c5753cd1..05c3871701542 100644
--- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc
+++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc
@@ -787,11 +787,9 @@ class AttributionDataHostManagerImpl::PendingRegistrationData {
headers->GetNormalizedHeader(
attribution_reporting::kAttributionReportingRegisterTriggerHeader);
- std::optional<std::string> os_source_header = headers->GetNormalizedHeader(
- attribution_reporting::kAttributionReportingRegisterOsSourceHeader);
+ std::optional<std::string> os_source_header;
- std::optional<std::string> os_trigger_header = headers->GetNormalizedHeader(
- attribution_reporting::kAttributionReportingRegisterOsTriggerHeader);
+ std::optional<std::string> os_trigger_header;
const bool has_source =
web_source_header.has_value() || os_source_header.has_value();
@@ -1143,6 +1141,8 @@ void AttributionDataHostManagerImpl::ParseHeader(
Registrations& registrations,
HeaderPendingDecode pending_decode,
Registrar registrar) {
+ if ((true)) return;
+
switch (registrations.eligibility()) {
case RegistrationEligibility::kSourceOrTrigger:
break;
diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content/browser/attribution_reporting/attribution_host.cc
index b5b953c589e6b..22fc404a8993e 100644
--- a/content/browser/attribution_reporting/attribution_host.cc
+++ b/content/browser/attribution_reporting/attribution_host.cc
@@ -136,8 +136,6 @@ AttributionHost::AttributionHost(WebContents* web_contents)
// AttributionInputEventTrackerAndroid without a native view will crash. For
// now, just disable this code if the view is null.
if (web_contents->GetNativeView()) {
- input_event_tracker_android_ =
- std::make_unique<AttributionInputEventTrackerAndroid>(web_contents);
}
#endif
}
@@ -347,6 +345,7 @@ void AttributionHost::NotifyNavigationRegistrationData(
return;
}
+ if ((true)) return;
auto* attribution_manager =
AttributionManager::FromWebContents(web_contents());
CHECK(attribution_manager);
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.cc b/content/browser/attribution_reporting/attribution_manager_impl.cc
index d44b4603f36dc..402ee1b966c96 100644
--- a/content/browser/attribution_reporting/attribution_manager_impl.cc
+++ b/content/browser/attribution_reporting/attribution_manager_impl.cc
@@ -523,11 +523,7 @@ bool IsOperationAllowed(
}
std::unique_ptr<AttributionOsLevelManager> CreateOsLevelManager() {
-#if BUILDFLAG(IS_ANDROID)
- return std::make_unique<AttributionOsLevelManagerAndroid>();
-#else
return std::make_unique<NoOpAttributionOsLevelManager>();
-#endif
}
base::Time GetReportExpiryTime(const AttributionReport& report) {
diff --git a/content/browser/attribution_reporting/attribution_os_level_manager.cc b/content/browser/attribution_reporting/attribution_os_level_manager.cc
index 21787d459d6dd..2d21801d7876f 100644
--- a/content/browser/attribution_reporting/attribution_os_level_manager.cc
+++ b/content/browser/attribution_reporting/attribution_os_level_manager.cc
@@ -46,6 +46,7 @@ std::optional<ApiState> g_state GUARDED_BY_CONTEXT(GetSequenceChecker());
// static
bool AttributionOsLevelManager::ShouldInitializeApiState() {
+ if ((true)) return false;
DCHECK_CALLED_ON_VALID_SEQUENCE(GetSequenceChecker());
if (g_state.has_value()) {
return false;
@@ -57,7 +58,7 @@ bool AttributionOsLevelManager::ShouldInitializeApiState() {
// static
ApiState AttributionOsLevelManager::GetApiState() {
DCHECK_CALLED_ON_VALID_SEQUENCE(GetSequenceChecker());
- return g_state.value_or(ApiState::kDisabled);
+ return ApiState::kDisabled;
}
// static
diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc
index 90de9f69bf11c..b9da1d0291ab1 100644
--- a/content/browser/attribution_reporting/attribution_report_network_sender.cc
+++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc
@@ -117,6 +117,9 @@ void AttributionReportNetworkSender::SendReport(GURL url,
url::Origin origin,
std::string body,
UrlLoaderCallback callback) {
+ // this is never called on Bromite but nothing would be sent if it were
+ if ((true)) return;
+
auto resource_request = std::make_unique<network::ResourceRequest>();
resource_request->url = std::move(url);
resource_request->method = net::HttpRequestHeaders::kPostMethod;
@@ -192,6 +195,12 @@ void AttributionReportNetworkSender::OnReportSent(
ReportSentCallback sent_callback,
UrlLoaderList::iterator it,
scoped_refptr<net::HttpResponseHeaders> headers) {
+ if ((true)) {
+ std::move(sent_callback)
+ .Run(report,
+ SendResult::Sent(SendResult::Sent::Result::kSent, 200));
+ return;
+ }
network::SimpleURLLoader* loader = it->get();
const int net_error = loader->NetError();
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc
index 6bb9cb3997a04..80688b77f79bd 100644
--- a/content/browser/attribution_reporting/attribution_storage_sql.cc
+++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
@@ -534,6 +534,8 @@ void AssignSourceForDeactivationOrDeletion(
}
}
+bool g_run_in_memory = true;
+
} // namespace
// static
@@ -556,9 +558,9 @@ bool AttributionStorageSql::Transaction::Commit() {
AttributionStorageSql::AttributionStorageSql(
const base::FilePath& user_data_directory,
AttributionResolverDelegate* delegate)
- : path_to_database_(user_data_directory.empty()
- ? base::FilePath()
- : DatabasePath(user_data_directory)),
+ : path_to_database_(user_data_directory.empty() || g_run_in_memory
+ ? base::FilePath()
+ : DatabasePath(user_data_directory)),
db_(sql::DatabaseOptions().set_cache_size(32),
/*tag=*/"Conversions"),
delegate_(delegate),
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 2d8a70f5fc0f6..ea9fa11e29e8b 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10639,6 +10639,7 @@ bool RenderFrameHostImpl::IsFencedFrameReportingFromRendererAllowed(
return false;
}
+ if ((true)) return false;
if (!IsActive()) {
// reportEvent is not allowed when this RenderFrameHost or one of its
// ancestors is not active.
@@ -14818,6 +14819,16 @@ void RenderFrameHostImpl::BindTrustTokenQueryAnswerer(
return;
}
+ // flags are enforced in benign renderers by the
+ // RuntimeEnabled=PrivateStateTokens IDL attribute (the base::Feature's value
+ // is tied to the RuntimeEnabledFeature's).
+ if ((true)) {
+ mojo::ReportBadMessage(
+ "Attempted to get a TrustTokenQueryAnswerer with Private State Tokens "
+ "disabled.");
+ return;
+ }
+
// TODO(crbug.com/40729410): Document.hasPrivateToken is restricted to
// secure contexts, so we could additionally add a check verifying that the
// bind request "is coming from a secure context"---but there's currently no
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index c3e9ef303ee96..322e1e8449b16 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -1512,15 +1512,6 @@ void StoragePartitionImpl::Initialize(
bucket_manager_ = std::make_unique<BucketManager>(this);
- if (base::FeatureList::IsEnabled(
- attribution_reporting::features::kConversionMeasurement)) {
- // The Conversion Measurement API is not available in Incognito mode, but
- // this is enforced by the `AttributionManagerImpl` itself for better error
- // reporting and metrics.
- attribution_manager_ = std::make_unique<AttributionManagerImpl>(
- this, path, special_storage_policy_);
- }
-
if (base::FeatureList::IsEnabled(network::features::kInterestGroupStorage)) {
// Auction worklets on non-Android use dedicated processes; on Android due
// to high cost of process launch they try to reuse renderers.
@@ -1572,9 +1563,6 @@ void StoragePartitionImpl::Initialize(
font_access_manager_ = FontAccessManager::Create();
- aggregation_service_ =
- std::make_unique<AggregationServiceImpl>(is_in_memory(), path, this);
-
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (is_in_memory()) {
// Pass an empty path if in_memory so that CdmStorage.db is not stored on
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
index c6ea08786bf2a..81a718a5f05a8 100644
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -213,8 +213,6 @@ android_library("content_full_java") {
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_collection_collection_java",
"//third_party/androidx:androidx_core_core_java",
- "//third_party/androidx:androidx_privacysandbox_ads_ads_adservices_java",
- "//third_party/androidx:androidx_privacysandbox_ads_ads_adservices_java_java",
"//third_party/androidx/local_modifications/window:window_util_java",
"//third_party/blink/public:blink_headers_java",
"//third_party/blink/public/common:common_java",
diff --git a/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java b/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java
index 85cabdbd730a0..4e2dc6dc1b3bd 100644
--- a/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java
+++ b/content/public/android/java/src/org/chromium/content/browser/AttributionOsLevelManager.java
@@ -15,18 +15,6 @@ import android.view.MotionEvent;
import androidx.annotation.IntDef;
import androidx.annotation.OptIn;
-import androidx.privacysandbox.ads.adservices.java.measurement.MeasurementManagerFutures;
-import androidx.privacysandbox.ads.adservices.measurement.DeletionRequest;
-import androidx.privacysandbox.ads.adservices.measurement.SourceRegistrationRequest;
-import androidx.privacysandbox.ads.adservices.measurement.WebSourceParams;
-import androidx.privacysandbox.ads.adservices.measurement.WebSourceRegistrationRequest;
-import androidx.privacysandbox.ads.adservices.measurement.WebTriggerParams;
-import androidx.privacysandbox.ads.adservices.measurement.WebTriggerRegistrationRequest;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
import org.jni_zero.CalledByNative;
import org.jni_zero.JNINamespace;
@@ -61,6 +49,10 @@ import java.util.concurrent.TimeoutException;
@JNINamespace("content")
@NullMarked
public class AttributionOsLevelManager {
+ private class MeasurementManagerFutures {}
+ private class WebTriggerParams {}
+ private class WebSourceParams {}
+
private static final String TAG = "AttributionManager";
// TODO: replace with constant in android.Manifest.permission once it becomes available in U.
private static final String PERMISSION_ACCESS_ADSERVICES_ATTRIBUTION =
@@ -145,100 +137,11 @@ public class AttributionOsLevelManager {
}
private static boolean supportsAttribution() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.R;
- }
-
- private static @OperationResult int getOperationResultFromMessage(@Nullable String message) {
- if (message == null) {
- return OperationResult.ERROR_UNKNOWN;
- } else {
- String lowerMessage = message.toLowerCase(Locale.US);
- if (lowerMessage.contains("background")) {
- return OperationResult.ERROR_BACKGROUND_CALLER;
- } else if (lowerMessage.contains("unable to find the service")) {
- return OperationResult.ERROR_SERVICE_NOT_FOUND;
- } else if (lowerMessage.contains("service is not available")) {
- return OperationResult.ERROR_SERVICE_UNAVAILABLE;
- } else if (lowerMessage.contains("api rate limit exceeded")) {
- return OperationResult.ERROR_API_RATE_LIMIT_EXCEEDED;
- } else if (lowerMessage.contains("server rate limit exceeded")) {
- return OperationResult.ERROR_SERVER_RATE_LIMIT_EXCEEDED;
- } else if (lowerMessage.contains(
- "caller is not authorized to access information from another user")) {
- return OperationResult.ERROR_CALLER_NOT_ALLOWED_TO_CROSS_USER_BOUNDARIES;
- } else if (lowerMessage.contains(
- "caller is not allowed to perform this operation on behalf of the given"
- + " package")) {
- return OperationResult.ERROR_CALLER_NOT_ALLOWED_ON_BEHALF;
- } else if (lowerMessage.contains("permission was not requested")) {
- return OperationResult.ERROR_PERMISSION_NOT_REQUESTED;
- } else if (lowerMessage.contains("caller is not allowed")) {
- return OperationResult.ERROR_CALLER_NOT_ALLOWED;
- } else if (lowerMessage.contains("api time out")) {
- return OperationResult.ERROR_TIMEOUT;
- } else if (lowerMessage.contains("failed to encrypt responses")) {
- return OperationResult.ERROR_ENCRYPTION_FAILURE;
- } else if (lowerMessage.contains(
- "service received an invalid object from the server")) {
- return OperationResult.ERROR_INVALID_OBJECT;
- } else {
- return OperationResult.ERROR_UNKNOWN;
- }
- }
- }
-
- private static @OperationResult int convertToOperationResult(Throwable thrown) {
- @OperationResult int result = getOperationResultFromMessage(thrown.getMessage());
- if (result != OperationResult.ERROR_UNKNOWN) {
- return result;
- } else if (thrown instanceof IllegalArgumentException) {
- return OperationResult.ERROR_ILLEGAL_ARGUMENT;
- } else if (thrown instanceof IOException) {
- return OperationResult.ERROR_IO;
- } else if (thrown instanceof IllegalStateException) {
- return OperationResult.ERROR_ILLEGAL_STATE;
- } else if (thrown instanceof SecurityException) {
- return OperationResult.ERROR_SECURITY;
- } else if (thrown instanceof TimeoutException) {
- return OperationResult.ERROR_TIMEOUT;
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
- && thrown instanceof LimitExceededException) {
- return OperationResult.ERROR_LIMIT_EXCEEDED;
- } else if (thrown instanceof InvalidObjectException) {
- return OperationResult.ERROR_INVALID_OBJECT;
- } else {
- return OperationResult.ERROR_UNKNOWN;
- }
+ return false;
}
private static void recordOperationResult(
@OperationType int type, @OperationResult int result) {
- String suffix = "";
- switch (type) {
- case OperationType.REGISTER_SOURCE:
- suffix = "RegisterSource";
- break;
- case OperationType.REGISTER_WEB_SOURCE:
- suffix = "RegisterWebSource";
- break;
- case OperationType.REGISTER_TRIGGER:
- suffix = "RegisterTrigger";
- break;
- case OperationType.REGISTER_WEB_TRIGGER:
- suffix = "RegisterWebTrigger";
- break;
- case OperationType.GET_MEASUREMENT_API_STATUS:
- suffix = "GetMeasurementApiStatus";
- break;
- case OperationType.DELETE_REGISTRATIONS:
- suffix = "DeleteRegistrations";
- break;
- }
-
- assert suffix.length() > 0;
-
- RecordHistogram.recordEnumeratedHistogram(
- "Conversions.AndroidOperationResult2." + suffix, result, OperationResult.COUNT);
}
@CalledByNative
@@ -247,22 +150,7 @@ public class AttributionOsLevelManager {
}
private @Nullable MeasurementManagerFutures getManager() {
- if (!supportsAttribution()) {
- return null;
- }
- if (sManagerForTesting != null) {
- return sManagerForTesting;
- }
- if (mManager != null) {
- return mManager;
- }
- try {
- mManager = MeasurementManagerFutures.from(ContextUtils.getApplicationContext());
- } catch (Throwable t) {
- // An error may be thrown if android.ext.adservices is not loaded.
- Log.i(TAG, "Failed to get measurement manager", t);
- }
- return mManager;
+ return null;
}
private void onRegistrationCompleted(
@@ -276,28 +164,6 @@ public class AttributionOsLevelManager {
}
}
- private void addRegistrationFutureCallback(
- int requestId, @OperationType int type, ListenableFuture<?> future) {
- if (!supportsAttribution()) {
- return;
- }
- Futures.addCallback(
- future,
- new FutureCallback<Object>() {
- @Override
- public void onSuccess(@Nullable Object result) {
- onRegistrationCompleted(requestId, type, OperationResult.SUCCESS);
- }
-
- @Override
- public void onFailure(Throwable thrown) {
- Log.w(TAG, "Failed to register", thrown);
- onRegistrationCompleted(requestId, type, convertToOperationResult(thrown));
- }
- },
- PostTask.getUiBestEffortExecutor());
- }
-
@CalledByNative
private static @Nullable List<WebSourceParams> createWebSourceParamsList(int size) {
if (!supportsAttribution()) {
@@ -312,7 +178,6 @@ public class AttributionOsLevelManager {
if (!supportsAttribution()) {
return;
}
- list.add(new WebSourceParams(Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed));
}
/**
@@ -329,32 +194,12 @@ public class AttributionOsLevelManager {
OperationResult.ERROR_VERSION_UNSUPPORTED);
return;
}
- MeasurementManagerFutures mm = getManager();
- if (mm == null) {
- onRegistrationCompleted(
- requestId, OperationType.REGISTER_WEB_SOURCE, OperationResult.ERROR_INTERNAL);
- return;
- }
- ListenableFuture<?> future =
- mm.registerWebSourceAsync(
- new WebSourceRegistrationRequest(
- sources,
- Uri.parse(topLevelOrigin.getSpec()),
- /* inputEvent= */ event,
- /* appDestination= */ null,
- /* webDestination= */ null,
- /* verifiedDestination= */ null));
- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_SOURCE, future);
}
/**
* Registers an attribution source with native, see `registerSourceAsync()`:
* https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/java/measurement/MeasurementManagerFutures.
*/
- @OptIn(
- markerClass =
- androidx.privacysandbox.ads.adservices.common.ExperimentalFeatures
- .RegisterSourceOptIn.class)
@CalledByNative
private void registerAttributionSource(
int requestId, @JniType("std::vector") GURL[] registrationUrls, MotionEvent event) {
@@ -365,37 +210,16 @@ public class AttributionOsLevelManager {
OperationResult.ERROR_VERSION_UNSUPPORTED);
return;
}
- MeasurementManagerFutures mm = getManager();
- if (mm == null) {
- onRegistrationCompleted(
- requestId, OperationType.REGISTER_SOURCE, OperationResult.ERROR_INTERNAL);
- return;
- }
-
- ArrayList<Uri> registrationUris = new ArrayList<Uri>(registrationUrls.length);
- for (GURL registrationUrl : registrationUrls) {
- registrationUris.add(Uri.parse(registrationUrl.getSpec()));
- }
- ListenableFuture<?> future =
- mm.registerSourceAsync(new SourceRegistrationRequest(registrationUris, event));
- addRegistrationFutureCallback(requestId, OperationType.REGISTER_SOURCE, future);
}
@CalledByNative
private static @Nullable List<WebTriggerParams> createWebTriggerParamsList(int size) {
- if (!supportsAttribution()) {
- return null;
- }
- return new ArrayList<WebTriggerParams>(size);
+ return null;
}
@CalledByNative
private static void addWebTriggerParams(
List<WebTriggerParams> list, GURL registrationUrl, boolean isDebugKeyAllowed) {
- if (!supportsAttribution()) {
- return;
- }
- list.add(new WebTriggerParams(Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed));
}
/**
@@ -412,18 +236,6 @@ public class AttributionOsLevelManager {
OperationResult.ERROR_VERSION_UNSUPPORTED);
return;
}
-
- MeasurementManagerFutures mm = getManager();
- if (mm == null) {
- onRegistrationCompleted(
- requestId, OperationType.REGISTER_WEB_TRIGGER, OperationResult.ERROR_INTERNAL);
- return;
- }
- ListenableFuture<?> future =
- mm.registerWebTriggerAsync(
- new WebTriggerRegistrationRequest(
- triggers, Uri.parse(topLevelOrigin.getSpec())));
- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_TRIGGER, future);
}
/**
@@ -439,15 +251,6 @@ public class AttributionOsLevelManager {
OperationResult.ERROR_VERSION_UNSUPPORTED);
return;
}
-
- MeasurementManagerFutures mm = getManager();
- if (mm == null) {
- onRegistrationCompleted(
- requestId, OperationType.REGISTER_TRIGGER, OperationResult.ERROR_INTERNAL);
- return;
- }
- ListenableFuture<?> future = mm.registerTriggerAsync(Uri.parse(registrationUrl.getSpec()));
- addRegistrationFutureCallback(requestId, OperationType.REGISTER_TRIGGER, future);
}
private void onDataDeletionCompleted(int requestId) {
@@ -482,96 +285,7 @@ public class AttributionOsLevelManager {
onDataDeletionCompleted(requestId);
return;
}
-
- // Currently Android and Chromium have different matching behaviors when both
- // `origins` and `domains` are empty.
- // Chromium: Delete -> Delete nothing; Preserve -> Delete all.
- // Android: Delete -> Delete all; Preserve -> Delete nothing.
- // Android may fix the behavior in the future. As a workaround, Chromium will
- // not call Android if it's to delete nothing (no-op), and call Android with
- // both Delete and Preserve modes if it's to delete all. These two modes will
- // be one no-op and one delete all in Android releases with and without the
- // fix. See crbug.com/1442967.
-
- ImmutableList<Integer> matchBehaviors = null;
-
- if (origins.length == 0 && domains.length == 0) {
- switch (matchBehavior) {
- case DeletionRequest.MATCH_BEHAVIOR_DELETE:
- recordOperationResult(
- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS);
- onDataDeletionCompleted(requestId);
- return;
- case DeletionRequest.MATCH_BEHAVIOR_PRESERVE:
- matchBehaviors =
- ImmutableList.of(
- DeletionRequest.MATCH_BEHAVIOR_DELETE,
- DeletionRequest.MATCH_BEHAVIOR_PRESERVE);
- break;
- default:
- Log.e(TAG, "Received invalid match behavior: ", matchBehavior);
- recordOperationResult(
- OperationType.DELETE_REGISTRATIONS, OperationResult.ERROR_UNKNOWN);
- onDataDeletionCompleted(requestId);
- return;
- }
- } else {
- matchBehaviors = ImmutableList.of(matchBehavior);
- }
-
- ArrayList<Uri> originUris = new ArrayList<Uri>(origins.length);
- for (GURL origin : origins) {
- originUris.add(Uri.parse(origin.getSpec()));
- }
-
- ArrayList<Uri> domainUris = new ArrayList<Uri>(domains.length);
- for (String domain : domains) {
- domainUris.add(Uri.parse(domain));
- }
-
- int numCalls = matchBehaviors.size();
-
- FutureCallback<Object> callback =
- new FutureCallback<Object>() {
- private int mNumPendingCalls = numCalls;
-
- private void onCall() {
- if (--mNumPendingCalls == 0) {
- onDataDeletionCompleted(requestId);
- }
- }
-
- @Override
- public void onSuccess(@Nullable Object result) {
- recordOperationResult(
- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS);
- onCall();
- }
-
- @Override
- public void onFailure(Throwable thrown) {
- Log.w(TAG, "Failed to delete measurement API data", thrown);
- recordOperationResult(
- OperationType.DELETE_REGISTRATIONS,
- convertToOperationResult(thrown));
- onCall();
- }
- };
-
- for (int currMatchBehavior : matchBehaviors) {
- ListenableFuture<?> future =
- mm.deleteRegistrationsAsync(
- new DeletionRequest(
- deletionMode,
- currMatchBehavior,
- Instant.ofEpochMilli(startMs),
- Instant.ofEpochMilli(endMs),
- domainUris,
- originUris));
-
- Futures.addCallback(
- future, callback, PostTask.getUiUserVisibleExecutor());
- }
+ onDataDeletionCompleted(requestId);
}
private static void onMeasurementStateReturned(int status, @OperationResult int result) {
@@ -587,6 +301,10 @@ public class AttributionOsLevelManager {
private static void getMeasurementApiStatus() {
ThreadUtils.assertOnBackgroundThread();
+ if ((true)) {
+ AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);
+ return;
+ }
if (sManagerForTesting != null) {
AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1);
return;
@@ -606,49 +324,6 @@ public class AttributionOsLevelManager {
onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_PERMISSION_UNGRANTED);
return;
}
- MeasurementManagerFutures mm = null;
- try {
- mm = MeasurementManagerFutures.from(ContextUtils.getApplicationContext());
- } catch (Throwable t) {
- // An error may be thrown if android.ext.adservices is not loaded.
- Log.i(TAG, "Failed to get measurement manager", t);
- }
-
- if (mm == null) {
- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL);
- return;
- }
-
- ListenableFuture<Integer> future = null;
- try {
- future = mm.getMeasurementApiStatusAsync();
- } catch (IllegalStateException ex) {
- // An illegal state exception may be thrown for some versions of the underlying
- // Privacy Sandbox SDK.
- Log.i(TAG, "Failed to get measurement API status", ex);
- }
-
- if (future == null) {
- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL);
- return;
- }
-
- Futures.addCallback(
- future,
- new FutureCallback<Integer>() {
- @Override
- public void onSuccess(@Nullable Integer status) {
- onMeasurementStateReturned(assumeNonNull(status), OperationResult.SUCCESS);
- }
-
- @Override
- public void onFailure(Throwable thrown) {
- Log.w(TAG, "Failed to get measurement API status", thrown);
- onMeasurementStateReturned(
- /* status= */ 0, convertToOperationResult(thrown));
- }
- },
- PostTask.getUiUserBlockingExecutor());
}
@CalledByNative
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index d6b69893dd3cc..cd68c2e3a95d9 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -644,6 +644,7 @@ void ContentBrowserClient::OnAuctionComplete(
network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport(
AttributionReportingOsApiState state,
bool client_os_disabled) {
+ if ((true)) return network::mojom::AttributionSupport::kNone;
switch (state) {
case AttributionReportingOsApiState::kDisabled:
return network::mojom::AttributionSupport::kWeb;
@@ -661,13 +662,13 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed(
const url::Origin* destination_origin,
const url::Origin* reporting_origin,
bool* can_bypass) {
- return true;
+ return false;
}
ContentBrowserClient::AttributionReportingOsRegistrars
ContentBrowserClient::GetAttributionReportingOsRegistrars(
WebContents* web_contents) {
- return {AttributionReportType::kWeb, AttributionReportType::kWeb};
+ return {AttributionReportType::kDisabled, AttributionReportType::kDisabled};
}
bool ContentBrowserClient::IsAttributionReportingAllowedForContext(
@@ -675,7 +676,7 @@ bool ContentBrowserClient::IsAttributionReportingAllowedForContext(
content::RenderFrameHost* rfh,
const url::Origin& context_origin,
const url::Origin& reporting_origin) {
- return true;
+ return false;
}
bool ContentBrowserClient::IsSharedStorageAllowed(
diff --git a/content/public/browser/navigation_controller.cc b/content/public/browser/navigation_controller.cc
index 4ef54807744e9..ff359411de028 100644
--- a/content/public/browser/navigation_controller.cc
+++ b/content/public/browser/navigation_controller.cc
@@ -40,7 +40,6 @@ NavigationController::LoadURLParams::LoadURLParams(const OpenURLParams& input)
blob_url_loader_factory(input.blob_url_loader_factory),
href_translate(input.href_translate),