From 6dfe5f012d2bcce0a3a05d9a5820f51a8f120c99 Mon Sep 17 00:00:00 2001 From: John Turpish Date: Mon, 23 Sep 2024 17:23:43 -0400 Subject: [PATCH] CMAKE_CLANG_TIDY is optional. Default off. Version not required. Fixes #123 --- .github/tour.sh | 39 ++- .gitignore | 1 + CMakeLists.txt | 3 +- ...me_autocomplete_scheme_classifier.cc.patch | 50 ---- .../chrome_content_browser_client.cc.patch | 77 ----- .../common/chrome_content_client.cc.patch | 17 -- .../components/cbor/values.cc.patch | 145 --------- .../components/cbor/values.h.patch | 79 ----- .../components/cbor/writer.cc.patch | 14 - .../components/cbor/writer_unittest.cc.patch | 36 --- .../125.0.6368.2/url/url_canon.h.patch | 28 -- .../125.0.6368.2/url/url_canon_ipfs.cc | 55 ---- .../125.0.6368.2/url/url_util.cc.patch | 22 -- .../chrome/browser/BUILD.gn.patch | 27 -- .../chrome/browser/about_flags.cc.patch | 38 --- .../browser/prefs/browser_prefs.cc.patch | 37 --- .../components/cbor/reader.cc.patch | 44 --- .../components/cbor/reader.h.patch | 26 -- .../clipboard_recent_content_generic.cc.patch | 13 - .../125.0.6382.3/url/BUILD.gn.patch | 32 -- .../125.0.6382.3/url/url_canon.h.patch | 28 -- .../125.0.6382.3/url/url_canon_ipfs.cc | 55 ---- .../125.0.6382.3/url/url_util.cc.patch | 22 -- .../chrome_content_browser_client.cc.patch | 77 ----- .../chrome/browser/flag_descriptions.h.patch | 24 -- .../net/dns/dns_config_service_linux.cc.patch | 18 -- .../125.0.6396.3/url/url_canon.h.patch | 28 -- .../125.0.6396.3/url/url_canon_ipfs.cc | 55 ---- .../125.0.6396.3/url/url_util.cc.patch | 22 -- ...me_autocomplete_scheme_classifier.cc.patch | 50 ---- .../chrome/browser/flag-metadata.json.patch | 16 - .../chrome/browser/flag_descriptions.cc.patch | 16 - .../chrome/browser/flag_descriptions.h.patch | 24 -- .../chrome/browser/ipfs_extra_parts.cc | 10 - .../chrome/browser/ipfs_extra_parts.h | 10 - .../components/cbor/reader.cc.patch | 44 --- .../components/cbor/reader.h.patch | 26 -- .../components/cbor/reader_unittest.cc.patch | 47 --- .../components/cbor/values.cc.patch | 145 --------- .../components/cbor/values.h.patch | 79 ----- .../components/cbor/writer.cc.patch | 14 - .../components/cbor/writer_unittest.cc.patch | 36 --- .../net/dns/dns_config_service_linux.cc.patch | 18 -- .../weborigin/scheme_registry.cc.patch | 13 - .../125.0.6412.0/url/BUILD.gn.patch | 32 -- .../125.0.6412.0/url/url_canon.h.patch | 28 -- .../125.0.6412.0/url/url_canon_ipfs.cc | 55 ---- .../125.0.6412.0/url/url_util.cc.patch | 17 -- .../chrome/browser/BUILD.gn.patch | 27 -- .../chrome/browser/about_flags.cc.patch | 38 --- ...me_autocomplete_scheme_classifier.cc.patch | 50 ---- .../chrome_content_browser_client.cc.patch | 77 ----- .../chrome/browser/flag-metadata.json.patch | 16 - .../chrome/browser/flag_descriptions.cc.patch | 16 - .../chrome/browser/flag_descriptions.h.patch | 24 -- .../chrome/browser/ipfs_extra_parts.cc | 10 - .../chrome/browser/ipfs_extra_parts.h | 10 - .../browser/prefs/browser_prefs.cc.patch | 37 --- .../common/chrome_content_client.cc.patch | 17 -- .../components/cbor/reader.cc.patch | 44 --- .../components/cbor/reader.h.patch | 26 -- .../components/cbor/reader_unittest.cc.patch | 47 --- .../components/cbor/values.cc.patch | 145 --------- .../components/cbor/values.h.patch | 79 ----- .../components/cbor/writer.cc.patch | 14 - .../components/cbor/writer_unittest.cc.patch | 36 --- .../clipboard_recent_content_generic.cc.patch | 13 - .../net/dns/dns_config_service_linux.cc.patch | 18 -- .../weborigin/scheme_registry.cc.patch | 13 - .../125.0.6420.4/url/BUILD.gn.patch | 32 -- .../125.0.6420.4/url/url_canon.h.patch | 28 -- .../125.0.6420.4/url/url_canon_ipfs.cc | 55 ---- .../125.0.6420.4/url/url_util.cc.patch | 17 -- .../chrome/browser/BUILD.gn.patch | 27 -- .../chrome/browser/about_flags.cc.patch | 38 --- .../chrome/browser/flag-metadata.json.patch | 16 - .../chrome/browser/flag_descriptions.cc.patch | 16 - .../chrome/browser/ipfs_extra_parts.cc | 10 - .../chrome/browser/ipfs_extra_parts.h | 10 - .../browser/prefs/browser_prefs.cc.patch | 37 --- .../common/chrome_content_client.cc.patch | 17 -- .../components/cbor/reader_unittest.cc.patch | 47 --- .../clipboard_recent_content_generic.cc.patch | 13 - .../weborigin/scheme_registry.cc.patch | 13 - .../129.0.6628.3/url/url_util.cc.patch | 18 -- .../chrome/browser/BUILD.gn.patch | 16 +- .../chrome/browser/about_flags.cc.patch | 8 +- ...me_autocomplete_scheme_classifier.cc.patch | 0 .../chrome_content_browser_client.cc.patch | 12 +- .../chrome/browser/flag-metadata.json.patch | 6 +- .../chrome/browser/flag_descriptions.cc.patch | 4 +- .../chrome/browser/flag_descriptions.h.patch | 4 +- .../chrome/browser/ipfs_extra_parts.cc | 0 .../chrome/browser/ipfs_extra_parts.h | 0 .../browser/prefs/browser_prefs.cc.patch | 17 +- .../browser/shell_integration_mac.mm.patch | 13 + .../common/chrome_content_client.cc.patch | 4 +- .../linux/common/desktop.template.patch | 13 + .../chrome/installer/util/shell_util.cc.patch | 20 ++ .../components/cbor/reader.cc.patch | 0 .../components/cbor/reader.h.patch | 0 .../components/cbor/reader_unittest.cc.patch | 0 .../components/cbor/values.cc.patch | 12 +- .../components/cbor/values.h.patch | 0 .../components/cbor/writer.cc.patch | 0 .../components/cbor/writer_unittest.cc.patch | 0 .../clipboard_recent_content_generic.cc.patch | 2 +- .../net/dns/dns_config_service_linux.cc.patch | 0 .../weborigin/scheme_registry.cc.patch | 8 +- .../url/BUILD.gn.patch | 0 .../url/url_canon.h.patch | 2 +- .../url/url_canon_ipfs.cc | 0 .../130.0.6723.6/url/url_util.cc.patch | 45 +++ .../chrome/browser/BUILD.gn.patch | 16 +- .../chrome/browser/about_flags.cc.patch | 8 +- ...me_autocomplete_scheme_classifier.cc.patch | 29 +- .../chrome_content_browser_client.cc.patch | 24 +- .../chrome/browser/flag-metadata.json.patch | 6 +- .../chrome/browser/flag_descriptions.cc.patch | 4 +- .../chrome/browser/flag_descriptions.h.patch | 6 +- .../chrome/browser/ipfs_extra_parts.cc | 0 .../chrome/browser/ipfs_extra_parts.h | 0 .../browser/prefs/browser_prefs.cc.patch | 17 +- .../browser/shell_integration_mac.mm.patch | 13 + .../common/chrome_content_client.cc.patch | 4 +- .../linux/common/desktop.template.patch | 13 + .../chrome/installer/util/shell_util.cc.patch | 20 ++ .../components/cbor/reader.cc.patch | 2 +- .../components/cbor/reader.h.patch | 6 +- .../components/cbor/reader_unittest.cc.patch | 0 .../components/cbor/values.cc.patch | 22 +- .../components/cbor/values.h.patch | 14 +- .../components/cbor/writer.cc.patch | 2 +- .../components/cbor/writer_unittest.cc.patch | 4 +- .../clipboard_recent_content_generic.cc.patch | 2 +- .../net/dns/dns_config_service_linux.cc.patch | 4 +- .../weborigin/scheme_registry.cc.patch | 8 +- .../url/BUILD.gn.patch | 2 +- .../131.0.6724.0/url/url_canon.h.patch | 26 ++ .../131.0.6724.0/url/url_canon_ipfs.cc | 54 ++++ .../131.0.6724.0/url/url_util.cc.patch | 45 +++ .../chrome/browser/BUILD.gn.patch | 16 +- .../chrome/browser/about_flags.cc.patch | 8 +- ...me_autocomplete_scheme_classifier.cc.patch | 29 +- .../chrome_content_browser_client.cc.patch | 24 +- .../chrome/browser/flag-metadata.json.patch | 6 +- .../chrome/browser/flag_descriptions.cc.patch | 4 +- .../chrome/browser/flag_descriptions.h.patch | 8 +- .../chrome/browser/ipfs_extra_parts.cc | 0 .../chrome/browser/ipfs_extra_parts.h | 0 .../browser/prefs/browser_prefs.cc.patch | 17 +- .../browser/shell_integration_mac.mm.patch | 13 + .../common/chrome_content_client.cc.patch | 4 +- .../linux/common/desktop.template.patch | 13 + .../chrome/installer/util/shell_util.cc.patch | 20 ++ .../components/cbor/reader.cc.patch | 2 +- .../components/cbor/reader.h.patch | 6 +- .../components/cbor/reader_unittest.cc.patch | 0 .../components/cbor/values.cc.patch | 22 +- .../components/cbor/values.h.patch | 14 +- .../components/cbor/writer.cc.patch | 2 +- .../components/cbor/writer_unittest.cc.patch | 4 +- .../clipboard_recent_content_generic.cc.patch | 2 +- .../net/dns/dns_config_service_linux.cc.patch | 4 +- .../weborigin/scheme_registry.cc.patch | 8 +- .../url/BUILD.gn.patch | 2 +- .../131.0.6724.1/url/url_canon.h.patch | 26 ++ .../131.0.6724.1/url/url_canon_ipfs.cc | 54 ++++ .../131.0.6724.1/url/url_util.cc.patch | 45 +++ cmake/CodeCoverage.cmake | 2 +- cmake/chromium.py | 24 +- cmake/clean_rmed.py | 2 +- cmake/inc_link.py | 2 + cmake/patch.py | 2 +- cmake/setup.cmake | 7 +- component/block_http_request.cc | 2 - component/chromium_dns_txt_lookup.h | 6 + doc/0.0.1.2_blog.md | 65 ++++ docker/all.sh | 19 -- docker/chromium-build.sh | 17 -- docker/cmake-build.sh | 7 - docker/debian-base | 27 -- docker/debian-boost | 8 - docker/debian-cxx23 | 8 - docker/debian-python | 10 - docker/dist-ubuntu.sh | 3 - docker/dist.sh | 5 - docker/library-builds.sh | 35 --- docker/shared.env | 8 - docker/ubuntu.chrome_browser | 86 ------ library/.clang-tidy | 5 +- library/CMakeLists.txt | 3 +- library/include/ipfs_client/ctx/json_parser.h | 2 + .../ipfs_client/ctx/null_dns_txt_lookup.h | 2 + .../ipfs_client/ctx/null_http_provider.h | 2 + .../ipfs_client/gw/dnslink_requestor.h | 2 + .../include/ipfs_client/gw/gateway_request.h | 6 +- .../include/ipfs_client/ipld/block_source.h | 2 + .../include/ipfs_client/ipld/dag_headers.h | 2 + library/include/ipfs_client/ipld/dag_node.h | 54 +++- library/include/ipfs_client/ipld/link.h | 15 +- .../src/ipfs_client/crypto/openssl_sha2_256.h | 2 + .../crypto/openssl_signature_verifier.cc | 2 +- .../ipfs_client/ctx/ares_dns_txt_lookup.cc | 2 +- .../src/ipfs_client/ctx/boost_beast_http.cc | 4 +- .../src/ipfs_client/ctx/default_gateways.cc | 34 +-- .../gw/gateway_request_unittest.cc | 19 ++ library/src/ipfs_client/gw/gateway_state.cc | 4 +- library/src/ipfs_client/gw/gateway_state.h | 2 + library/src/ipfs_client/ipfs_request.cc | 1 + library/src/ipfs_client/ipld/dag_json_node.h | 12 +- library/src/ipfs_client/ipld/dag_node.cc | 1 + .../src/ipfs_client/ipld/directory_shard.cc | 4 +- .../src/ipfs_client/ipld/directory_shard.h | 2 + library/src/ipfs_client/ipld/dnslink_name.cc | 1 + library/src/ipfs_client/ipld/dnslink_name.h | 2 +- library/src/ipfs_client/ipld/ipns_name.h | 8 +- library/src/ipfs_client/ipld/unixfs_file.cc | 1 - library/src/ipfs_client/ipns_record.cc | 2 +- library/src/ipfs_client/multi_base.cc | 10 +- library/src/ipfs_client/pb_dag.cc | 2 + library/src/ipfs_client/redirects.cc | 3 +- ...87Tp8qARaF2e3ciNL2dfzMhzBfx34AbELqSub1zxd6 | 2 - ...RMMo58sp9E7jxJNkoh93eJyZ8XM93KEcWQRAHMcgDW | 3 - ...6x5qa5foqvyjjnl5mtk4hq2hbl73csgsqx6ap5ox5u | 278 ++++++++++++++++++ ...zkig6yzlbyw2ztfsw56sfmdcd4qox3hbusbvxe7w6a | 1 - ...hislroxz4g7qeap5kfvgta2kpocfhpsfni4krcjfjq | Bin 0 -> 4962 bytes ...7zdiymntge2igvvmcitlsatdovi6izt4vqanpbjaqy | Bin 0 -> 229 bytes test_data/include/mock_gw_cfg.h | 2 + test_data/names/planetable.eth | 1 + test_data/test_server.py | 10 +- 231 files changed, 1249 insertions(+), 3439 deletions(-) delete mode 100644 chromium_edits/125.0.6368.2/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/chrome/browser/chrome_content_browser_client.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/chrome/common/chrome_content_client.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/components/cbor/values.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/components/cbor/values.h.patch delete mode 100644 chromium_edits/125.0.6368.2/components/cbor/writer.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/components/cbor/writer_unittest.cc.patch delete mode 100644 chromium_edits/125.0.6368.2/url/url_canon.h.patch delete mode 100644 chromium_edits/125.0.6368.2/url/url_canon_ipfs.cc delete mode 100644 chromium_edits/125.0.6368.2/url/url_util.cc.patch delete mode 100644 chromium_edits/125.0.6382.3/chrome/browser/BUILD.gn.patch delete mode 100644 chromium_edits/125.0.6382.3/chrome/browser/about_flags.cc.patch delete mode 100644 chromium_edits/125.0.6382.3/chrome/browser/prefs/browser_prefs.cc.patch delete mode 100644 chromium_edits/125.0.6382.3/components/cbor/reader.cc.patch delete mode 100644 chromium_edits/125.0.6382.3/components/cbor/reader.h.patch delete mode 100644 chromium_edits/125.0.6382.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch delete mode 100644 chromium_edits/125.0.6382.3/url/BUILD.gn.patch delete mode 100644 chromium_edits/125.0.6382.3/url/url_canon.h.patch delete mode 100644 chromium_edits/125.0.6382.3/url/url_canon_ipfs.cc delete mode 100644 chromium_edits/125.0.6382.3/url/url_util.cc.patch delete mode 100644 chromium_edits/125.0.6396.3/chrome/browser/chrome_content_browser_client.cc.patch delete mode 100644 chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.h.patch delete mode 100644 chromium_edits/125.0.6396.3/net/dns/dns_config_service_linux.cc.patch delete mode 100644 chromium_edits/125.0.6396.3/url/url_canon.h.patch delete mode 100644 chromium_edits/125.0.6396.3/url/url_canon_ipfs.cc delete mode 100644 chromium_edits/125.0.6396.3/url/url_util.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/flag-metadata.json.patch delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.h.patch delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.cc delete mode 100644 chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.h delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/reader.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/reader.h.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/reader_unittest.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/values.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/values.h.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/writer.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/components/cbor/writer_unittest.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/net/dns/dns_config_service_linux.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch delete mode 100644 chromium_edits/125.0.6412.0/url/BUILD.gn.patch delete mode 100644 chromium_edits/125.0.6412.0/url/url_canon.h.patch delete mode 100644 chromium_edits/125.0.6412.0/url/url_canon_ipfs.cc delete mode 100644 chromium_edits/125.0.6412.0/url/url_util.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/BUILD.gn.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/about_flags.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/chrome_content_browser_client.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/flag-metadata.json.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.h.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.cc delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.h delete mode 100644 chromium_edits/125.0.6420.4/chrome/browser/prefs/browser_prefs.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/chrome/common/chrome_content_client.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/reader.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/reader.h.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/reader_unittest.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/values.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/values.h.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/writer.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/cbor/writer_unittest.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/net/dns/dns_config_service_linux.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch delete mode 100644 chromium_edits/125.0.6420.4/url/BUILD.gn.patch delete mode 100644 chromium_edits/125.0.6420.4/url/url_canon.h.patch delete mode 100644 chromium_edits/125.0.6420.4/url/url_canon_ipfs.cc delete mode 100644 chromium_edits/125.0.6420.4/url/url_util.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/BUILD.gn.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/about_flags.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/flag-metadata.json.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.cc delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.h delete mode 100644 chromium_edits/129.0.6628.3/chrome/browser/prefs/browser_prefs.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/chrome/common/chrome_content_client.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/components/cbor/reader_unittest.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch delete mode 100644 chromium_edits/129.0.6628.3/url/url_util.cc.patch rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/chrome/browser/BUILD.gn.patch (67%) rename chromium_edits/{125.0.6396.3 => 130.0.6723.6}/chrome/browser/about_flags.cc.patch (90%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/chrome/browser/chrome_content_browser_client.cc.patch (92%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/chrome/browser/flag-metadata.json.patch (84%) rename chromium_edits/{125.0.6382.3 => 130.0.6723.6}/chrome/browser/flag_descriptions.cc.patch (85%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/chrome/browser/flag_descriptions.h.patch (89%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/chrome/browser/ipfs_extra_parts.cc (100%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/chrome/browser/ipfs_extra_parts.h (100%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/chrome/browser/prefs/browser_prefs.cc.patch (75%) create mode 100644 chromium_edits/130.0.6723.6/chrome/browser/shell_integration_mac.mm.patch rename chromium_edits/{125.0.6396.3 => 130.0.6723.6}/chrome/common/chrome_content_client.cc.patch (85%) create mode 100644 chromium_edits/130.0.6723.6/chrome/installer/linux/common/desktop.template.patch create mode 100644 chromium_edits/130.0.6723.6/chrome/installer/util/shell_util.cc.patch rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/reader.cc.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/reader.h.patch (100%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/components/cbor/reader_unittest.cc.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/values.cc.patch (93%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/values.h.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/writer.cc.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/components/cbor/writer_unittest.cc.patch (100%) rename chromium_edits/{125.0.6396.3 => 130.0.6723.6}/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch (95%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/net/dns/dns_config_service_linux.cc.patch (100%) rename chromium_edits/{125.0.6368.2 => 130.0.6723.6}/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch (70%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/url/BUILD.gn.patch (100%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/url/url_canon.h.patch (96%) rename chromium_edits/{129.0.6628.3 => 130.0.6723.6}/url/url_canon_ipfs.cc (100%) create mode 100644 chromium_edits/130.0.6723.6/url/url_util.cc.patch rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/chrome/browser/BUILD.gn.patch (67%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.0}/chrome/browser/about_flags.cc.patch (90%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch (82%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/browser/chrome_content_browser_client.cc.patch (80%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/browser/flag-metadata.json.patch (84%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.0}/chrome/browser/flag_descriptions.cc.patch (85%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.0}/chrome/browser/flag_descriptions.h.patch (86%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/browser/ipfs_extra_parts.cc (100%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/browser/ipfs_extra_parts.h (100%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/chrome/browser/prefs/browser_prefs.cc.patch (75%) create mode 100644 chromium_edits/131.0.6724.0/chrome/browser/shell_integration_mac.mm.patch rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/chrome/common/chrome_content_client.cc.patch (85%) create mode 100644 chromium_edits/131.0.6724.0/chrome/installer/linux/common/desktop.template.patch create mode 100644 chromium_edits/131.0.6724.0/chrome/installer/util/shell_util.cc.patch rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/components/cbor/reader.cc.patch (97%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/components/cbor/reader.h.patch (88%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/components/cbor/reader_unittest.cc.patch (100%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/components/cbor/values.cc.patch (87%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/components/cbor/values.h.patch (87%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/components/cbor/writer.cc.patch (91%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/components/cbor/writer_unittest.cc.patch (91%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.0}/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch (95%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.0}/net/dns/dns_config_service_linux.cc.patch (88%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.0}/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch (70%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.0}/url/BUILD.gn.patch (95%) create mode 100644 chromium_edits/131.0.6724.0/url/url_canon.h.patch create mode 100644 chromium_edits/131.0.6724.0/url/url_canon_ipfs.cc create mode 100644 chromium_edits/131.0.6724.0/url/url_util.cc.patch rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/chrome/browser/BUILD.gn.patch (67%) rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/chrome/browser/about_flags.cc.patch (90%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch (82%) rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/chrome/browser/chrome_content_browser_client.cc.patch (80%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/chrome/browser/flag-metadata.json.patch (84%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/chrome/browser/flag_descriptions.cc.patch (85%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.1}/chrome/browser/flag_descriptions.h.patch (84%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/chrome/browser/ipfs_extra_parts.cc (100%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/chrome/browser/ipfs_extra_parts.h (100%) rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/chrome/browser/prefs/browser_prefs.cc.patch (75%) create mode 100644 chromium_edits/131.0.6724.1/chrome/browser/shell_integration_mac.mm.patch rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/chrome/common/chrome_content_client.cc.patch (85%) create mode 100644 chromium_edits/131.0.6724.1/chrome/installer/linux/common/desktop.template.patch create mode 100644 chromium_edits/131.0.6724.1/chrome/installer/util/shell_util.cc.patch rename chromium_edits/{125.0.6368.2 => 131.0.6724.1}/components/cbor/reader.cc.patch (97%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.1}/components/cbor/reader.h.patch (88%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/components/cbor/reader_unittest.cc.patch (100%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.1}/components/cbor/values.cc.patch (87%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/components/cbor/values.h.patch (87%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/components/cbor/writer.cc.patch (91%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.1}/components/cbor/writer_unittest.cc.patch (91%) rename chromium_edits/{125.0.6412.0 => 131.0.6724.1}/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch (95%) rename chromium_edits/{125.0.6382.3 => 131.0.6724.1}/net/dns/dns_config_service_linux.cc.patch (88%) rename chromium_edits/{125.0.6396.3 => 131.0.6724.1}/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch (70%) rename chromium_edits/{125.0.6368.2 => 131.0.6724.1}/url/BUILD.gn.patch (95%) create mode 100644 chromium_edits/131.0.6724.1/url/url_canon.h.patch create mode 100644 chromium_edits/131.0.6724.1/url/url_canon_ipfs.cc create mode 100644 chromium_edits/131.0.6724.1/url/url_util.cc.patch create mode 100644 doc/0.0.1.2_blog.md delete mode 100755 docker/all.sh delete mode 100755 docker/chromium-build.sh delete mode 100755 docker/cmake-build.sh delete mode 100644 docker/debian-base delete mode 100644 docker/debian-boost delete mode 100644 docker/debian-cxx23 delete mode 100644 docker/debian-python delete mode 100755 docker/dist-ubuntu.sh delete mode 100755 docker/dist.sh delete mode 100755 docker/library-builds.sh delete mode 100644 docker/shared.env delete mode 100644 docker/ubuntu.chrome_browser delete mode 100644 test_data/blocks/QmaZ87Tp8qARaF2e3ciNL2dfzMhzBfx34AbELqSub1zxd6 delete mode 100644 test_data/blocks/QmaZRMMo58sp9E7jxJNkoh93eJyZ8XM93KEcWQRAHMcgDW create mode 100644 test_data/blocks/bafkreibaffbwukjz6x5qa5foqvyjjnl5mtk4hq2hbl73csgsqx6ap5ox5u delete mode 100644 test_data/blocks/bafkreifmvsdmbzqjzkig6yzlbyw2ztfsw56sfmdcd4qox3hbusbvxe7w6a create mode 100644 test_data/blocks/bafybeibvfj5evbxihislroxz4g7qeap5kfvgta2kpocfhpsfni4krcjfjq create mode 100644 test_data/blocks/bafybeihgi7kuhtr67zdiymntge2igvvmcitlsatdovi6izt4vqanpbjaqy create mode 100644 test_data/names/planetable.eth diff --git a/.github/tour.sh b/.github/tour.sh index 8256b829..63cb675d 100755 --- a/.github/tour.sh +++ b/.github/tour.sh @@ -20,7 +20,7 @@ sudo apt-get update sudo apt-get install --yes cmake ninja-build binutils libc6{,-dev} pip3 install conan conan profile detect || echo "Profile detection failed. Perhaps the default profile already existed - perhaps this user has already done some conan-based builds." -sed -i 's,compiler.cppstd=.*$,compiler.cppstd=20,' `conan profile path default` +sed -i 's,compiler.cppstd=.*$,compiler.cppstd=20,' "$(conan profile path default)" conan profile show echo Build conan library @@ -38,7 +38,7 @@ echo Build clitester cmake --build tester_build --config Release echo Start test server -( timeout 600 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 | tee server.log & ) & +( (timeout 1999 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 ; echo -e '\n LOCALHOST SERVER EXITING FROM TIMEOUT \n ') | tee server.log & ) & for t in 1{0..9} do if grep -n . server.log @@ -59,20 +59,24 @@ function url_case() { echo "test case description =${4}" ll="${5-note}" echo "log level = ${ll}" - if timeout 420 ./tester_build/clitester "${ll}" "${1}://${2}" + set +e + timeout 442 ./tester_build/clitester "${ll}" "${1}://${2}" + ec=$? + set -e + if [ ${ec} -eq 0 ] then echo clitester exited with successful status else - echo "Directly reported error code from clitester run - usually means timeout killed it. " "${@}" - exit 7 + echo "Directly reported error code ${ec} from clitester run - usually means timeout killed it. " "${@}" + exit 6 fi - n=`sed 's,[^A-Za-z0-9\.],_,g' <<< ${2}` + n="${2//[^A-Za-z0-9\.]/_}" if [ ! -f "_${1}_${n}" ] then echo "Failed to produce expected file _${1}_${n} for test case " "${@}" ls -lrth exit 7 - elif cat "_${1}_${n}" | md5sum | cut -d ' ' -f 1 > actual + elif md5sum < "_${1}_${n}" | cut -d ' ' -f 1 > actual then ls -lrth _ip?s_* if [ $# -ge 3 ] @@ -95,13 +99,32 @@ function url_case() { fi } +unstable_case() { + set +e + timeout 405 ./tester_build/clitester "ipns://${1}" + ec=$? + set -e + if [ ${ec} -ne 0 ] + then + echo "clitester (or timeout) failed with exit code ${ec} for ipns://${1}" + exit 5 + fi + n="${1//[^A-Za-z0-9\.]/_}" + if ! grep "${2}" "_ipns_${n}" + then + echo "Was not able to find '${2}' in output for ipns://${1}" + grep -n . "_ipns_${n}" + exit 4 + fi +} + url_case ipfs bafybeifx4tcpzbw7tzhwfbzsofgoana6cy7xbt64e3u6itve44c5zelpmm/symlinks/sub/dotdot.txt cfe9b69523140b5b5e63874a8e4997e4 'A symbolic link whose target includes ..' url_case ipfs bafkqacdjmrsw45djor4q ff483d1ff591898a9942916050d2ca3f 'Identity (inlined) CID' url_case ipfs baguqeerah2nswg7r2pvlpbnsz5y4c4pr4wsgbzixdl632w5qxvedqzryf54q 7750fd7b0928f007e1d181763c0dbdb5 'A DAG-JSON document. The block itself md5s to b92348005af4ae4795e6f312844fb359, but the response we are hashing here is an HTML preview page. This does mean this test breaks if you make the preview less ugly.' url_case ipns en.wikipedia-on-ipfs.org/I/HFE_Too_Slow_1.JPG.webp 09c09b2654e8529740b5a7625e39e0c8 'An image fetched through DNSLink and HAMT sharded directories.' note echo 'Skip as it takes too long.' url_case ipfs bafybeieb33pqideyl5ncd33kho622thym5rqv6sujrmelcuhkjlf2hdpu4/Big%20Buck%20Bunny.webm 06d51286e56badb4455594ebed6daba2 'A large UnixFS file - several hundred blocks.' error url_case ipfs bafybeihmq5rnk5i4gwljixz64dns3pxt7ep2i3x7eylyfq7mkzgh4gtfh4/relative_link.txt cfe9b69523140b5b5e63874a8e4997e4 'A relative symlink resolves successfully to the file pointed to.' -url_case ipns planetable.eth/B5B2F107-A455-4B5A-AA14-B60EB7179ABF 6671d3bce06f61f5568632ae004d7dde 'DNSLink fallback to gateways to access non-DNS resolvers, in this case ENS' +unstable_case planetable.eth/B5B2F107-A455-4B5A-AA14-B60EB7179ABF 'Can I Use Planet While Offline?' echo Stop test server. killall python3 2>/dev/null || true diff --git a/.gitignore b/.gitignore index ea21093a..a0733ae6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ CMakeUserPresets.json gotit.json .kdev4/ipfs-chromium.kdev4 *.autosave.* +*.autosave diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f1d0461..bead4292 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,8 @@ set(DEPOT_TOOLS_DIRECTORY "${default_dt}" CACHE PATH "Where to find depot_tools, e.g. DEPOT_TOOLS_DIRECTORY/gn.py should exist. Setting this to DETECT_FROM_PATH implies the directory is in your PATH and always will be." ) set(TEST_BY_DEFAULT FALSE CACHE BOOL "Update unit tests as part of the 'all' default target.") -set(USE_DOXYGEN TRUE CACHE BOOL "If we should attempt to use Doxygen to generate documentation.") +set(USE_CLANG_TIDY FALSE CACHE BOOL "Use clang-tidy, if found, to generate additional warnings.") +set(USE_DOXYGEN TRUE CACHE BOOL "If we should attempt to use Doxygen to generate documentation, if it's available.") set(BRANDING_DIR "${CMAKE_CURRENT_LIST_DIR}/branding" CACHE PATH "Directory conataining branding files to synchronize. If empty, don't apply any branding changes.") #End of user-configuration cache variables. diff --git a/chromium_edits/125.0.6368.2/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/125.0.6368.2/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch deleted file mode 100644 index 4d172311..00000000 --- a/chromium_edits/125.0.6368.2/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -index 4c88614c68c25..f8bb12a3b0c2e 100644 ---- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -10,6 +10,8 @@ - #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" - #include "chrome/browser/external_protocol/external_protocol_handler.h" - #include "chrome/browser/profiles/profile.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - #if BUILDFLAG(IS_ANDROID) - #include "chrome/browser/profiles/profile_android.h" - #endif -@@ -18,6 +20,9 @@ - #include "chrome/browser/ui/android/omnibox/jni_headers/ChromeAutocompleteSchemeClassifier_jni.h" - #endif - #include "components/custom_handlers/protocol_handler_registry.h" -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif - #include "content/public/common/url_constants.h" - #include "url/url_util.h" - -@@ -55,12 +60,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( - if (scheme.empty()) { - return metrics::OmniboxInputType::EMPTY; - } -- if (base::IsStringASCII(scheme) && -- (ProfileIOData::IsHandledProtocol(scheme) || -- base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme))) { -- return metrics::OmniboxInputType::URL; -+ if (base::IsStringASCII(scheme)) { -+ if (ProfileIOData::IsHandledProtocol(scheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme)) { -+ return metrics::OmniboxInputType::URL; -+ } -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs) && -+ (base::EqualsCaseInsensitiveASCII(scheme, "ipfs") || base::EqualsCaseInsensitiveASCII(scheme, "ipns")) -+ ) { -+ return metrics::OmniboxInputType::URL; -+ } -+#endif - } - - // Also check for schemes registered via registerProtocolHandler(), which diff --git a/chromium_edits/125.0.6368.2/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/125.0.6368.2/chrome/browser/chrome_content_browser_client.cc.patch deleted file mode 100644 index 4f4aaeb5..00000000 --- a/chromium_edits/125.0.6368.2/chrome/browser/chrome_content_browser_client.cc.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index 135976b7e09aa..184f1313fde01 100644 ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -379,6 +379,7 @@ - #include "third_party/blink/public/common/switches.h" - #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" - #include "third_party/blink/public/public_buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "third_party/widevine/cdm/buildflags.h" - #include "ui/base/clipboard/clipboard_format_type.h" - #include "ui/base/l10n/l10n_util.h" -@@ -500,6 +501,13 @@ - #include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h" - #endif - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "chrome/browser/ipfs_extra_parts.h" -+#include "components/ipfs/interceptor.h" -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/url_loader_factory.h" -+#endif -+ - #if !BUILDFLAG(IS_ANDROID) - #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" - #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" -@@ -1699,6 +1707,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { - main_parts->AddParts( - std::make_unique()); - -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ main_parts->AddParts(std::make_unique()); -+ } -+#endif - return main_parts; - } - -@@ -6085,12 +6098,25 @@ void ChromeContentBrowserClient:: - const std::optional& request_initiator_origin, - NonNetworkURLLoaderFactoryMap* factories) { - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ -- !BUILDFLAG(IS_ANDROID) -+ !BUILDFLAG(IS_ANDROID) || BUILDFLAG(ENABLE_IPFS) - content::RenderFrameHost* frame_host = - RenderFrameHost::FromID(render_process_id, render_frame_id); - WebContents* web_contents = WebContents::FromRenderFrameHost(frame_host); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ - // !BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ network::mojom::URLLoaderFactory* default_factory = g_browser_process->system_network_context_manager()->GetURLLoaderFactory(); -+ auto* context = web_contents->GetBrowserContext(); -+ ipfs::IpfsURLLoaderFactory::Create( -+ factories, -+ context, -+ default_factory, -+ GetSystemNetworkContext(), -+ Profile::FromBrowserContext(context)->GetPrefs() -+ ); -+ } -+#endif // BUILDFLAG(ENABLE_IPFS) - - #if BUILDFLAG(IS_CHROMEOS_ASH) - if (web_contents) { -@@ -6227,6 +6253,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( - scoped_refptr navigation_response_task_runner) { - std::vector> - interceptors; -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ interceptors.push_back(std::make_unique(g_browser_process->system_network_context_manager()->GetURLLoaderFactory(), GetSystemNetworkContext())); -+ } -+#endif - #if BUILDFLAG(ENABLE_OFFLINE_PAGES) - interceptors.push_back( - std::make_unique( diff --git a/chromium_edits/125.0.6368.2/chrome/common/chrome_content_client.cc.patch b/chromium_edits/125.0.6368.2/chrome/common/chrome_content_client.cc.patch deleted file mode 100644 index 59ea01c2..00000000 --- a/chromium_edits/125.0.6368.2/chrome/common/chrome_content_client.cc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 2f016718fdd3c..bc38d5c2e4d8e 100644 ---- a/chrome/common/chrome_content_client.cc -+++ b/chrome/common/chrome_content_client.cc -@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { - #if BUILDFLAG(IS_ANDROID) - schemes->local_schemes.push_back(url::kContentScheme); - #endif -+ for ( const char* ip_s : {"ipfs", "ipns"} ) { -+ schemes->standard_schemes.push_back(ip_s); -+ schemes->cors_enabled_schemes.push_back(ip_s); -+ schemes->secure_schemes.push_back(ip_s); -+ schemes->csp_bypassing_schemes.push_back(ip_s); -+ } - } - - std::u16string ChromeContentClient::GetLocalizedString(int message_id) { diff --git a/chromium_edits/125.0.6368.2/components/cbor/values.cc.patch b/chromium_edits/125.0.6368.2/components/cbor/values.cc.patch deleted file mode 100644 index ddbab2b3..00000000 --- a/chromium_edits/125.0.6368.2/components/cbor/values.cc.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 02498209c820e..34055aef24cfe 100644 ---- a/components/cbor/values.cc -+++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { - NOTREACHED(); - } - --Value::Value(SimpleValue in_simple) -- : type_(Type::SIMPLE_VALUE), simple_value_(in_simple) { -+Value::Value(SimpleValue in_simple, uint64_t tag) -+ : type_(Type::SIMPLE_VALUE), simple_value_(in_simple), tag_(tag) { - CHECK(static_cast(in_simple) >= 20 && static_cast(in_simple) <= 23); - } - --Value::Value(bool boolean_value) : type_(Type::SIMPLE_VALUE) { -+Value::Value(bool boolean_value, uint64_t tag) : type_(Type::SIMPLE_VALUE), tag_(tag) { - simple_value_ = boolean_value ? Value::SimpleValue::TRUE_VALUE - : Value::SimpleValue::FALSE_VALUE; - } - --Value::Value(double float_value) -- : type_(Type::FLOAT_VALUE), float_value_(float_value) {} -+Value::Value(double float_value, uint64_t tag) -+ : type_(Type::FLOAT_VALUE), float_value_(float_value), tag_(tag) {} - --Value::Value(int integer_value) -- : Value(base::checked_cast(integer_value)) {} -+Value::Value(int integer_value, uint64_t tag) -+ : Value(base::checked_cast(integer_value), tag) {} - --Value::Value(int64_t integer_value) : integer_value_(integer_value) { -+Value::Value(int64_t integer_value, uint64_t tag) : integer_value_(integer_value), tag_(tag) { - type_ = integer_value >= 0 ? Type::UNSIGNED : Type::NEGATIVE; - } - --Value::Value(base::span in_bytes) -+Value::Value(base::span in_bytes, uint64_t tag) - : type_(Type::BYTE_STRING), -- bytestring_value_(in_bytes.begin(), in_bytes.end()) {} -+ bytestring_value_(in_bytes.begin(), in_bytes.end()), -+ tag_(tag) -+ {} - --Value::Value(base::span in_bytes, Type type) -- : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()) { -+Value::Value(base::span in_bytes, Type type, uint64_t tag) -+ : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()), tag_(tag) { - DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); - } - -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { - } - } - --Value::Value(base::StringPiece in_string, Type type) : type_(type) { -+Value::Value(base::StringPiece in_string, Type type, uint64_t tag) -+: type_(type), tag_(tag) { - switch (type_) { - case Type::STRING: - new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(base::StringPiece in_string, Type type) : type_(type) { - } - } - --Value::Value(const ArrayValue& in_array) : type_(Type::ARRAY), array_value_() { -+Value::Value(const ArrayValue& in_array, uint64_t tag) -+: type_(Type::ARRAY), array_value_(), tag_(tag) { - array_value_.reserve(in_array.size()); - for (const auto& val : in_array) - array_value_.emplace_back(val.Clone()); - } - --Value::Value(ArrayValue&& in_array) noexcept -- : type_(Type::ARRAY), array_value_(std::move(in_array)) {} -+Value::Value(ArrayValue&& in_array, uint64_t tag) noexcept -+ : type_(Type::ARRAY), array_value_(std::move(in_array)), tag_(tag) {} - --Value::Value(const MapValue& in_map) : type_(Type::MAP), map_value_() { -+Value::Value(const MapValue& in_map, uint64_t tag) -+: type_(Type::MAP), map_value_(), tag_(tag) { - map_value_.reserve(in_map.size()); - for (const auto& it : in_map) - map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { - case Type::NONE: - return Value(); - case Type::INVALID_UTF8: -- return Value(bytestring_value_, Type::INVALID_UTF8); -+ return Value(bytestring_value_, Type::INVALID_UTF8, tag_); - case Type::UNSIGNED: - case Type::NEGATIVE: -- return Value(integer_value_); -+ return Value(integer_value_, tag_); - case Type::BYTE_STRING: -- return Value(bytestring_value_); -+ return Value(bytestring_value_, tag_); - case Type::STRING: -- return Value(string_value_); -+ return Value(string_value_, Type::STRING, tag_); - case Type::ARRAY: -- return Value(array_value_); -+ return Value(array_value_, tag_); - case Type::MAP: -- return Value(map_value_); -+ return Value(map_value_, tag_); - case Type::TAG: - NOTREACHED() << constants::kUnsupportedMajorType; - return Value(); - case Type::SIMPLE_VALUE: -- return Value(simple_value_); -+ return Value(simple_value_, tag_); - case Type::FLOAT_VALUE: -- return Value(float_value_); -+ return Value(float_value_, tag_); - } - - NOTREACHED(); - return Value(); - } - -+Value& Value::SetTag(uint64_t tag) noexcept { -+ tag_ = tag; -+ return *this; -+} -+ - Value::SimpleValue Value::GetSimpleValue() const { - CHECK(is_simple()); - return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { - return bytestring_value_; - } - -+uint64_t Value::GetTag() const { -+ CHECK(has_tag()); -+ return tag_; -+} -+ - void Value::InternalMoveConstructFrom(Value&& that) { - type_ = that.type_; -- -+ tag_ = that.tag_; - switch (type_) { - case Type::UNSIGNED: - case Type::NEGATIVE: diff --git a/chromium_edits/125.0.6368.2/components/cbor/values.h.patch b/chromium_edits/125.0.6368.2/components/cbor/values.h.patch deleted file mode 100644 index ca39df01..00000000 --- a/chromium_edits/125.0.6368.2/components/cbor/values.h.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/components/cbor/values.h b/components/cbor/values.h -index d81ef5607c55a..10216a8dcdc57 100644 ---- a/components/cbor/values.h -+++ b/components/cbor/values.h -@@ -127,28 +127,29 @@ class CBOR_EXPORT Value { - - explicit Value(Type type); - -- explicit Value(SimpleValue in_simple); -- explicit Value(bool boolean_value); -- explicit Value(double in_float); -+ explicit Value(SimpleValue in_simple, uint64_t tag = NO_TAG); -+ explicit Value(bool boolean_value, uint64_t tag = NO_TAG); -+ explicit Value(double in_float, uint64_t tag = NO_TAG); - -- explicit Value(int integer_value); -- explicit Value(int64_t integer_value); -+ explicit Value(int integer_value, uint64_t tag = NO_TAG); -+ explicit Value(int64_t integer_value, uint64_t tag = NO_TAG); - explicit Value(uint64_t integer_value) = delete; - -- explicit Value(base::span in_bytes); -+ explicit Value(base::span in_bytes, uint64_t tag = NO_TAG); - explicit Value(BinaryValue&& in_bytes) noexcept; - - explicit Value(const char* in_string, Type type = Type::STRING); - explicit Value(std::string&& in_string, Type type = Type::STRING) noexcept; -- explicit Value(base::StringPiece in_string, Type type = Type::STRING); -+ explicit Value(base::StringPiece in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); - -- explicit Value(const ArrayValue& in_array); -- explicit Value(ArrayValue&& in_array) noexcept; -+ explicit Value(const ArrayValue& in_array, uint64_t tag = NO_TAG); -+ explicit Value(ArrayValue&& in_array, uint64_t tag = NO_TAG) noexcept; - -- explicit Value(const MapValue& in_map); -+ explicit Value(const MapValue& in_map, uint64_t tag = NO_TAG); - explicit Value(MapValue&& in_map) noexcept; - - Value& operator=(Value&& that) noexcept; -+ Value& SetTag(uint64_t) noexcept; - - Value(const Value&) = delete; - Value& operator=(const Value&) = delete; -@@ -179,6 +180,7 @@ class CBOR_EXPORT Value { - bool is_string() const { return type() == Type::STRING; } - bool is_array() const { return type() == Type::ARRAY; } - bool is_map() const { return type() == Type::MAP; } -+ bool has_tag() const { return tag_ != NO_TAG; } - - // These will all fatally assert if the type doesn't match. - SimpleValue GetSimpleValue() const; -@@ -194,12 +196,13 @@ class CBOR_EXPORT Value { - const ArrayValue& GetArray() const; - const MapValue& GetMap() const; - const BinaryValue& GetInvalidUTF8() const; -+ uint64_t GetTag() const; - - private: - friend class Reader; - // This constructor allows INVALID_UTF8 values to be created, which only - // |Reader| and InvalidUTF8StringValueForTesting() may do. -- Value(base::span in_bytes, Type type); -+ Value(base::span in_bytes, Type type, uint64_t tag = NO_TAG); - - Type type_; - -@@ -213,6 +216,11 @@ class CBOR_EXPORT Value { - MapValue map_value_; - }; - -+ //This value specified as Invalid, -+ // used here to represent absence of TAG -+ constexpr static uint64_t NO_TAG = 0xFFFF; -+ uint64_t tag_ = NO_TAG; -+ - void InternalMoveConstructFrom(Value&& that); - void InternalCleanup(); - }; diff --git a/chromium_edits/125.0.6368.2/components/cbor/writer.cc.patch b/chromium_edits/125.0.6368.2/components/cbor/writer.cc.patch deleted file mode 100644 index bb89c1e6..00000000 --- a/chromium_edits/125.0.6368.2/components/cbor/writer.cc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc -index f400a65e7b66a..fcdebb8f3b458 100644 ---- a/components/cbor/writer.cc -+++ b/components/cbor/writer.cc -@@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node, - if (max_nesting_level < 0) - return false; - -+ if (node.has_tag()) { -+ StartItem(Value::Type::TAG, node.GetTag()); -+ } - switch (node.type()) { - case Value::Type::NONE: { - StartItem(Value::Type::BYTE_STRING, 0); diff --git a/chromium_edits/125.0.6368.2/components/cbor/writer_unittest.cc.patch b/chromium_edits/125.0.6368.2/components/cbor/writer_unittest.cc.patch deleted file mode 100644 index 240fee83..00000000 --- a/chromium_edits/125.0.6368.2/components/cbor/writer_unittest.cc.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/components/cbor/writer_unittest.cc b/components/cbor/writer_unittest.cc -index e3bffe20734bc..0ed569ae164a0 100644 ---- a/components/cbor/writer_unittest.cc -+++ b/components/cbor/writer_unittest.cc -@@ -522,4 +522,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { - EXPECT_FALSE(Writer::Write(Value(map), 4).has_value()); - } - -+TEST(CBORWriterTest, CanWriteTag) { -+ std::array content{ -+ 0x00, 0x01, 0x71, 0x12, 0x20, -+ 0x69, 0xea, 0x07, 0x40, 0xf9, -+ 0x80, 0x7a, 0x28, 0xf4, 0xd9, -+ 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, -+ 0x07, 0x2c, 0x90, 0x26, 0x6a, -+ 0xb3, 0xe7, 0x9d, 0xf6, 0x3a, -+ 0x36, 0x5b -+ }; -+ Value to_write(content); -+ to_write.SetTag(42); -+ auto result = Writer::Write(to_write); -+ EXPECT_TRUE(result.has_value()); -+ auto& bytes = result.value(); -+ EXPECT_EQ(bytes.size(), 41UL); -+ EXPECT_EQ(bytes.at(0), 0xd8); -+ EXPECT_EQ(bytes.at(1), 0x2a); -+ EXPECT_EQ(bytes.at(2), 0x58); -+ EXPECT_EQ(bytes.at(3), 0x25); -+ for (auto i = 0UL; i < content.size(); ++i) { -+ ASSERT_LT(i + 4UL, bytes.size()); -+ ASSERT_EQ(content.at(i), bytes.at(i+4UL)); -+ } -+} -+ - } // namespace cbor diff --git a/chromium_edits/125.0.6368.2/url/url_canon.h.patch b/chromium_edits/125.0.6368.2/url/url_canon.h.patch deleted file mode 100644 index 71d7a758..00000000 --- a/chromium_edits/125.0.6368.2/url/url_canon.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/url/url_canon.h b/url/url_canon.h -index bd40235e4aa85..05d250fe1b746 100644 ---- a/url/url_canon.h -+++ b/url/url_canon.h -@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec, - CanonOutput* output, - Parsed* new_parsed); - -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char16_t* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+ - // Part replacer -------------------------------------------------------------- - - // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/125.0.6368.2/url/url_canon_ipfs.cc b/chromium_edits/125.0.6368.2/url/url_canon_ipfs.cc deleted file mode 100644 index d7c9fdc7..00000000 --- a/chromium_edits/125.0.6368.2/url/url_canon_ipfs.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include "url_canon_internal.h" - -#include -#include - -#include - -bool url::CanonicalizeIpfsURL(const char* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* charset_converter, - CanonOutput* output, - Parsed* output_parsed) { - if ( spec_len < 1 || !spec ) { - return false; - } - if ( parsed.host.len < 1 ) { - return false; - } - std::string_view cid_str{ spec + parsed.host.begin, static_cast(parsed.host.len) }; - auto cid = ipfs::Cid(cid_str); - if ( !cid.valid() ) { - cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); - } - auto as_str = cid.to_string(); - if ( as_str.empty() ) { - return false; - } - std::string stdurl{ spec, static_cast(parsed.host.begin) }; - stdurl.append( as_str ); - stdurl.append( spec + parsed.host.end(), spec_len - parsed.host.end() ); - spec = stdurl.data(); - spec_len = static_cast(stdurl.size()); - Parsed parsed_input; - ParseStandardURL(spec, spec_len, &parsed_input); - return CanonicalizeStandardURL( - spec, - parsed_input, - scheme_type, - charset_converter, - output, output_parsed - ); -} -bool url::CanonicalizeIpfsURL(const char16_t* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* query_converter, - CanonOutput* output, - Parsed* new_parsed) { - RawCanonOutput<2048> as8; - ConvertUTF16ToUTF8(spec, spec_len, &as8); - return CanonicalizeIpfsURL(as8.data(), as8.length(), parsed, scheme_type, query_converter, output, new_parsed); -} diff --git a/chromium_edits/125.0.6368.2/url/url_util.cc.patch b/chromium_edits/125.0.6368.2/url/url_util.cc.patch deleted file mode 100644 index 3850fcfe..00000000 --- a/chromium_edits/125.0.6368.2/url/url_util.cc.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index 82b27b8f59684..2f3045adefaa7 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -274,8 +274,15 @@ bool DoCanonicalize(const CHAR* spec, - } else if (DoCompareSchemeComponent(spec, scheme, url::kFileSystemScheme)) { - // Filesystem URLs are special. - ParseFileSystemURL(spec, spec_len, &parsed_input); -- success = CanonicalizeFileSystemURL(spec, parsed_input, charset_converter, -- output, output_parsed); -+ success = CanonicalizeFileSystemURL(spec, parsed_input, -+ charset_converter, output, -+ output_parsed); -+ -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ ParseStandardURL(spec, spec_len, &parsed_input); -+ success = CanonicalizeIpfsURL(spec, spec_len, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. diff --git a/chromium_edits/125.0.6382.3/chrome/browser/BUILD.gn.patch b/chromium_edits/125.0.6382.3/chrome/browser/BUILD.gn.patch deleted file mode 100644 index a7493c51..00000000 --- a/chromium_edits/125.0.6382.3/chrome/browser/BUILD.gn.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 324cc35fa51ee..6815f92508d7f 100644 ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -39,6 +39,7 @@ import("//sandbox/features.gni") - import("//services/screen_ai/buildflags/features.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//third_party/blink/public/public_features.gni") -+import("//third_party/ipfs_client/args.gni") - import("//third_party/protobuf/proto_library.gni") - import("//third_party/webrtc/webrtc.gni") - import("//third_party/widevine/cdm/widevine.gni") -@@ -2682,6 +2683,14 @@ static_library("browser") { - ] - } - -+ if (enable_ipfs) { -+ sources += [ -+ "ipfs_extra_parts.cc", -+ "ipfs_extra_parts.h", -+ ] -+ deps += [ "//components/ipfs" ] -+ } -+ - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } diff --git a/chromium_edits/125.0.6382.3/chrome/browser/about_flags.cc.patch b/chromium_edits/125.0.6382.3/chrome/browser/about_flags.cc.patch deleted file mode 100644 index df202267..00000000 --- a/chromium_edits/125.0.6382.3/chrome/browser/about_flags.cc.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index ad4a564570cad..0b32f23c4ad48 100644 ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -215,6 +215,7 @@ - #include "third_party/blink/public/common/features_generated.h" - #include "third_party/blink/public/common/forcedark/forcedark_switches.h" - #include "third_party/blink/public/common/switches.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "ui/accessibility/accessibility_features.h" - #include "ui/accessibility/accessibility_switches.h" - #include "ui/base/ozone_buildflags.h" -@@ -309,6 +310,10 @@ - #include "extensions/common/switches.h" - #endif // BUILDFLAG(ENABLE_EXTENSIONS) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif -+ - #if BUILDFLAG(ENABLE_PDF) - #include "pdf/pdf_features.h" - #endif -@@ -9603,6 +9608,14 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOmitCorsClientCertDescription, kOsAll, - FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, - -+#if BUILDFLAG(ENABLE_IPFS) -+ {"enable-ipfs", -+ flag_descriptions::kEnableIpfsName, -+ flag_descriptions::kEnableIpfsDescription, -+ kOsMac | kOsWin | kOsLinux,//TODO: These are the only variants currently getting built, but that is not likely to remain the case -+ FEATURE_VALUE_TYPE(ipfs::kEnableIpfs)}, -+#endif -+ - {"use-idna2008-non-transitional", - flag_descriptions::kUseIDNA2008NonTransitionalName, - flag_descriptions::kUseIDNA2008NonTransitionalDescription, kOsAll, diff --git a/chromium_edits/125.0.6382.3/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/125.0.6382.3/chrome/browser/prefs/browser_prefs.cc.patch deleted file mode 100644 index 0cd1eb47..00000000 --- a/chromium_edits/125.0.6382.3/chrome/browser/prefs/browser_prefs.cc.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index faf3fa0460e3b..5bf2e3d4eae68 100644 ---- a/chrome/browser/prefs/browser_prefs.cc -+++ b/chrome/browser/prefs/browser_prefs.cc -@@ -189,6 +189,8 @@ - #include "printing/buildflags/buildflags.h" - #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - - #if BUILDFLAG(ENABLE_BACKGROUND_MODE) - #include "chrome/browser/background/background_mode_manager.h" -@@ -233,6 +235,11 @@ - #include "chrome/browser/pdf/pdf_pref_names.h" - #endif // BUILDFLAG(ENABLE_PDF) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/preferences.h" -+#endif -+ - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1765,6 +1772,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - IncognitoModePrefs::RegisterProfilePrefs(registry); - invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); - invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ ipfs::RegisterPreferences(registry); -+ } -+#endif - language::LanguagePrefs::RegisterProfilePrefs(registry); - login_detection::prefs::RegisterProfilePrefs(registry); - lookalikes::RegisterProfilePrefs(registry); diff --git a/chromium_edits/125.0.6382.3/components/cbor/reader.cc.patch b/chromium_edits/125.0.6382.3/components/cbor/reader.cc.patch deleted file mode 100644 index a9c4a7b3..00000000 --- a/chromium_edits/125.0.6382.3/components/cbor/reader.cc.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc -index 3c31e3d05e5d3..5ad0dbb183884 100644 ---- a/components/cbor/reader.cc -+++ b/components/cbor/reader.cc -@@ -22,7 +22,7 @@ - namespace cbor { - - namespace constants { --const char kUnsupportedMajorType[] = "Unsupported major type."; -+const char kUnsupportedMajorType[] = "Unsupported major type operation."; - } - - namespace { -@@ -156,7 +156,11 @@ std::optional Reader::DecodeCompleteDataItem(const Config& config, - case Value::Type::FLOAT_VALUE: - // Floating point values also go here since they are also type 7. - return DecodeToSimpleValueOrFloat(*header, config); -- case Value::Type::TAG: // We explicitly don't support TAG. -+ case Value::Type::TAG: -+ if (config.parse_tags) { -+ return ReadTagContent(*header, config, max_nesting_level); -+ } -+ break; - case Value::Type::NONE: - case Value::Type::INVALID_UTF8: - break; -@@ -347,6 +351,17 @@ std::optional Reader::ReadByteStringContent( - return Value(std::move(cbor_byte_string)); - } - -+std::optional Reader::ReadTagContent( -+ const Reader::DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level) { -+ auto tagged_content = DecodeCompleteDataItem(config, max_nesting_level); -+ if (tagged_content.has_value()) { -+ tagged_content.value().SetTag(header.value); -+ } -+ return tagged_content; -+} -+ - std::optional Reader::ReadArrayContent( - const Reader::DataItemHeader& header, - const Config& config, diff --git a/chromium_edits/125.0.6382.3/components/cbor/reader.h.patch b/chromium_edits/125.0.6382.3/components/cbor/reader.h.patch deleted file mode 100644 index cd7d9eb0..00000000 --- a/chromium_edits/125.0.6382.3/components/cbor/reader.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/components/cbor/reader.h b/components/cbor/reader.h -index 73c5dcb23e555..a933768608d73 100644 ---- a/components/cbor/reader.h -+++ b/components/cbor/reader.h -@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader { - // during decoding will set raise the `UNSUPPORTED_FLOATING_POINT_VALUE` - // error. - bool allow_floating_point = false; -+ -+ // If the parser encounters a TAG element, should it be parsed out and -+ // the tag value saved (true), or should the entire node and its content -+ // be discarded (false) -+ bool parse_tags = false; - }; - - Reader(const Reader&) = delete; -@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader { - std::optional ReadMapContent(const DataItemHeader& header, - const Config& config, - int max_nesting_level); -+ std::optional ReadTagContent(const DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level); - std::optional ReadByte(); - std::optional> ReadBytes(uint64_t num_bytes); - bool IsKeyInOrder(const Value& new_key, diff --git a/chromium_edits/125.0.6382.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/125.0.6382.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch deleted file mode 100644 index 291d84f1..00000000 --- a/chromium_edits/125.0.6382.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 32c4138ec358c..e9c62d51bf59b 100644 ---- a/components/open_from_clipboard/clipboard_recent_content_generic.cc -+++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc -@@ -20,7 +20,7 @@ - namespace { - // Schemes appropriate for suggestion by ClipboardRecentContent. - const char* kAuthorizedSchemes[] = { -- url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, -+ url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, "ipfs", "ipns" - // TODO(mpearson): add support for chrome:// URLs. Right now the scheme - // for that lives in content and is accessible via - // GetEmbedderRepresentationOfAboutScheme() or content::kChromeUIScheme diff --git a/chromium_edits/125.0.6382.3/url/BUILD.gn.patch b/chromium_edits/125.0.6382.3/url/BUILD.gn.patch deleted file mode 100644 index 201770c4..00000000 --- a/chromium_edits/125.0.6382.3/url/BUILD.gn.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/url/BUILD.gn b/url/BUILD.gn -index aedf1bf9f80be..b11c73a88aae5 100644 ---- a/url/BUILD.gn -+++ b/url/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/buildflag_header.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//testing/test.gni") -+import("//third_party/ipfs_client/args.gni") - import("features.gni") - - import("//build/config/cronet/config.gni") -@@ -67,6 +68,7 @@ component("url") { - public_deps = [ - "//base", - "//build:robolectric_buildflags", -+ "//third_party/ipfs_client:ipfs_buildflags", - ] - - configs += [ "//build/config/compiler:wexit_time_destructors" ] -@@ -89,6 +91,11 @@ component("url") { - public_configs = [ "//third_party/jdk" ] - } - -+ if (enable_ipfs) { -+ sources += [ "url_canon_ipfs.cc" ] -+ deps += [ "//third_party/ipfs_client:ipfs_client" ] -+ } -+ - if (is_win) { - # Don't conflict with Windows' "url.dll". - output_name = "url_lib" diff --git a/chromium_edits/125.0.6382.3/url/url_canon.h.patch b/chromium_edits/125.0.6382.3/url/url_canon.h.patch deleted file mode 100644 index 71d7a758..00000000 --- a/chromium_edits/125.0.6382.3/url/url_canon.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/url/url_canon.h b/url/url_canon.h -index bd40235e4aa85..05d250fe1b746 100644 ---- a/url/url_canon.h -+++ b/url/url_canon.h -@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec, - CanonOutput* output, - Parsed* new_parsed); - -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char16_t* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+ - // Part replacer -------------------------------------------------------------- - - // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/125.0.6382.3/url/url_canon_ipfs.cc b/chromium_edits/125.0.6382.3/url/url_canon_ipfs.cc deleted file mode 100644 index d7c9fdc7..00000000 --- a/chromium_edits/125.0.6382.3/url/url_canon_ipfs.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include "url_canon_internal.h" - -#include -#include - -#include - -bool url::CanonicalizeIpfsURL(const char* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* charset_converter, - CanonOutput* output, - Parsed* output_parsed) { - if ( spec_len < 1 || !spec ) { - return false; - } - if ( parsed.host.len < 1 ) { - return false; - } - std::string_view cid_str{ spec + parsed.host.begin, static_cast(parsed.host.len) }; - auto cid = ipfs::Cid(cid_str); - if ( !cid.valid() ) { - cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); - } - auto as_str = cid.to_string(); - if ( as_str.empty() ) { - return false; - } - std::string stdurl{ spec, static_cast(parsed.host.begin) }; - stdurl.append( as_str ); - stdurl.append( spec + parsed.host.end(), spec_len - parsed.host.end() ); - spec = stdurl.data(); - spec_len = static_cast(stdurl.size()); - Parsed parsed_input; - ParseStandardURL(spec, spec_len, &parsed_input); - return CanonicalizeStandardURL( - spec, - parsed_input, - scheme_type, - charset_converter, - output, output_parsed - ); -} -bool url::CanonicalizeIpfsURL(const char16_t* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* query_converter, - CanonOutput* output, - Parsed* new_parsed) { - RawCanonOutput<2048> as8; - ConvertUTF16ToUTF8(spec, spec_len, &as8); - return CanonicalizeIpfsURL(as8.data(), as8.length(), parsed, scheme_type, query_converter, output, new_parsed); -} diff --git a/chromium_edits/125.0.6382.3/url/url_util.cc.patch b/chromium_edits/125.0.6382.3/url/url_util.cc.patch deleted file mode 100644 index 3850fcfe..00000000 --- a/chromium_edits/125.0.6382.3/url/url_util.cc.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index 82b27b8f59684..2f3045adefaa7 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -274,8 +274,15 @@ bool DoCanonicalize(const CHAR* spec, - } else if (DoCompareSchemeComponent(spec, scheme, url::kFileSystemScheme)) { - // Filesystem URLs are special. - ParseFileSystemURL(spec, spec_len, &parsed_input); -- success = CanonicalizeFileSystemURL(spec, parsed_input, charset_converter, -- output, output_parsed); -+ success = CanonicalizeFileSystemURL(spec, parsed_input, -+ charset_converter, output, -+ output_parsed); -+ -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ ParseStandardURL(spec, spec_len, &parsed_input); -+ success = CanonicalizeIpfsURL(spec, spec_len, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. diff --git a/chromium_edits/125.0.6396.3/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/125.0.6396.3/chrome/browser/chrome_content_browser_client.cc.patch deleted file mode 100644 index b3b5d473..00000000 --- a/chromium_edits/125.0.6396.3/chrome/browser/chrome_content_browser_client.cc.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index d5db808781f83..45056e3cfc6f1 100644 ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -384,6 +384,7 @@ - #include "third_party/blink/public/common/switches.h" - #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" - #include "third_party/blink/public/public_buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "third_party/widevine/cdm/buildflags.h" - #include "ui/base/clipboard/clipboard_format_type.h" - #include "ui/base/l10n/l10n_util.h" -@@ -506,6 +507,13 @@ - #include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h" - #endif - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "chrome/browser/ipfs_extra_parts.h" -+#include "components/ipfs/interceptor.h" -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/url_loader_factory.h" -+#endif -+ - #if !BUILDFLAG(IS_ANDROID) - #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" - #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" -@@ -1725,6 +1733,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { - main_parts->AddParts( - std::make_unique()); - -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ main_parts->AddParts(std::make_unique()); -+ } -+#endif - return main_parts; - } - -@@ -6175,12 +6188,25 @@ void ChromeContentBrowserClient:: - const std::optional& request_initiator_origin, - NonNetworkURLLoaderFactoryMap* factories) { - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ -- !BUILDFLAG(IS_ANDROID) -+ !BUILDFLAG(IS_ANDROID) || BUILDFLAG(ENABLE_IPFS) - content::RenderFrameHost* frame_host = - RenderFrameHost::FromID(render_process_id, render_frame_id); - WebContents* web_contents = WebContents::FromRenderFrameHost(frame_host); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ - // !BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ network::mojom::URLLoaderFactory* default_factory = g_browser_process->system_network_context_manager()->GetURLLoaderFactory(); -+ auto* context = web_contents->GetBrowserContext(); -+ ipfs::IpfsURLLoaderFactory::Create( -+ factories, -+ context, -+ default_factory, -+ GetSystemNetworkContext(), -+ Profile::FromBrowserContext(context)->GetPrefs() -+ ); -+ } -+#endif // BUILDFLAG(ENABLE_IPFS) - - #if BUILDFLAG(IS_CHROMEOS_ASH) - if (web_contents) { -@@ -6314,6 +6340,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( - scoped_refptr navigation_response_task_runner) { - std::vector> - interceptors; -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ interceptors.push_back(std::make_unique(g_browser_process->system_network_context_manager()->GetURLLoaderFactory(), GetSystemNetworkContext())); -+ } -+#endif - #if BUILDFLAG(ENABLE_OFFLINE_PAGES) - interceptors.push_back( - std::make_unique( diff --git a/chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.h.patch b/chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.h.patch deleted file mode 100644 index 3d137c50..00000000 --- a/chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 12f08dd18eddc..ca2e551b63508 100644 ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -23,6 +23,7 @@ - #include "pdf/buildflags.h" - #include "printing/buildflags/buildflags.h" - #include "third_party/blink/public/common/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - - // This file declares strings used in chrome://flags. These messages are not - // translated, because instead of end-users they target Chromium developers and -@@ -192,6 +193,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; - extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; - extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[]; -+extern const char kEnableIpfsDescription[]; -+#endif -+ - #if BUILDFLAG(USE_FONTATIONS_BACKEND) - extern const char kFontationsFontBackendName[]; - extern const char kFontationsFontBackendDescription[]; diff --git a/chromium_edits/125.0.6396.3/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/125.0.6396.3/net/dns/dns_config_service_linux.cc.patch deleted file mode 100644 index 3b042d33..00000000 --- a/chromium_edits/125.0.6396.3/net/dns/dns_config_service_linux.cc.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc -index f909f127ba3e1..31d7f9d58c0af 100644 ---- a/net/dns/dns_config_service_linux.cc -+++ b/net/dns/dns_config_service_linux.cc -@@ -271,11 +271,11 @@ bool IsNsswitchConfigCompatible( - // Ignore any entries after `kDns` because Chrome will fallback to the - // system resolver if a result was not found in DNS. - return true; -- -+ case NsswitchReader::Service::kResolve: -+ break; - case NsswitchReader::Service::kMdns: - case NsswitchReader::Service::kMdns4: - case NsswitchReader::Service::kMdns6: -- case NsswitchReader::Service::kResolve: - case NsswitchReader::Service::kNis: - RecordIncompatibleNsswitchReason( - IncompatibleNsswitchReason::kIncompatibleService, diff --git a/chromium_edits/125.0.6396.3/url/url_canon.h.patch b/chromium_edits/125.0.6396.3/url/url_canon.h.patch deleted file mode 100644 index 71d7a758..00000000 --- a/chromium_edits/125.0.6396.3/url/url_canon.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/url/url_canon.h b/url/url_canon.h -index bd40235e4aa85..05d250fe1b746 100644 ---- a/url/url_canon.h -+++ b/url/url_canon.h -@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec, - CanonOutput* output, - Parsed* new_parsed); - -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char16_t* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+ - // Part replacer -------------------------------------------------------------- - - // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/125.0.6396.3/url/url_canon_ipfs.cc b/chromium_edits/125.0.6396.3/url/url_canon_ipfs.cc deleted file mode 100644 index d7c9fdc7..00000000 --- a/chromium_edits/125.0.6396.3/url/url_canon_ipfs.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include "url_canon_internal.h" - -#include -#include - -#include - -bool url::CanonicalizeIpfsURL(const char* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* charset_converter, - CanonOutput* output, - Parsed* output_parsed) { - if ( spec_len < 1 || !spec ) { - return false; - } - if ( parsed.host.len < 1 ) { - return false; - } - std::string_view cid_str{ spec + parsed.host.begin, static_cast(parsed.host.len) }; - auto cid = ipfs::Cid(cid_str); - if ( !cid.valid() ) { - cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); - } - auto as_str = cid.to_string(); - if ( as_str.empty() ) { - return false; - } - std::string stdurl{ spec, static_cast(parsed.host.begin) }; - stdurl.append( as_str ); - stdurl.append( spec + parsed.host.end(), spec_len - parsed.host.end() ); - spec = stdurl.data(); - spec_len = static_cast(stdurl.size()); - Parsed parsed_input; - ParseStandardURL(spec, spec_len, &parsed_input); - return CanonicalizeStandardURL( - spec, - parsed_input, - scheme_type, - charset_converter, - output, output_parsed - ); -} -bool url::CanonicalizeIpfsURL(const char16_t* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* query_converter, - CanonOutput* output, - Parsed* new_parsed) { - RawCanonOutput<2048> as8; - ConvertUTF16ToUTF8(spec, spec_len, &as8); - return CanonicalizeIpfsURL(as8.data(), as8.length(), parsed, scheme_type, query_converter, output, new_parsed); -} diff --git a/chromium_edits/125.0.6396.3/url/url_util.cc.patch b/chromium_edits/125.0.6396.3/url/url_util.cc.patch deleted file mode 100644 index 3850fcfe..00000000 --- a/chromium_edits/125.0.6396.3/url/url_util.cc.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index 82b27b8f59684..2f3045adefaa7 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -274,8 +274,15 @@ bool DoCanonicalize(const CHAR* spec, - } else if (DoCompareSchemeComponent(spec, scheme, url::kFileSystemScheme)) { - // Filesystem URLs are special. - ParseFileSystemURL(spec, spec_len, &parsed_input); -- success = CanonicalizeFileSystemURL(spec, parsed_input, charset_converter, -- output, output_parsed); -+ success = CanonicalizeFileSystemURL(spec, parsed_input, -+ charset_converter, output, -+ output_parsed); -+ -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ ParseStandardURL(spec, spec_len, &parsed_input); -+ success = CanonicalizeIpfsURL(spec, spec_len, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. diff --git a/chromium_edits/125.0.6412.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/125.0.6412.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch deleted file mode 100644 index 4d172311..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -index 4c88614c68c25..f8bb12a3b0c2e 100644 ---- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -10,6 +10,8 @@ - #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" - #include "chrome/browser/external_protocol/external_protocol_handler.h" - #include "chrome/browser/profiles/profile.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - #if BUILDFLAG(IS_ANDROID) - #include "chrome/browser/profiles/profile_android.h" - #endif -@@ -18,6 +20,9 @@ - #include "chrome/browser/ui/android/omnibox/jni_headers/ChromeAutocompleteSchemeClassifier_jni.h" - #endif - #include "components/custom_handlers/protocol_handler_registry.h" -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif - #include "content/public/common/url_constants.h" - #include "url/url_util.h" - -@@ -55,12 +60,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( - if (scheme.empty()) { - return metrics::OmniboxInputType::EMPTY; - } -- if (base::IsStringASCII(scheme) && -- (ProfileIOData::IsHandledProtocol(scheme) || -- base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme))) { -- return metrics::OmniboxInputType::URL; -+ if (base::IsStringASCII(scheme)) { -+ if (ProfileIOData::IsHandledProtocol(scheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme)) { -+ return metrics::OmniboxInputType::URL; -+ } -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs) && -+ (base::EqualsCaseInsensitiveASCII(scheme, "ipfs") || base::EqualsCaseInsensitiveASCII(scheme, "ipns")) -+ ) { -+ return metrics::OmniboxInputType::URL; -+ } -+#endif - } - - // Also check for schemes registered via registerProtocolHandler(), which diff --git a/chromium_edits/125.0.6412.0/chrome/browser/flag-metadata.json.patch b/chromium_edits/125.0.6412.0/chrome/browser/flag-metadata.json.patch deleted file mode 100644 index cf921ac0..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/flag-metadata.json.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index d48d50ebbce2a..90851e1ec68a2 100644 ---- a/chrome/browser/flag-metadata.json -+++ b/chrome/browser/flag-metadata.json -@@ -3197,6 +3197,11 @@ - "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 - }, -+ { -+ "name": "enable-ipfs", -+ "owners": [ "//components/ipfs/OWNERS" ], -+ "expiry_milestone": 150 -+ }, - { - "name": "enable-isolated-sandboxed-iframes", - "owners": [ "wjmaclean@chromium.org", "alexmos@chromium.org", "creis@chromium.org" ], diff --git a/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.cc.patch deleted file mode 100644 index cec3980b..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.cc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 200e5e39b9988..35b4d25dc3805 100644 ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -312,6 +312,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = - const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = - "Match Field Trial Testing Config"; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[] = "Enable IPFS"; -+extern const char kEnableIpfsDescription[] = "Enable ipfs:// and ipns:// URLs"; -+#endif -+ - const char kPreloadingOnPerformancePageName[] = - "Preloading Settings on Performance Page"; - const char kPreloadingOnPerformancePageDescription[] = diff --git a/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.h.patch b/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.h.patch deleted file mode 100644 index 399a8f5f..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/flag_descriptions.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 0c6f865ad6cc8..103f1389d4aa8 100644 ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -23,6 +23,7 @@ - #include "pdf/buildflags.h" - #include "printing/buildflags/buildflags.h" - #include "third_party/blink/public/common/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - - // This file declares strings used in chrome://flags. These messages are not - // translated, because instead of end-users they target Chromium developers and -@@ -204,6 +205,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; - extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; - extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[]; -+extern const char kEnableIpfsDescription[]; -+#endif -+ - #if BUILDFLAG(USE_FONTATIONS_BACKEND) - extern const char kFontationsFontBackendName[]; - extern const char kFontationsFontBackendDescription[]; diff --git a/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.cc deleted file mode 100644 index 90d2596f..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include "ipfs_extra_parts.h" - -#include "profiles/profile.h" - -#include - -void IpfsExtraParts::PostProfileInit(Profile* profile, bool /* is_initial_profile */ ) { - DCHECK(profile); - ipfs::InterRequestState::CreateForBrowserContext(profile, profile->GetPrefs()); -} diff --git a/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.h b/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.h deleted file mode 100644 index 2059c437..00000000 --- a/chromium_edits/125.0.6412.0/chrome/browser/ipfs_extra_parts.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IPFS_EXTRA_PART_H_ -#define IPFS_EXTRA_PART_H_ - -#include - -class IpfsExtraParts : public ChromeBrowserMainExtraParts { - void PostProfileInit(Profile* profile, bool is_initial_profile) override; -}; - -#endif // IPFS_EXTRA_PART_H_ diff --git a/chromium_edits/125.0.6412.0/components/cbor/reader.cc.patch b/chromium_edits/125.0.6412.0/components/cbor/reader.cc.patch deleted file mode 100644 index a9c4a7b3..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/reader.cc.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc -index 3c31e3d05e5d3..5ad0dbb183884 100644 ---- a/components/cbor/reader.cc -+++ b/components/cbor/reader.cc -@@ -22,7 +22,7 @@ - namespace cbor { - - namespace constants { --const char kUnsupportedMajorType[] = "Unsupported major type."; -+const char kUnsupportedMajorType[] = "Unsupported major type operation."; - } - - namespace { -@@ -156,7 +156,11 @@ std::optional Reader::DecodeCompleteDataItem(const Config& config, - case Value::Type::FLOAT_VALUE: - // Floating point values also go here since they are also type 7. - return DecodeToSimpleValueOrFloat(*header, config); -- case Value::Type::TAG: // We explicitly don't support TAG. -+ case Value::Type::TAG: -+ if (config.parse_tags) { -+ return ReadTagContent(*header, config, max_nesting_level); -+ } -+ break; - case Value::Type::NONE: - case Value::Type::INVALID_UTF8: - break; -@@ -347,6 +351,17 @@ std::optional Reader::ReadByteStringContent( - return Value(std::move(cbor_byte_string)); - } - -+std::optional Reader::ReadTagContent( -+ const Reader::DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level) { -+ auto tagged_content = DecodeCompleteDataItem(config, max_nesting_level); -+ if (tagged_content.has_value()) { -+ tagged_content.value().SetTag(header.value); -+ } -+ return tagged_content; -+} -+ - std::optional Reader::ReadArrayContent( - const Reader::DataItemHeader& header, - const Config& config, diff --git a/chromium_edits/125.0.6412.0/components/cbor/reader.h.patch b/chromium_edits/125.0.6412.0/components/cbor/reader.h.patch deleted file mode 100644 index cd7d9eb0..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/reader.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/components/cbor/reader.h b/components/cbor/reader.h -index 73c5dcb23e555..a933768608d73 100644 ---- a/components/cbor/reader.h -+++ b/components/cbor/reader.h -@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader { - // during decoding will set raise the `UNSUPPORTED_FLOATING_POINT_VALUE` - // error. - bool allow_floating_point = false; -+ -+ // If the parser encounters a TAG element, should it be parsed out and -+ // the tag value saved (true), or should the entire node and its content -+ // be discarded (false) -+ bool parse_tags = false; - }; - - Reader(const Reader&) = delete; -@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader { - std::optional ReadMapContent(const DataItemHeader& header, - const Config& config, - int max_nesting_level); -+ std::optional ReadTagContent(const DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level); - std::optional ReadByte(); - std::optional> ReadBytes(uint64_t num_bytes); - bool IsKeyInOrder(const Value& new_key, diff --git a/chromium_edits/125.0.6412.0/components/cbor/reader_unittest.cc.patch b/chromium_edits/125.0.6412.0/components/cbor/reader_unittest.cc.patch deleted file mode 100644 index 150e0c73..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/reader_unittest.cc.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/components/cbor/reader_unittest.cc b/components/cbor/reader_unittest.cc -index e5c02ceea3402..f26b8e77f6da3 100644 ---- a/components/cbor/reader_unittest.cc -+++ b/components/cbor/reader_unittest.cc -@@ -1449,5 +1449,42 @@ TEST(CBORReaderTest, AllowInvalidUTF8) { - EXPECT_FALSE(cbor); - EXPECT_EQ(Reader::DecoderError::INVALID_UTF8, error); - } -+TEST(CBORReaderTest, RejectsTagUnderDefaultConfig) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_FALSE(cbor.has_value()); -+} -+TEST(CBORReaderTest, ReadsTagWhenConfiguredToDoSo) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ config.parse_tags = true; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_TRUE(cbor.has_value()); -+ auto& v = cbor.value(); -+ EXPECT_TRUE(v.has_tag()); -+ EXPECT_EQ(v.GetTag(),42UL); -+ EXPECT_TRUE(v.is_bytestring()); -+ EXPECT_EQ(v.type(), Value::Type::BYTE_STRING); -+ auto& bytes = v.GetBytestring(); -+ EXPECT_EQ(bytes.size(), 37UL); -+ EXPECT_EQ(bytes.at(0), 0x00);//identity multibase (e.g. not base-encoded, bytes are themselves) -+ EXPECT_EQ(bytes.at(1), 0x01);//CID version 1 -+ EXPECT_EQ(bytes.at(2), 0x71);//codec = dag-cbor -+ EXPECT_EQ(bytes.at(3), 0x12);//multihash = 18 = sha2-256 -+ EXPECT_EQ(bytes.at(4), 0x20);//hash length = 32 bytes -+ EXPECT_EQ(bytes.at(5), 0x69);//first byte of hash digest -+ EXPECT_EQ(bytes.at(36),0x5b);//last byte of hash digest -+} - - } // namespace cbor diff --git a/chromium_edits/125.0.6412.0/components/cbor/values.cc.patch b/chromium_edits/125.0.6412.0/components/cbor/values.cc.patch deleted file mode 100644 index ddbab2b3..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/values.cc.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 02498209c820e..34055aef24cfe 100644 ---- a/components/cbor/values.cc -+++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { - NOTREACHED(); - } - --Value::Value(SimpleValue in_simple) -- : type_(Type::SIMPLE_VALUE), simple_value_(in_simple) { -+Value::Value(SimpleValue in_simple, uint64_t tag) -+ : type_(Type::SIMPLE_VALUE), simple_value_(in_simple), tag_(tag) { - CHECK(static_cast(in_simple) >= 20 && static_cast(in_simple) <= 23); - } - --Value::Value(bool boolean_value) : type_(Type::SIMPLE_VALUE) { -+Value::Value(bool boolean_value, uint64_t tag) : type_(Type::SIMPLE_VALUE), tag_(tag) { - simple_value_ = boolean_value ? Value::SimpleValue::TRUE_VALUE - : Value::SimpleValue::FALSE_VALUE; - } - --Value::Value(double float_value) -- : type_(Type::FLOAT_VALUE), float_value_(float_value) {} -+Value::Value(double float_value, uint64_t tag) -+ : type_(Type::FLOAT_VALUE), float_value_(float_value), tag_(tag) {} - --Value::Value(int integer_value) -- : Value(base::checked_cast(integer_value)) {} -+Value::Value(int integer_value, uint64_t tag) -+ : Value(base::checked_cast(integer_value), tag) {} - --Value::Value(int64_t integer_value) : integer_value_(integer_value) { -+Value::Value(int64_t integer_value, uint64_t tag) : integer_value_(integer_value), tag_(tag) { - type_ = integer_value >= 0 ? Type::UNSIGNED : Type::NEGATIVE; - } - --Value::Value(base::span in_bytes) -+Value::Value(base::span in_bytes, uint64_t tag) - : type_(Type::BYTE_STRING), -- bytestring_value_(in_bytes.begin(), in_bytes.end()) {} -+ bytestring_value_(in_bytes.begin(), in_bytes.end()), -+ tag_(tag) -+ {} - --Value::Value(base::span in_bytes, Type type) -- : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()) { -+Value::Value(base::span in_bytes, Type type, uint64_t tag) -+ : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()), tag_(tag) { - DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); - } - -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { - } - } - --Value::Value(base::StringPiece in_string, Type type) : type_(type) { -+Value::Value(base::StringPiece in_string, Type type, uint64_t tag) -+: type_(type), tag_(tag) { - switch (type_) { - case Type::STRING: - new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(base::StringPiece in_string, Type type) : type_(type) { - } - } - --Value::Value(const ArrayValue& in_array) : type_(Type::ARRAY), array_value_() { -+Value::Value(const ArrayValue& in_array, uint64_t tag) -+: type_(Type::ARRAY), array_value_(), tag_(tag) { - array_value_.reserve(in_array.size()); - for (const auto& val : in_array) - array_value_.emplace_back(val.Clone()); - } - --Value::Value(ArrayValue&& in_array) noexcept -- : type_(Type::ARRAY), array_value_(std::move(in_array)) {} -+Value::Value(ArrayValue&& in_array, uint64_t tag) noexcept -+ : type_(Type::ARRAY), array_value_(std::move(in_array)), tag_(tag) {} - --Value::Value(const MapValue& in_map) : type_(Type::MAP), map_value_() { -+Value::Value(const MapValue& in_map, uint64_t tag) -+: type_(Type::MAP), map_value_(), tag_(tag) { - map_value_.reserve(in_map.size()); - for (const auto& it : in_map) - map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { - case Type::NONE: - return Value(); - case Type::INVALID_UTF8: -- return Value(bytestring_value_, Type::INVALID_UTF8); -+ return Value(bytestring_value_, Type::INVALID_UTF8, tag_); - case Type::UNSIGNED: - case Type::NEGATIVE: -- return Value(integer_value_); -+ return Value(integer_value_, tag_); - case Type::BYTE_STRING: -- return Value(bytestring_value_); -+ return Value(bytestring_value_, tag_); - case Type::STRING: -- return Value(string_value_); -+ return Value(string_value_, Type::STRING, tag_); - case Type::ARRAY: -- return Value(array_value_); -+ return Value(array_value_, tag_); - case Type::MAP: -- return Value(map_value_); -+ return Value(map_value_, tag_); - case Type::TAG: - NOTREACHED() << constants::kUnsupportedMajorType; - return Value(); - case Type::SIMPLE_VALUE: -- return Value(simple_value_); -+ return Value(simple_value_, tag_); - case Type::FLOAT_VALUE: -- return Value(float_value_); -+ return Value(float_value_, tag_); - } - - NOTREACHED(); - return Value(); - } - -+Value& Value::SetTag(uint64_t tag) noexcept { -+ tag_ = tag; -+ return *this; -+} -+ - Value::SimpleValue Value::GetSimpleValue() const { - CHECK(is_simple()); - return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { - return bytestring_value_; - } - -+uint64_t Value::GetTag() const { -+ CHECK(has_tag()); -+ return tag_; -+} -+ - void Value::InternalMoveConstructFrom(Value&& that) { - type_ = that.type_; -- -+ tag_ = that.tag_; - switch (type_) { - case Type::UNSIGNED: - case Type::NEGATIVE: diff --git a/chromium_edits/125.0.6412.0/components/cbor/values.h.patch b/chromium_edits/125.0.6412.0/components/cbor/values.h.patch deleted file mode 100644 index ca39df01..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/values.h.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/components/cbor/values.h b/components/cbor/values.h -index d81ef5607c55a..10216a8dcdc57 100644 ---- a/components/cbor/values.h -+++ b/components/cbor/values.h -@@ -127,28 +127,29 @@ class CBOR_EXPORT Value { - - explicit Value(Type type); - -- explicit Value(SimpleValue in_simple); -- explicit Value(bool boolean_value); -- explicit Value(double in_float); -+ explicit Value(SimpleValue in_simple, uint64_t tag = NO_TAG); -+ explicit Value(bool boolean_value, uint64_t tag = NO_TAG); -+ explicit Value(double in_float, uint64_t tag = NO_TAG); - -- explicit Value(int integer_value); -- explicit Value(int64_t integer_value); -+ explicit Value(int integer_value, uint64_t tag = NO_TAG); -+ explicit Value(int64_t integer_value, uint64_t tag = NO_TAG); - explicit Value(uint64_t integer_value) = delete; - -- explicit Value(base::span in_bytes); -+ explicit Value(base::span in_bytes, uint64_t tag = NO_TAG); - explicit Value(BinaryValue&& in_bytes) noexcept; - - explicit Value(const char* in_string, Type type = Type::STRING); - explicit Value(std::string&& in_string, Type type = Type::STRING) noexcept; -- explicit Value(base::StringPiece in_string, Type type = Type::STRING); -+ explicit Value(base::StringPiece in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); - -- explicit Value(const ArrayValue& in_array); -- explicit Value(ArrayValue&& in_array) noexcept; -+ explicit Value(const ArrayValue& in_array, uint64_t tag = NO_TAG); -+ explicit Value(ArrayValue&& in_array, uint64_t tag = NO_TAG) noexcept; - -- explicit Value(const MapValue& in_map); -+ explicit Value(const MapValue& in_map, uint64_t tag = NO_TAG); - explicit Value(MapValue&& in_map) noexcept; - - Value& operator=(Value&& that) noexcept; -+ Value& SetTag(uint64_t) noexcept; - - Value(const Value&) = delete; - Value& operator=(const Value&) = delete; -@@ -179,6 +180,7 @@ class CBOR_EXPORT Value { - bool is_string() const { return type() == Type::STRING; } - bool is_array() const { return type() == Type::ARRAY; } - bool is_map() const { return type() == Type::MAP; } -+ bool has_tag() const { return tag_ != NO_TAG; } - - // These will all fatally assert if the type doesn't match. - SimpleValue GetSimpleValue() const; -@@ -194,12 +196,13 @@ class CBOR_EXPORT Value { - const ArrayValue& GetArray() const; - const MapValue& GetMap() const; - const BinaryValue& GetInvalidUTF8() const; -+ uint64_t GetTag() const; - - private: - friend class Reader; - // This constructor allows INVALID_UTF8 values to be created, which only - // |Reader| and InvalidUTF8StringValueForTesting() may do. -- Value(base::span in_bytes, Type type); -+ Value(base::span in_bytes, Type type, uint64_t tag = NO_TAG); - - Type type_; - -@@ -213,6 +216,11 @@ class CBOR_EXPORT Value { - MapValue map_value_; - }; - -+ //This value specified as Invalid, -+ // used here to represent absence of TAG -+ constexpr static uint64_t NO_TAG = 0xFFFF; -+ uint64_t tag_ = NO_TAG; -+ - void InternalMoveConstructFrom(Value&& that); - void InternalCleanup(); - }; diff --git a/chromium_edits/125.0.6412.0/components/cbor/writer.cc.patch b/chromium_edits/125.0.6412.0/components/cbor/writer.cc.patch deleted file mode 100644 index bb89c1e6..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/writer.cc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc -index f400a65e7b66a..fcdebb8f3b458 100644 ---- a/components/cbor/writer.cc -+++ b/components/cbor/writer.cc -@@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node, - if (max_nesting_level < 0) - return false; - -+ if (node.has_tag()) { -+ StartItem(Value::Type::TAG, node.GetTag()); -+ } - switch (node.type()) { - case Value::Type::NONE: { - StartItem(Value::Type::BYTE_STRING, 0); diff --git a/chromium_edits/125.0.6412.0/components/cbor/writer_unittest.cc.patch b/chromium_edits/125.0.6412.0/components/cbor/writer_unittest.cc.patch deleted file mode 100644 index 240fee83..00000000 --- a/chromium_edits/125.0.6412.0/components/cbor/writer_unittest.cc.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/components/cbor/writer_unittest.cc b/components/cbor/writer_unittest.cc -index e3bffe20734bc..0ed569ae164a0 100644 ---- a/components/cbor/writer_unittest.cc -+++ b/components/cbor/writer_unittest.cc -@@ -522,4 +522,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { - EXPECT_FALSE(Writer::Write(Value(map), 4).has_value()); - } - -+TEST(CBORWriterTest, CanWriteTag) { -+ std::array content{ -+ 0x00, 0x01, 0x71, 0x12, 0x20, -+ 0x69, 0xea, 0x07, 0x40, 0xf9, -+ 0x80, 0x7a, 0x28, 0xf4, 0xd9, -+ 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, -+ 0x07, 0x2c, 0x90, 0x26, 0x6a, -+ 0xb3, 0xe7, 0x9d, 0xf6, 0x3a, -+ 0x36, 0x5b -+ }; -+ Value to_write(content); -+ to_write.SetTag(42); -+ auto result = Writer::Write(to_write); -+ EXPECT_TRUE(result.has_value()); -+ auto& bytes = result.value(); -+ EXPECT_EQ(bytes.size(), 41UL); -+ EXPECT_EQ(bytes.at(0), 0xd8); -+ EXPECT_EQ(bytes.at(1), 0x2a); -+ EXPECT_EQ(bytes.at(2), 0x58); -+ EXPECT_EQ(bytes.at(3), 0x25); -+ for (auto i = 0UL; i < content.size(); ++i) { -+ ASSERT_LT(i + 4UL, bytes.size()); -+ ASSERT_EQ(content.at(i), bytes.at(i+4UL)); -+ } -+} -+ - } // namespace cbor diff --git a/chromium_edits/125.0.6412.0/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/125.0.6412.0/net/dns/dns_config_service_linux.cc.patch deleted file mode 100644 index 3b042d33..00000000 --- a/chromium_edits/125.0.6412.0/net/dns/dns_config_service_linux.cc.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc -index f909f127ba3e1..31d7f9d58c0af 100644 ---- a/net/dns/dns_config_service_linux.cc -+++ b/net/dns/dns_config_service_linux.cc -@@ -271,11 +271,11 @@ bool IsNsswitchConfigCompatible( - // Ignore any entries after `kDns` because Chrome will fallback to the - // system resolver if a result was not found in DNS. - return true; -- -+ case NsswitchReader::Service::kResolve: -+ break; - case NsswitchReader::Service::kMdns: - case NsswitchReader::Service::kMdns4: - case NsswitchReader::Service::kMdns6: -- case NsswitchReader::Service::kResolve: - case NsswitchReader::Service::kNis: - RecordIncompatibleNsswitchReason( - IncompatibleNsswitchReason::kIncompatibleService, diff --git a/chromium_edits/125.0.6412.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/125.0.6412.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch deleted file mode 100644 index 7fcbedc1..00000000 --- a/chromium_edits/125.0.6412.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index 62163e44e292e..60d00b8140759 100644 ---- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -+++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -66,7 +66,7 @@ class URLSchemesRegistry final { - // is considered secure. Additional checks are performed to ensure that - // other http pages are filtered out. - service_worker_schemes({"http", "https"}), -- fetch_api_schemes({"http", "https"}), -+ fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { - for (auto& scheme : url::GetCorsEnabledSchemes()) - cors_enabled_schemes.insert(scheme.c_str()); diff --git a/chromium_edits/125.0.6412.0/url/BUILD.gn.patch b/chromium_edits/125.0.6412.0/url/BUILD.gn.patch deleted file mode 100644 index 201770c4..00000000 --- a/chromium_edits/125.0.6412.0/url/BUILD.gn.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/url/BUILD.gn b/url/BUILD.gn -index aedf1bf9f80be..b11c73a88aae5 100644 ---- a/url/BUILD.gn -+++ b/url/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/buildflag_header.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//testing/test.gni") -+import("//third_party/ipfs_client/args.gni") - import("features.gni") - - import("//build/config/cronet/config.gni") -@@ -67,6 +68,7 @@ component("url") { - public_deps = [ - "//base", - "//build:robolectric_buildflags", -+ "//third_party/ipfs_client:ipfs_buildflags", - ] - - configs += [ "//build/config/compiler:wexit_time_destructors" ] -@@ -89,6 +91,11 @@ component("url") { - public_configs = [ "//third_party/jdk" ] - } - -+ if (enable_ipfs) { -+ sources += [ "url_canon_ipfs.cc" ] -+ deps += [ "//third_party/ipfs_client:ipfs_client" ] -+ } -+ - if (is_win) { - # Don't conflict with Windows' "url.dll". - output_name = "url_lib" diff --git a/chromium_edits/125.0.6412.0/url/url_canon.h.patch b/chromium_edits/125.0.6412.0/url/url_canon.h.patch deleted file mode 100644 index 71d7a758..00000000 --- a/chromium_edits/125.0.6412.0/url/url_canon.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/url/url_canon.h b/url/url_canon.h -index bd40235e4aa85..05d250fe1b746 100644 ---- a/url/url_canon.h -+++ b/url/url_canon.h -@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec, - CanonOutput* output, - Parsed* new_parsed); - -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char16_t* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+ - // Part replacer -------------------------------------------------------------- - - // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/125.0.6412.0/url/url_canon_ipfs.cc b/chromium_edits/125.0.6412.0/url/url_canon_ipfs.cc deleted file mode 100644 index d7c9fdc7..00000000 --- a/chromium_edits/125.0.6412.0/url/url_canon_ipfs.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include "url_canon_internal.h" - -#include -#include - -#include - -bool url::CanonicalizeIpfsURL(const char* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* charset_converter, - CanonOutput* output, - Parsed* output_parsed) { - if ( spec_len < 1 || !spec ) { - return false; - } - if ( parsed.host.len < 1 ) { - return false; - } - std::string_view cid_str{ spec + parsed.host.begin, static_cast(parsed.host.len) }; - auto cid = ipfs::Cid(cid_str); - if ( !cid.valid() ) { - cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); - } - auto as_str = cid.to_string(); - if ( as_str.empty() ) { - return false; - } - std::string stdurl{ spec, static_cast(parsed.host.begin) }; - stdurl.append( as_str ); - stdurl.append( spec + parsed.host.end(), spec_len - parsed.host.end() ); - spec = stdurl.data(); - spec_len = static_cast(stdurl.size()); - Parsed parsed_input; - ParseStandardURL(spec, spec_len, &parsed_input); - return CanonicalizeStandardURL( - spec, - parsed_input, - scheme_type, - charset_converter, - output, output_parsed - ); -} -bool url::CanonicalizeIpfsURL(const char16_t* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* query_converter, - CanonOutput* output, - Parsed* new_parsed) { - RawCanonOutput<2048> as8; - ConvertUTF16ToUTF8(spec, spec_len, &as8); - return CanonicalizeIpfsURL(as8.data(), as8.length(), parsed, scheme_type, query_converter, output, new_parsed); -} diff --git a/chromium_edits/125.0.6412.0/url/url_util.cc.patch b/chromium_edits/125.0.6412.0/url/url_util.cc.patch deleted file mode 100644 index e61af3d0..00000000 --- a/chromium_edits/125.0.6412.0/url/url_util.cc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index edf357900d9c1..2b8aeb53ff0db 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -276,7 +276,11 @@ bool DoCanonicalize(const CHAR* spec, - success = CanonicalizeFileSystemURL( - spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), - charset_converter, output, output_parsed); -- -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ ParseStandardURL(spec, spec_len, &parsed_input); -+ success = CanonicalizeIpfsURL(spec, spec_len, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. - ParseStandardURL(spec, spec_len, &parsed_input); diff --git a/chromium_edits/125.0.6420.4/chrome/browser/BUILD.gn.patch b/chromium_edits/125.0.6420.4/chrome/browser/BUILD.gn.patch deleted file mode 100644 index 449b0066..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/BUILD.gn.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 9a420cb65270e..1f5ca88f423db 100644 ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -39,6 +39,7 @@ import("//sandbox/features.gni") - import("//services/screen_ai/buildflags/features.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//third_party/blink/public/public_features.gni") -+import("//third_party/ipfs_client/args.gni") - import("//third_party/protobuf/proto_library.gni") - import("//third_party/webrtc/webrtc.gni") - import("//third_party/widevine/cdm/widevine.gni") -@@ -2701,6 +2702,14 @@ static_library("browser") { - ] - } - -+ if (enable_ipfs) { -+ sources += [ -+ "ipfs_extra_parts.cc", -+ "ipfs_extra_parts.h", -+ ] -+ deps += [ "//components/ipfs" ] -+ } -+ - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } diff --git a/chromium_edits/125.0.6420.4/chrome/browser/about_flags.cc.patch b/chromium_edits/125.0.6420.4/chrome/browser/about_flags.cc.patch deleted file mode 100644 index 22d21f01..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/about_flags.cc.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index ff3c5fb35a65b..eeca386418267 100644 ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -217,6 +217,7 @@ - #include "third_party/blink/public/common/features_generated.h" - #include "third_party/blink/public/common/forcedark/forcedark_switches.h" - #include "third_party/blink/public/common/switches.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "ui/accessibility/accessibility_features.h" - #include "ui/accessibility/accessibility_switches.h" - #include "ui/base/ozone_buildflags.h" -@@ -311,6 +312,10 @@ - #include "extensions/common/switches.h" - #endif // BUILDFLAG(ENABLE_EXTENSIONS) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif -+ - #if BUILDFLAG(ENABLE_PDF) - #include "pdf/pdf_features.h" - #endif -@@ -9582,6 +9587,14 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOmitCorsClientCertDescription, kOsAll, - FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, - -+#if BUILDFLAG(ENABLE_IPFS) -+ {"enable-ipfs", -+ flag_descriptions::kEnableIpfsName, -+ flag_descriptions::kEnableIpfsDescription, -+ kOsMac | kOsWin | kOsLinux,//TODO: These are the only variants currently getting built, but that is not likely to remain the case -+ FEATURE_VALUE_TYPE(ipfs::kEnableIpfs)}, -+#endif -+ - {"use-idna2008-non-transitional", - flag_descriptions::kUseIDNA2008NonTransitionalName, - flag_descriptions::kUseIDNA2008NonTransitionalDescription, kOsAll, diff --git a/chromium_edits/125.0.6420.4/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/125.0.6420.4/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch deleted file mode 100644 index 4d172311..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -index 4c88614c68c25..f8bb12a3b0c2e 100644 ---- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -10,6 +10,8 @@ - #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" - #include "chrome/browser/external_protocol/external_protocol_handler.h" - #include "chrome/browser/profiles/profile.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - #if BUILDFLAG(IS_ANDROID) - #include "chrome/browser/profiles/profile_android.h" - #endif -@@ -18,6 +20,9 @@ - #include "chrome/browser/ui/android/omnibox/jni_headers/ChromeAutocompleteSchemeClassifier_jni.h" - #endif - #include "components/custom_handlers/protocol_handler_registry.h" -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif - #include "content/public/common/url_constants.h" - #include "url/url_util.h" - -@@ -55,12 +60,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( - if (scheme.empty()) { - return metrics::OmniboxInputType::EMPTY; - } -- if (base::IsStringASCII(scheme) && -- (ProfileIOData::IsHandledProtocol(scheme) || -- base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -- base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme))) { -- return metrics::OmniboxInputType::URL; -+ if (base::IsStringASCII(scheme)) { -+ if (ProfileIOData::IsHandledProtocol(scheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) || -+ base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme)) { -+ return metrics::OmniboxInputType::URL; -+ } -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs) && -+ (base::EqualsCaseInsensitiveASCII(scheme, "ipfs") || base::EqualsCaseInsensitiveASCII(scheme, "ipns")) -+ ) { -+ return metrics::OmniboxInputType::URL; -+ } -+#endif - } - - // Also check for schemes registered via registerProtocolHandler(), which diff --git a/chromium_edits/125.0.6420.4/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/125.0.6420.4/chrome/browser/chrome_content_browser_client.cc.patch deleted file mode 100644 index fe5d26ea..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/chrome_content_browser_client.cc.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index 3c7858254be27..caf868cf70523 100644 ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -384,6 +384,7 @@ - #include "third_party/blink/public/common/switches.h" - #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" - #include "third_party/blink/public/public_buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "third_party/widevine/cdm/buildflags.h" - #include "ui/base/clipboard/clipboard_format_type.h" - #include "ui/base/l10n/l10n_util.h" -@@ -506,6 +507,13 @@ - #include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h" - #endif - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "chrome/browser/ipfs_extra_parts.h" -+#include "components/ipfs/interceptor.h" -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/url_loader_factory.h" -+#endif -+ - #if !BUILDFLAG(IS_ANDROID) - #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" - #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" -@@ -1723,6 +1731,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { - main_parts->AddParts( - std::make_unique()); - -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ main_parts->AddParts(std::make_unique()); -+ } -+#endif - return main_parts; - } - -@@ -6161,12 +6174,25 @@ void ChromeContentBrowserClient:: - const std::optional& request_initiator_origin, - NonNetworkURLLoaderFactoryMap* factories) { - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ -- !BUILDFLAG(IS_ANDROID) -+ !BUILDFLAG(IS_ANDROID) || BUILDFLAG(ENABLE_IPFS) - content::RenderFrameHost* frame_host = - RenderFrameHost::FromID(render_process_id, render_frame_id); - WebContents* web_contents = WebContents::FromRenderFrameHost(frame_host); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ - // !BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ network::mojom::URLLoaderFactory* default_factory = g_browser_process->system_network_context_manager()->GetURLLoaderFactory(); -+ auto* context = web_contents->GetBrowserContext(); -+ ipfs::IpfsURLLoaderFactory::Create( -+ factories, -+ context, -+ default_factory, -+ GetSystemNetworkContext(), -+ Profile::FromBrowserContext(context)->GetPrefs() -+ ); -+ } -+#endif // BUILDFLAG(ENABLE_IPFS) - - #if BUILDFLAG(IS_CHROMEOS_ASH) - if (web_contents) { -@@ -6301,6 +6327,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( - scoped_refptr navigation_response_task_runner) { - std::vector> - interceptors; -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ interceptors.push_back(std::make_unique(g_browser_process->system_network_context_manager()->GetURLLoaderFactory(), GetSystemNetworkContext())); -+ } -+#endif - #if BUILDFLAG(ENABLE_OFFLINE_PAGES) - interceptors.push_back( - std::make_unique( diff --git a/chromium_edits/125.0.6420.4/chrome/browser/flag-metadata.json.patch b/chromium_edits/125.0.6420.4/chrome/browser/flag-metadata.json.patch deleted file mode 100644 index 7fc91a6a..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/flag-metadata.json.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index e01b7f0cb3dc0..2344f41e07b6b 100644 ---- a/chrome/browser/flag-metadata.json -+++ b/chrome/browser/flag-metadata.json -@@ -3207,6 +3207,11 @@ - "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 - }, -+ { -+ "name": "enable-ipfs", -+ "owners": [ "//components/ipfs/OWNERS" ], -+ "expiry_milestone": 150 -+ }, - { - "name": "enable-isolated-sandboxed-iframes", - "owners": [ "wjmaclean@chromium.org", "alexmos@chromium.org", "creis@chromium.org" ], diff --git a/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.cc.patch deleted file mode 100644 index 1b0ff97f..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.cc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 152c5bb68f96c..a70a6ceb1bd81 100644 ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -318,6 +318,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = - const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = - "Match Field Trial Testing Config"; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[] = "Enable IPFS"; -+extern const char kEnableIpfsDescription[] = "Enable ipfs:// and ipns:// URLs"; -+#endif -+ - const char kPreloadingOnPerformancePageName[] = - "Preloading Settings on Performance Page"; - const char kPreloadingOnPerformancePageDescription[] = diff --git a/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.h.patch b/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.h.patch deleted file mode 100644 index b9ace2ac..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/flag_descriptions.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 47e3ec83992a7..742ae952d7b30 100644 ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -23,6 +23,7 @@ - #include "pdf/buildflags.h" - #include "printing/buildflags/buildflags.h" - #include "third_party/blink/public/common/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - - // This file declares strings used in chrome://flags. These messages are not - // translated, because instead of end-users they target Chromium developers and -@@ -207,6 +208,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; - extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; - extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[]; -+extern const char kEnableIpfsDescription[]; -+#endif -+ - #if BUILDFLAG(USE_FONTATIONS_BACKEND) - extern const char kFontationsFontBackendName[]; - extern const char kFontationsFontBackendDescription[]; diff --git a/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.cc deleted file mode 100644 index 90d2596f..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include "ipfs_extra_parts.h" - -#include "profiles/profile.h" - -#include - -void IpfsExtraParts::PostProfileInit(Profile* profile, bool /* is_initial_profile */ ) { - DCHECK(profile); - ipfs::InterRequestState::CreateForBrowserContext(profile, profile->GetPrefs()); -} diff --git a/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.h b/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.h deleted file mode 100644 index 2059c437..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/ipfs_extra_parts.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IPFS_EXTRA_PART_H_ -#define IPFS_EXTRA_PART_H_ - -#include - -class IpfsExtraParts : public ChromeBrowserMainExtraParts { - void PostProfileInit(Profile* profile, bool is_initial_profile) override; -}; - -#endif // IPFS_EXTRA_PART_H_ diff --git a/chromium_edits/125.0.6420.4/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/125.0.6420.4/chrome/browser/prefs/browser_prefs.cc.patch deleted file mode 100644 index 0f1afc36..00000000 --- a/chromium_edits/125.0.6420.4/chrome/browser/prefs/browser_prefs.cc.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 65af203b767f3..9e3c30a50e01f 100644 ---- a/chrome/browser/prefs/browser_prefs.cc -+++ b/chrome/browser/prefs/browser_prefs.cc -@@ -189,6 +189,8 @@ - #include "printing/buildflags/buildflags.h" - #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - - #if BUILDFLAG(ENABLE_BACKGROUND_MODE) - #include "chrome/browser/background/background_mode_manager.h" -@@ -233,6 +235,11 @@ - #include "chrome/browser/pdf/pdf_pref_names.h" - #endif // BUILDFLAG(ENABLE_PDF) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/preferences.h" -+#endif -+ - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1808,6 +1815,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - IncognitoModePrefs::RegisterProfilePrefs(registry); - invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); - invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ ipfs::RegisterPreferences(registry); -+ } -+#endif - language::LanguagePrefs::RegisterProfilePrefs(registry); - login_detection::prefs::RegisterProfilePrefs(registry); - lookalikes::RegisterProfilePrefs(registry); diff --git a/chromium_edits/125.0.6420.4/chrome/common/chrome_content_client.cc.patch b/chromium_edits/125.0.6420.4/chrome/common/chrome_content_client.cc.patch deleted file mode 100644 index 59ea01c2..00000000 --- a/chromium_edits/125.0.6420.4/chrome/common/chrome_content_client.cc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 2f016718fdd3c..bc38d5c2e4d8e 100644 ---- a/chrome/common/chrome_content_client.cc -+++ b/chrome/common/chrome_content_client.cc -@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { - #if BUILDFLAG(IS_ANDROID) - schemes->local_schemes.push_back(url::kContentScheme); - #endif -+ for ( const char* ip_s : {"ipfs", "ipns"} ) { -+ schemes->standard_schemes.push_back(ip_s); -+ schemes->cors_enabled_schemes.push_back(ip_s); -+ schemes->secure_schemes.push_back(ip_s); -+ schemes->csp_bypassing_schemes.push_back(ip_s); -+ } - } - - std::u16string ChromeContentClient::GetLocalizedString(int message_id) { diff --git a/chromium_edits/125.0.6420.4/components/cbor/reader.cc.patch b/chromium_edits/125.0.6420.4/components/cbor/reader.cc.patch deleted file mode 100644 index a9c4a7b3..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/reader.cc.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc -index 3c31e3d05e5d3..5ad0dbb183884 100644 ---- a/components/cbor/reader.cc -+++ b/components/cbor/reader.cc -@@ -22,7 +22,7 @@ - namespace cbor { - - namespace constants { --const char kUnsupportedMajorType[] = "Unsupported major type."; -+const char kUnsupportedMajorType[] = "Unsupported major type operation."; - } - - namespace { -@@ -156,7 +156,11 @@ std::optional Reader::DecodeCompleteDataItem(const Config& config, - case Value::Type::FLOAT_VALUE: - // Floating point values also go here since they are also type 7. - return DecodeToSimpleValueOrFloat(*header, config); -- case Value::Type::TAG: // We explicitly don't support TAG. -+ case Value::Type::TAG: -+ if (config.parse_tags) { -+ return ReadTagContent(*header, config, max_nesting_level); -+ } -+ break; - case Value::Type::NONE: - case Value::Type::INVALID_UTF8: - break; -@@ -347,6 +351,17 @@ std::optional Reader::ReadByteStringContent( - return Value(std::move(cbor_byte_string)); - } - -+std::optional Reader::ReadTagContent( -+ const Reader::DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level) { -+ auto tagged_content = DecodeCompleteDataItem(config, max_nesting_level); -+ if (tagged_content.has_value()) { -+ tagged_content.value().SetTag(header.value); -+ } -+ return tagged_content; -+} -+ - std::optional Reader::ReadArrayContent( - const Reader::DataItemHeader& header, - const Config& config, diff --git a/chromium_edits/125.0.6420.4/components/cbor/reader.h.patch b/chromium_edits/125.0.6420.4/components/cbor/reader.h.patch deleted file mode 100644 index cd7d9eb0..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/reader.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/components/cbor/reader.h b/components/cbor/reader.h -index 73c5dcb23e555..a933768608d73 100644 ---- a/components/cbor/reader.h -+++ b/components/cbor/reader.h -@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader { - // during decoding will set raise the `UNSUPPORTED_FLOATING_POINT_VALUE` - // error. - bool allow_floating_point = false; -+ -+ // If the parser encounters a TAG element, should it be parsed out and -+ // the tag value saved (true), or should the entire node and its content -+ // be discarded (false) -+ bool parse_tags = false; - }; - - Reader(const Reader&) = delete; -@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader { - std::optional ReadMapContent(const DataItemHeader& header, - const Config& config, - int max_nesting_level); -+ std::optional ReadTagContent(const DataItemHeader& header, -+ const Config& config, -+ int max_nesting_level); - std::optional ReadByte(); - std::optional> ReadBytes(uint64_t num_bytes); - bool IsKeyInOrder(const Value& new_key, diff --git a/chromium_edits/125.0.6420.4/components/cbor/reader_unittest.cc.patch b/chromium_edits/125.0.6420.4/components/cbor/reader_unittest.cc.patch deleted file mode 100644 index 150e0c73..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/reader_unittest.cc.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/components/cbor/reader_unittest.cc b/components/cbor/reader_unittest.cc -index e5c02ceea3402..f26b8e77f6da3 100644 ---- a/components/cbor/reader_unittest.cc -+++ b/components/cbor/reader_unittest.cc -@@ -1449,5 +1449,42 @@ TEST(CBORReaderTest, AllowInvalidUTF8) { - EXPECT_FALSE(cbor); - EXPECT_EQ(Reader::DecoderError::INVALID_UTF8, error); - } -+TEST(CBORReaderTest, RejectsTagUnderDefaultConfig) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_FALSE(cbor.has_value()); -+} -+TEST(CBORReaderTest, ReadsTagWhenConfiguredToDoSo) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ config.parse_tags = true; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_TRUE(cbor.has_value()); -+ auto& v = cbor.value(); -+ EXPECT_TRUE(v.has_tag()); -+ EXPECT_EQ(v.GetTag(),42UL); -+ EXPECT_TRUE(v.is_bytestring()); -+ EXPECT_EQ(v.type(), Value::Type::BYTE_STRING); -+ auto& bytes = v.GetBytestring(); -+ EXPECT_EQ(bytes.size(), 37UL); -+ EXPECT_EQ(bytes.at(0), 0x00);//identity multibase (e.g. not base-encoded, bytes are themselves) -+ EXPECT_EQ(bytes.at(1), 0x01);//CID version 1 -+ EXPECT_EQ(bytes.at(2), 0x71);//codec = dag-cbor -+ EXPECT_EQ(bytes.at(3), 0x12);//multihash = 18 = sha2-256 -+ EXPECT_EQ(bytes.at(4), 0x20);//hash length = 32 bytes -+ EXPECT_EQ(bytes.at(5), 0x69);//first byte of hash digest -+ EXPECT_EQ(bytes.at(36),0x5b);//last byte of hash digest -+} - - } // namespace cbor diff --git a/chromium_edits/125.0.6420.4/components/cbor/values.cc.patch b/chromium_edits/125.0.6420.4/components/cbor/values.cc.patch deleted file mode 100644 index ddbab2b3..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/values.cc.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 02498209c820e..34055aef24cfe 100644 ---- a/components/cbor/values.cc -+++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { - NOTREACHED(); - } - --Value::Value(SimpleValue in_simple) -- : type_(Type::SIMPLE_VALUE), simple_value_(in_simple) { -+Value::Value(SimpleValue in_simple, uint64_t tag) -+ : type_(Type::SIMPLE_VALUE), simple_value_(in_simple), tag_(tag) { - CHECK(static_cast(in_simple) >= 20 && static_cast(in_simple) <= 23); - } - --Value::Value(bool boolean_value) : type_(Type::SIMPLE_VALUE) { -+Value::Value(bool boolean_value, uint64_t tag) : type_(Type::SIMPLE_VALUE), tag_(tag) { - simple_value_ = boolean_value ? Value::SimpleValue::TRUE_VALUE - : Value::SimpleValue::FALSE_VALUE; - } - --Value::Value(double float_value) -- : type_(Type::FLOAT_VALUE), float_value_(float_value) {} -+Value::Value(double float_value, uint64_t tag) -+ : type_(Type::FLOAT_VALUE), float_value_(float_value), tag_(tag) {} - --Value::Value(int integer_value) -- : Value(base::checked_cast(integer_value)) {} -+Value::Value(int integer_value, uint64_t tag) -+ : Value(base::checked_cast(integer_value), tag) {} - --Value::Value(int64_t integer_value) : integer_value_(integer_value) { -+Value::Value(int64_t integer_value, uint64_t tag) : integer_value_(integer_value), tag_(tag) { - type_ = integer_value >= 0 ? Type::UNSIGNED : Type::NEGATIVE; - } - --Value::Value(base::span in_bytes) -+Value::Value(base::span in_bytes, uint64_t tag) - : type_(Type::BYTE_STRING), -- bytestring_value_(in_bytes.begin(), in_bytes.end()) {} -+ bytestring_value_(in_bytes.begin(), in_bytes.end()), -+ tag_(tag) -+ {} - --Value::Value(base::span in_bytes, Type type) -- : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()) { -+Value::Value(base::span in_bytes, Type type, uint64_t tag) -+ : type_(type), bytestring_value_(in_bytes.begin(), in_bytes.end()), tag_(tag) { - DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); - } - -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { - } - } - --Value::Value(base::StringPiece in_string, Type type) : type_(type) { -+Value::Value(base::StringPiece in_string, Type type, uint64_t tag) -+: type_(type), tag_(tag) { - switch (type_) { - case Type::STRING: - new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(base::StringPiece in_string, Type type) : type_(type) { - } - } - --Value::Value(const ArrayValue& in_array) : type_(Type::ARRAY), array_value_() { -+Value::Value(const ArrayValue& in_array, uint64_t tag) -+: type_(Type::ARRAY), array_value_(), tag_(tag) { - array_value_.reserve(in_array.size()); - for (const auto& val : in_array) - array_value_.emplace_back(val.Clone()); - } - --Value::Value(ArrayValue&& in_array) noexcept -- : type_(Type::ARRAY), array_value_(std::move(in_array)) {} -+Value::Value(ArrayValue&& in_array, uint64_t tag) noexcept -+ : type_(Type::ARRAY), array_value_(std::move(in_array)), tag_(tag) {} - --Value::Value(const MapValue& in_map) : type_(Type::MAP), map_value_() { -+Value::Value(const MapValue& in_map, uint64_t tag) -+: type_(Type::MAP), map_value_(), tag_(tag) { - map_value_.reserve(in_map.size()); - for (const auto& it : in_map) - map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { - case Type::NONE: - return Value(); - case Type::INVALID_UTF8: -- return Value(bytestring_value_, Type::INVALID_UTF8); -+ return Value(bytestring_value_, Type::INVALID_UTF8, tag_); - case Type::UNSIGNED: - case Type::NEGATIVE: -- return Value(integer_value_); -+ return Value(integer_value_, tag_); - case Type::BYTE_STRING: -- return Value(bytestring_value_); -+ return Value(bytestring_value_, tag_); - case Type::STRING: -- return Value(string_value_); -+ return Value(string_value_, Type::STRING, tag_); - case Type::ARRAY: -- return Value(array_value_); -+ return Value(array_value_, tag_); - case Type::MAP: -- return Value(map_value_); -+ return Value(map_value_, tag_); - case Type::TAG: - NOTREACHED() << constants::kUnsupportedMajorType; - return Value(); - case Type::SIMPLE_VALUE: -- return Value(simple_value_); -+ return Value(simple_value_, tag_); - case Type::FLOAT_VALUE: -- return Value(float_value_); -+ return Value(float_value_, tag_); - } - - NOTREACHED(); - return Value(); - } - -+Value& Value::SetTag(uint64_t tag) noexcept { -+ tag_ = tag; -+ return *this; -+} -+ - Value::SimpleValue Value::GetSimpleValue() const { - CHECK(is_simple()); - return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { - return bytestring_value_; - } - -+uint64_t Value::GetTag() const { -+ CHECK(has_tag()); -+ return tag_; -+} -+ - void Value::InternalMoveConstructFrom(Value&& that) { - type_ = that.type_; -- -+ tag_ = that.tag_; - switch (type_) { - case Type::UNSIGNED: - case Type::NEGATIVE: diff --git a/chromium_edits/125.0.6420.4/components/cbor/values.h.patch b/chromium_edits/125.0.6420.4/components/cbor/values.h.patch deleted file mode 100644 index ca39df01..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/values.h.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/components/cbor/values.h b/components/cbor/values.h -index d81ef5607c55a..10216a8dcdc57 100644 ---- a/components/cbor/values.h -+++ b/components/cbor/values.h -@@ -127,28 +127,29 @@ class CBOR_EXPORT Value { - - explicit Value(Type type); - -- explicit Value(SimpleValue in_simple); -- explicit Value(bool boolean_value); -- explicit Value(double in_float); -+ explicit Value(SimpleValue in_simple, uint64_t tag = NO_TAG); -+ explicit Value(bool boolean_value, uint64_t tag = NO_TAG); -+ explicit Value(double in_float, uint64_t tag = NO_TAG); - -- explicit Value(int integer_value); -- explicit Value(int64_t integer_value); -+ explicit Value(int integer_value, uint64_t tag = NO_TAG); -+ explicit Value(int64_t integer_value, uint64_t tag = NO_TAG); - explicit Value(uint64_t integer_value) = delete; - -- explicit Value(base::span in_bytes); -+ explicit Value(base::span in_bytes, uint64_t tag = NO_TAG); - explicit Value(BinaryValue&& in_bytes) noexcept; - - explicit Value(const char* in_string, Type type = Type::STRING); - explicit Value(std::string&& in_string, Type type = Type::STRING) noexcept; -- explicit Value(base::StringPiece in_string, Type type = Type::STRING); -+ explicit Value(base::StringPiece in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); - -- explicit Value(const ArrayValue& in_array); -- explicit Value(ArrayValue&& in_array) noexcept; -+ explicit Value(const ArrayValue& in_array, uint64_t tag = NO_TAG); -+ explicit Value(ArrayValue&& in_array, uint64_t tag = NO_TAG) noexcept; - -- explicit Value(const MapValue& in_map); -+ explicit Value(const MapValue& in_map, uint64_t tag = NO_TAG); - explicit Value(MapValue&& in_map) noexcept; - - Value& operator=(Value&& that) noexcept; -+ Value& SetTag(uint64_t) noexcept; - - Value(const Value&) = delete; - Value& operator=(const Value&) = delete; -@@ -179,6 +180,7 @@ class CBOR_EXPORT Value { - bool is_string() const { return type() == Type::STRING; } - bool is_array() const { return type() == Type::ARRAY; } - bool is_map() const { return type() == Type::MAP; } -+ bool has_tag() const { return tag_ != NO_TAG; } - - // These will all fatally assert if the type doesn't match. - SimpleValue GetSimpleValue() const; -@@ -194,12 +196,13 @@ class CBOR_EXPORT Value { - const ArrayValue& GetArray() const; - const MapValue& GetMap() const; - const BinaryValue& GetInvalidUTF8() const; -+ uint64_t GetTag() const; - - private: - friend class Reader; - // This constructor allows INVALID_UTF8 values to be created, which only - // |Reader| and InvalidUTF8StringValueForTesting() may do. -- Value(base::span in_bytes, Type type); -+ Value(base::span in_bytes, Type type, uint64_t tag = NO_TAG); - - Type type_; - -@@ -213,6 +216,11 @@ class CBOR_EXPORT Value { - MapValue map_value_; - }; - -+ //This value specified as Invalid, -+ // used here to represent absence of TAG -+ constexpr static uint64_t NO_TAG = 0xFFFF; -+ uint64_t tag_ = NO_TAG; -+ - void InternalMoveConstructFrom(Value&& that); - void InternalCleanup(); - }; diff --git a/chromium_edits/125.0.6420.4/components/cbor/writer.cc.patch b/chromium_edits/125.0.6420.4/components/cbor/writer.cc.patch deleted file mode 100644 index bb89c1e6..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/writer.cc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc -index f400a65e7b66a..fcdebb8f3b458 100644 ---- a/components/cbor/writer.cc -+++ b/components/cbor/writer.cc -@@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node, - if (max_nesting_level < 0) - return false; - -+ if (node.has_tag()) { -+ StartItem(Value::Type::TAG, node.GetTag()); -+ } - switch (node.type()) { - case Value::Type::NONE: { - StartItem(Value::Type::BYTE_STRING, 0); diff --git a/chromium_edits/125.0.6420.4/components/cbor/writer_unittest.cc.patch b/chromium_edits/125.0.6420.4/components/cbor/writer_unittest.cc.patch deleted file mode 100644 index 240fee83..00000000 --- a/chromium_edits/125.0.6420.4/components/cbor/writer_unittest.cc.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/components/cbor/writer_unittest.cc b/components/cbor/writer_unittest.cc -index e3bffe20734bc..0ed569ae164a0 100644 ---- a/components/cbor/writer_unittest.cc -+++ b/components/cbor/writer_unittest.cc -@@ -522,4 +522,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { - EXPECT_FALSE(Writer::Write(Value(map), 4).has_value()); - } - -+TEST(CBORWriterTest, CanWriteTag) { -+ std::array content{ -+ 0x00, 0x01, 0x71, 0x12, 0x20, -+ 0x69, 0xea, 0x07, 0x40, 0xf9, -+ 0x80, 0x7a, 0x28, 0xf4, 0xd9, -+ 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, -+ 0x07, 0x2c, 0x90, 0x26, 0x6a, -+ 0xb3, 0xe7, 0x9d, 0xf6, 0x3a, -+ 0x36, 0x5b -+ }; -+ Value to_write(content); -+ to_write.SetTag(42); -+ auto result = Writer::Write(to_write); -+ EXPECT_TRUE(result.has_value()); -+ auto& bytes = result.value(); -+ EXPECT_EQ(bytes.size(), 41UL); -+ EXPECT_EQ(bytes.at(0), 0xd8); -+ EXPECT_EQ(bytes.at(1), 0x2a); -+ EXPECT_EQ(bytes.at(2), 0x58); -+ EXPECT_EQ(bytes.at(3), 0x25); -+ for (auto i = 0UL; i < content.size(); ++i) { -+ ASSERT_LT(i + 4UL, bytes.size()); -+ ASSERT_EQ(content.at(i), bytes.at(i+4UL)); -+ } -+} -+ - } // namespace cbor diff --git a/chromium_edits/125.0.6420.4/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/125.0.6420.4/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch deleted file mode 100644 index 291d84f1..00000000 --- a/chromium_edits/125.0.6420.4/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 32c4138ec358c..e9c62d51bf59b 100644 ---- a/components/open_from_clipboard/clipboard_recent_content_generic.cc -+++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc -@@ -20,7 +20,7 @@ - namespace { - // Schemes appropriate for suggestion by ClipboardRecentContent. - const char* kAuthorizedSchemes[] = { -- url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, -+ url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, "ipfs", "ipns" - // TODO(mpearson): add support for chrome:// URLs. Right now the scheme - // for that lives in content and is accessible via - // GetEmbedderRepresentationOfAboutScheme() or content::kChromeUIScheme diff --git a/chromium_edits/125.0.6420.4/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/125.0.6420.4/net/dns/dns_config_service_linux.cc.patch deleted file mode 100644 index 3b042d33..00000000 --- a/chromium_edits/125.0.6420.4/net/dns/dns_config_service_linux.cc.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc -index f909f127ba3e1..31d7f9d58c0af 100644 ---- a/net/dns/dns_config_service_linux.cc -+++ b/net/dns/dns_config_service_linux.cc -@@ -271,11 +271,11 @@ bool IsNsswitchConfigCompatible( - // Ignore any entries after `kDns` because Chrome will fallback to the - // system resolver if a result was not found in DNS. - return true; -- -+ case NsswitchReader::Service::kResolve: -+ break; - case NsswitchReader::Service::kMdns: - case NsswitchReader::Service::kMdns4: - case NsswitchReader::Service::kMdns6: -- case NsswitchReader::Service::kResolve: - case NsswitchReader::Service::kNis: - RecordIncompatibleNsswitchReason( - IncompatibleNsswitchReason::kIncompatibleService, diff --git a/chromium_edits/125.0.6420.4/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/125.0.6420.4/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch deleted file mode 100644 index 7fcbedc1..00000000 --- a/chromium_edits/125.0.6420.4/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index 62163e44e292e..60d00b8140759 100644 ---- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -+++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -66,7 +66,7 @@ class URLSchemesRegistry final { - // is considered secure. Additional checks are performed to ensure that - // other http pages are filtered out. - service_worker_schemes({"http", "https"}), -- fetch_api_schemes({"http", "https"}), -+ fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { - for (auto& scheme : url::GetCorsEnabledSchemes()) - cors_enabled_schemes.insert(scheme.c_str()); diff --git a/chromium_edits/125.0.6420.4/url/BUILD.gn.patch b/chromium_edits/125.0.6420.4/url/BUILD.gn.patch deleted file mode 100644 index 47c9eeb2..00000000 --- a/chromium_edits/125.0.6420.4/url/BUILD.gn.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/url/BUILD.gn b/url/BUILD.gn -index 464dc4d461e77..322b47d97f121 100644 ---- a/url/BUILD.gn -+++ b/url/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/buildflag_header.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//testing/test.gni") -+import("//third_party/ipfs_client/args.gni") - import("features.gni") - - import("//build/config/cronet/config.gni") -@@ -67,6 +68,7 @@ component("url") { - public_deps = [ - "//base", - "//build:robolectric_buildflags", -+ "//third_party/ipfs_client:ipfs_buildflags", - ] - - configs += [ "//build/config/compiler:wexit_time_destructors" ] -@@ -89,6 +91,11 @@ component("url") { - public_configs = [ "//third_party/jdk" ] - } - -+ if (enable_ipfs) { -+ sources += [ "url_canon_ipfs.cc" ] -+ deps += [ "//third_party/ipfs_client:ipfs_client" ] -+ } -+ - if (is_win) { - # Don't conflict with Windows' "url.dll". - output_name = "url_lib" diff --git a/chromium_edits/125.0.6420.4/url/url_canon.h.patch b/chromium_edits/125.0.6420.4/url/url_canon.h.patch deleted file mode 100644 index 71d7a758..00000000 --- a/chromium_edits/125.0.6420.4/url/url_canon.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/url/url_canon.h b/url/url_canon.h -index bd40235e4aa85..05d250fe1b746 100644 ---- a/url/url_canon.h -+++ b/url/url_canon.h -@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec, - CanonOutput* output, - Parsed* new_parsed); - -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+COMPONENT_EXPORT(URL) -+bool CanonicalizeIpfsURL(const char16_t* spec, -+ int spec_len, -+ const Parsed& parsed, -+ SchemeType scheme_type, -+ CharsetConverter* query_converter, -+ CanonOutput* output, -+ Parsed* new_parsed); -+ - // Part replacer -------------------------------------------------------------- - - // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/125.0.6420.4/url/url_canon_ipfs.cc b/chromium_edits/125.0.6420.4/url/url_canon_ipfs.cc deleted file mode 100644 index d7c9fdc7..00000000 --- a/chromium_edits/125.0.6420.4/url/url_canon_ipfs.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include "url_canon_internal.h" - -#include -#include - -#include - -bool url::CanonicalizeIpfsURL(const char* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* charset_converter, - CanonOutput* output, - Parsed* output_parsed) { - if ( spec_len < 1 || !spec ) { - return false; - } - if ( parsed.host.len < 1 ) { - return false; - } - std::string_view cid_str{ spec + parsed.host.begin, static_cast(parsed.host.len) }; - auto cid = ipfs::Cid(cid_str); - if ( !cid.valid() ) { - cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); - } - auto as_str = cid.to_string(); - if ( as_str.empty() ) { - return false; - } - std::string stdurl{ spec, static_cast(parsed.host.begin) }; - stdurl.append( as_str ); - stdurl.append( spec + parsed.host.end(), spec_len - parsed.host.end() ); - spec = stdurl.data(); - spec_len = static_cast(stdurl.size()); - Parsed parsed_input; - ParseStandardURL(spec, spec_len, &parsed_input); - return CanonicalizeStandardURL( - spec, - parsed_input, - scheme_type, - charset_converter, - output, output_parsed - ); -} -bool url::CanonicalizeIpfsURL(const char16_t* spec, - int spec_len, - const Parsed& parsed, - SchemeType scheme_type, - CharsetConverter* query_converter, - CanonOutput* output, - Parsed* new_parsed) { - RawCanonOutput<2048> as8; - ConvertUTF16ToUTF8(spec, spec_len, &as8); - return CanonicalizeIpfsURL(as8.data(), as8.length(), parsed, scheme_type, query_converter, output, new_parsed); -} diff --git a/chromium_edits/125.0.6420.4/url/url_util.cc.patch b/chromium_edits/125.0.6420.4/url/url_util.cc.patch deleted file mode 100644 index e61af3d0..00000000 --- a/chromium_edits/125.0.6420.4/url/url_util.cc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index edf357900d9c1..2b8aeb53ff0db 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -276,7 +276,11 @@ bool DoCanonicalize(const CHAR* spec, - success = CanonicalizeFileSystemURL( - spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), - charset_converter, output, output_parsed); -- -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ ParseStandardURL(spec, spec_len, &parsed_input); -+ success = CanonicalizeIpfsURL(spec, spec_len, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. - ParseStandardURL(spec, spec_len, &parsed_input); diff --git a/chromium_edits/129.0.6628.3/chrome/browser/BUILD.gn.patch b/chromium_edits/129.0.6628.3/chrome/browser/BUILD.gn.patch deleted file mode 100644 index 9f33e0a8..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/BUILD.gn.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 6dc4a24900ba4..b8a18b5ce0ecb 100644 ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -41,6 +41,7 @@ import("//sandbox/features.gni") - import("//services/screen_ai/buildflags/features.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("//third_party/blink/public/public_features.gni") -+import("//third_party/ipfs_client/args.gni") - import("//third_party/protobuf/proto_library.gni") - import("//third_party/webrtc/webrtc.gni") - import("//third_party/widevine/cdm/widevine.gni") -@@ -2665,6 +2666,14 @@ static_library("browser") { - ] - } - -+ if (enable_ipfs) { -+ sources += [ -+ "ipfs_extra_parts.cc", -+ "ipfs_extra_parts.h", -+ ] -+ deps += [ "//components/ipfs" ] -+ } -+ - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } diff --git a/chromium_edits/129.0.6628.3/chrome/browser/about_flags.cc.patch b/chromium_edits/129.0.6628.3/chrome/browser/about_flags.cc.patch deleted file mode 100644 index f397bfd9..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/about_flags.cc.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 25409c2aaf525..672fb2c2cd388 100644 ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -219,6 +219,7 @@ - #include "third_party/blink/public/common/features_generated.h" - #include "third_party/blink/public/common/forcedark/forcedark_switches.h" - #include "third_party/blink/public/common/switches.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" - #include "ui/accessibility/accessibility_features.h" - #include "ui/accessibility/accessibility_switches.h" - #include "ui/base/ozone_buildflags.h" -@@ -319,6 +320,10 @@ - #include "extensions/common/switches.h" - #endif // BUILDFLAG(ENABLE_EXTENSIONS) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#endif -+ - #if BUILDFLAG(ENABLE_PDF) - #include "pdf/pdf_features.h" - #endif -@@ -10057,6 +10062,14 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOmitCorsClientCertDescription, kOsAll, - FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, - -+#if BUILDFLAG(ENABLE_IPFS) -+ {"enable-ipfs", -+ flag_descriptions::kEnableIpfsName, -+ flag_descriptions::kEnableIpfsDescription, -+ kOsMac | kOsWin | kOsLinux,//TODO: These are the only variants currently getting built, but that is not likely to remain the case -+ FEATURE_VALUE_TYPE(ipfs::kEnableIpfs)}, -+#endif -+ - {"use-idna2008-non-transitional", - flag_descriptions::kUseIDNA2008NonTransitionalName, - flag_descriptions::kUseIDNA2008NonTransitionalDescription, kOsAll, diff --git a/chromium_edits/129.0.6628.3/chrome/browser/flag-metadata.json.patch b/chromium_edits/129.0.6628.3/chrome/browser/flag-metadata.json.patch deleted file mode 100644 index 3b46aa47..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/flag-metadata.json.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index 6f31ec4a7758c..ff7e2cd77ca34 100644 ---- a/chrome/browser/flag-metadata.json -+++ b/chrome/browser/flag-metadata.json -@@ -3399,6 +3399,11 @@ - "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 - }, -+ { -+ "name": "enable-ipfs", -+ "owners": [ "//components/ipfs/OWNERS" ], -+ "expiry_milestone": 150 -+ }, - { - "name": "enable-isolated-sandboxed-iframes", - "owners": [ "wjmaclean@chromium.org", "alexmos@chromium.org", "creis@chromium.org" ], diff --git a/chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.cc.patch deleted file mode 100644 index 016155fa..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.cc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 898566bd3470a..361bdcbf78cc2 100644 ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -310,6 +310,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = - const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = - "Match Field Trial Testing Config"; - -+#if BUILDFLAG(ENABLE_IPFS) -+extern const char kEnableIpfsName[] = "Enable IPFS"; -+extern const char kEnableIpfsDescription[] = "Enable ipfs:// and ipns:// URLs"; -+#endif -+ - const char kPreloadingOnPerformancePageName[] = - "Preloading Settings on Performance Page"; - const char kPreloadingOnPerformancePageDescription[] = diff --git a/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.cc deleted file mode 100644 index 90d2596f..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include "ipfs_extra_parts.h" - -#include "profiles/profile.h" - -#include - -void IpfsExtraParts::PostProfileInit(Profile* profile, bool /* is_initial_profile */ ) { - DCHECK(profile); - ipfs::InterRequestState::CreateForBrowserContext(profile, profile->GetPrefs()); -} diff --git a/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.h b/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.h deleted file mode 100644 index 2059c437..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/ipfs_extra_parts.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef IPFS_EXTRA_PART_H_ -#define IPFS_EXTRA_PART_H_ - -#include - -class IpfsExtraParts : public ChromeBrowserMainExtraParts { - void PostProfileInit(Profile* profile, bool is_initial_profile) override; -}; - -#endif // IPFS_EXTRA_PART_H_ diff --git a/chromium_edits/129.0.6628.3/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/129.0.6628.3/chrome/browser/prefs/browser_prefs.cc.patch deleted file mode 100644 index 646f84ce..00000000 --- a/chromium_edits/129.0.6628.3/chrome/browser/prefs/browser_prefs.cc.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 4f5f4ecfa4626..3091d863f050f 100644 ---- a/chrome/browser/prefs/browser_prefs.cc -+++ b/chrome/browser/prefs/browser_prefs.cc -@@ -199,6 +199,8 @@ - #include "printing/buildflags/buildflags.h" - #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" -+#include "third_party/ipfs_client/ipfs_buildflags.h" -+ - - #if BUILDFLAG(ENABLE_BACKGROUND_MODE) - #include "chrome/browser/background/background_mode_manager.h" -@@ -244,6 +246,11 @@ - #include "chrome/browser/pdf/pdf_pref_names.h" - #endif // BUILDFLAG(ENABLE_PDF) - -+#if BUILDFLAG(ENABLE_IPFS) -+#include "components/ipfs/ipfs_features.h" -+#include "components/ipfs/preferences.h" -+#endif -+ - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1782,6 +1789,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - IncognitoModePrefs::RegisterProfilePrefs(registry); - invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); - invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); -+#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { -+ ipfs::RegisterPreferences(registry); -+ } -+#endif - language::LanguagePrefs::RegisterProfilePrefs(registry); - login_detection::prefs::RegisterProfilePrefs(registry); - lookalikes::RegisterProfilePrefs(registry); diff --git a/chromium_edits/129.0.6628.3/chrome/common/chrome_content_client.cc.patch b/chromium_edits/129.0.6628.3/chrome/common/chrome_content_client.cc.patch deleted file mode 100644 index d0ce5acb..00000000 --- a/chromium_edits/129.0.6628.3/chrome/common/chrome_content_client.cc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 23baff86bfc1f..df9417b28e153 100644 ---- a/chrome/common/chrome_content_client.cc -+++ b/chrome/common/chrome_content_client.cc -@@ -308,6 +308,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { - #if BUILDFLAG(IS_ANDROID) - schemes->local_schemes.push_back(url::kContentScheme); - #endif -+ for ( const char* ip_s : {"ipfs", "ipns"} ) { -+ schemes->standard_schemes.push_back(ip_s); -+ schemes->cors_enabled_schemes.push_back(ip_s); -+ schemes->secure_schemes.push_back(ip_s); -+ schemes->csp_bypassing_schemes.push_back(ip_s); -+ } - } - - std::u16string ChromeContentClient::GetLocalizedString(int message_id) { diff --git a/chromium_edits/129.0.6628.3/components/cbor/reader_unittest.cc.patch b/chromium_edits/129.0.6628.3/components/cbor/reader_unittest.cc.patch deleted file mode 100644 index 150e0c73..00000000 --- a/chromium_edits/129.0.6628.3/components/cbor/reader_unittest.cc.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/components/cbor/reader_unittest.cc b/components/cbor/reader_unittest.cc -index e5c02ceea3402..f26b8e77f6da3 100644 ---- a/components/cbor/reader_unittest.cc -+++ b/components/cbor/reader_unittest.cc -@@ -1449,5 +1449,42 @@ TEST(CBORReaderTest, AllowInvalidUTF8) { - EXPECT_FALSE(cbor); - EXPECT_EQ(Reader::DecoderError::INVALID_UTF8, error); - } -+TEST(CBORReaderTest, RejectsTagUnderDefaultConfig) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_FALSE(cbor.has_value()); -+} -+TEST(CBORReaderTest, ReadsTagWhenConfiguredToDoSo) { -+ static const uint8_t kTaggedCbor[] = { -+ 0xd8, 0x2a, 0x58, 0x25, 0x00, 0x01, 0x71, 0x12, 0x20, 0x69, 0xea, 0x07, -+ 0x40, 0xf9, 0x80, 0x7a, 0x28, 0xf4, 0xd9, 0x32, 0xc6, 0x2e, 0x7c, 0x1c, -+ 0x83, 0xbe, 0x05, 0x5e, 0x55, 0x07, 0x2c, 0x90, 0x26, 0x6a, 0xb3, 0xe7, -+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b -+ }; -+ Reader::Config config; -+ config.parse_tags = true; -+ auto cbor = Reader::Read(kTaggedCbor, config); -+ EXPECT_TRUE(cbor.has_value()); -+ auto& v = cbor.value(); -+ EXPECT_TRUE(v.has_tag()); -+ EXPECT_EQ(v.GetTag(),42UL); -+ EXPECT_TRUE(v.is_bytestring()); -+ EXPECT_EQ(v.type(), Value::Type::BYTE_STRING); -+ auto& bytes = v.GetBytestring(); -+ EXPECT_EQ(bytes.size(), 37UL); -+ EXPECT_EQ(bytes.at(0), 0x00);//identity multibase (e.g. not base-encoded, bytes are themselves) -+ EXPECT_EQ(bytes.at(1), 0x01);//CID version 1 -+ EXPECT_EQ(bytes.at(2), 0x71);//codec = dag-cbor -+ EXPECT_EQ(bytes.at(3), 0x12);//multihash = 18 = sha2-256 -+ EXPECT_EQ(bytes.at(4), 0x20);//hash length = 32 bytes -+ EXPECT_EQ(bytes.at(5), 0x69);//first byte of hash digest -+ EXPECT_EQ(bytes.at(36),0x5b);//last byte of hash digest -+} - - } // namespace cbor diff --git a/chromium_edits/129.0.6628.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/129.0.6628.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch deleted file mode 100644 index 31e2e173..00000000 --- a/chromium_edits/129.0.6628.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 9c0cda2dfb314..fea1c527c6d1d 100644 ---- a/components/open_from_clipboard/clipboard_recent_content_generic.cc -+++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc -@@ -20,7 +20,7 @@ - namespace { - // Schemes appropriate for suggestion by ClipboardRecentContent. - const char* kAuthorizedSchemes[] = { -- url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, -+ url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme, "ipfs", "ipns" - // TODO(mpearson): add support for chrome:// URLs. Right now the scheme - // for that lives in content and is accessible via - // GetEmbedderRepresentationOfAboutScheme() or content::kChromeUIScheme diff --git a/chromium_edits/129.0.6628.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/129.0.6628.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch deleted file mode 100644 index 5779267b..00000000 --- a/chromium_edits/129.0.6628.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index e1bc209c337c5..844ce502464d4 100644 ---- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -+++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -68,7 +68,7 @@ class URLSchemesRegistry final { - // is considered secure. Additional checks are performed to ensure that - // other http pages are filtered out. - service_worker_schemes({"http", "https"}), -- fetch_api_schemes({"http", "https"}), -+ fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { - for (auto& scheme : url::GetCorsEnabledSchemes()) - cors_enabled_schemes.insert(scheme.c_str()); diff --git a/chromium_edits/129.0.6628.3/url/url_util.cc.patch b/chromium_edits/129.0.6628.3/url/url_util.cc.patch deleted file mode 100644 index 2f430e17..00000000 --- a/chromium_edits/129.0.6628.3/url/url_util.cc.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/url/url_util.cc b/url/url_util.cc -index ce5225e121f5d..e2ddfd9323214 100644 ---- a/url/url_util.cc -+++ b/url/url_util.cc -@@ -308,7 +308,12 @@ bool DoCanonicalize(const CHAR* spec, - success = CanonicalizeFileSystemURL( - spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), - charset_converter, output, output_parsed); -- -+ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { -+ auto spec_view = std::basic_string_view(spec, spec_len); -+ // Switch multibase away from case-sensitive ones before continuing canonicalization. -+ auto parsed_input = ParseStandardURL(spec_view); -+ success = CanonicalizeIpfsURL(spec_view, parsed_input, scheme_type, -+ charset_converter, output, output_parsed); - } else if (DoIsStandard(spec, scheme, &scheme_type)) { - // All "normal" URLs. - success = CanonicalizeStandardURL( diff --git a/chromium_edits/125.0.6368.2/chrome/browser/BUILD.gn.patch b/chromium_edits/130.0.6723.6/chrome/browser/BUILD.gn.patch similarity index 67% rename from chromium_edits/125.0.6368.2/chrome/browser/BUILD.gn.patch rename to chromium_edits/130.0.6723.6/chrome/browser/BUILD.gn.patch index 3a32f136..11b7423e 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/BUILD.gn.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 7a4534d39b491..8caeb8ab3ec7c 100644 +index dd5c9db43d693..76aa30eaf6563 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -39,6 +39,7 @@ import("//sandbox/features.gni") +@@ -40,6 +40,7 @@ import("//sandbox/features.gni") import("//services/screen_ai/buildflags/features.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/blink/public/public_features.gni") @@ -10,9 +10,9 @@ index 7a4534d39b491..8caeb8ab3ec7c 100644 import("//third_party/protobuf/proto_library.gni") import("//third_party/webrtc/webrtc.gni") import("//third_party/widevine/cdm/widevine.gni") -@@ -2654,6 +2655,14 @@ static_library("browser") { - ] - } +@@ -2497,6 +2498,14 @@ static_library("browser") { + "//ui/webui", + ] + if (enable_ipfs) { + sources += [ @@ -22,6 +22,6 @@ index 7a4534d39b491..8caeb8ab3ec7c 100644 + deps += [ "//components/ipfs" ] + } + - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } + # Platforms that have a network diagnostics dialog. All others fall through + # to the stub which is not implemented. + if (is_chromeos_ash) { diff --git a/chromium_edits/125.0.6396.3/chrome/browser/about_flags.cc.patch b/chromium_edits/130.0.6723.6/chrome/browser/about_flags.cc.patch similarity index 90% rename from chromium_edits/125.0.6396.3/chrome/browser/about_flags.cc.patch rename to chromium_edits/130.0.6723.6/chrome/browser/about_flags.cc.patch index 7794a4db..62bb660c 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/about_flags.cc.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/about_flags.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 38600860d9e5b..a7d975f1971d3 100644 +index fe7c8a4012c95..98c18b41b4b1b 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -215,6 +215,7 @@ +@@ -227,6 +227,7 @@ #include "third_party/blink/public/common/features_generated.h" #include "third_party/blink/public/common/forcedark/forcedark_switches.h" #include "third_party/blink/public/common/switches.h" @@ -10,7 +10,7 @@ index 38600860d9e5b..a7d975f1971d3 100644 #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ozone_buildflags.h" -@@ -309,6 +310,10 @@ +@@ -326,6 +327,10 @@ #include "extensions/common/switches.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -21,7 +21,7 @@ index 38600860d9e5b..a7d975f1971d3 100644 #if BUILDFLAG(ENABLE_PDF) #include "pdf/pdf_features.h" #endif -@@ -9554,6 +9559,14 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9912,6 +9917,14 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kOmitCorsClientCertDescription, kOsAll, FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, diff --git a/chromium_edits/129.0.6628.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/130.0.6723.6/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch similarity index 100% rename from chromium_edits/129.0.6628.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch rename to chromium_edits/130.0.6723.6/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch diff --git a/chromium_edits/129.0.6628.3/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/130.0.6723.6/chrome/browser/chrome_content_browser_client.cc.patch similarity index 92% rename from chromium_edits/129.0.6628.3/chrome/browser/chrome_content_browser_client.cc.patch rename to chromium_edits/130.0.6723.6/chrome/browser/chrome_content_browser_client.cc.patch index f6acd3ff..66a31424 100644 --- a/chromium_edits/129.0.6628.3/chrome/browser/chrome_content_browser_client.cc.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/chrome_content_browser_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index c059ffe32b1ca..ed6c99e3af584 100644 +index e5ce608907f72..27794383de5c6 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -398,6 +398,7 @@ +@@ -404,6 +404,7 @@ #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h" #include "third_party/blink/public/public_buildflags.h" @@ -10,7 +10,7 @@ index c059ffe32b1ca..ed6c99e3af584 100644 #include "third_party/widevine/cdm/buildflags.h" #include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/l10n/l10n_util.h" -@@ -522,6 +523,13 @@ +@@ -530,6 +531,13 @@ #include "chrome/browser/chrome_browser_main_posix.h" #endif @@ -24,7 +24,7 @@ index c059ffe32b1ca..ed6c99e3af584 100644 #if !BUILDFLAG(IS_ANDROID) #include "chrome/browser/digital_credentials/digital_identity_provider_desktop.h" #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" -@@ -1871,6 +1879,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { +@@ -1901,6 +1909,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { main_parts->AddParts( std::make_unique()); @@ -36,7 +36,7 @@ index c059ffe32b1ca..ed6c99e3af584 100644 return main_parts; } -@@ -6503,12 +6516,29 @@ void ChromeContentBrowserClient:: +@@ -6570,12 +6583,29 @@ void ChromeContentBrowserClient:: const std::optional& request_initiator_origin, NonNetworkURLLoaderFactoryMap* factories) { #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ @@ -67,7 +67,7 @@ index c059ffe32b1ca..ed6c99e3af584 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) if (web_contents) { -@@ -6654,6 +6684,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( +@@ -6723,6 +6753,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( scoped_refptr navigation_response_task_runner) { std::vector> interceptors; diff --git a/chromium_edits/125.0.6368.2/chrome/browser/flag-metadata.json.patch b/chromium_edits/130.0.6723.6/chrome/browser/flag-metadata.json.patch similarity index 84% rename from chromium_edits/125.0.6368.2/chrome/browser/flag-metadata.json.patch rename to chromium_edits/130.0.6723.6/chrome/browser/flag-metadata.json.patch index da06034b..6420374c 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/flag-metadata.json.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/flag-metadata.json.patch @@ -1,10 +1,10 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index d65f31edc395e..0326237952772 100644 +index 5d300eefd2c79..56a8e026d7733 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -3143,6 +3143,11 @@ +@@ -3456,6 +3456,11 @@ "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 + "expiry_milestone": 140 }, + { + "name": "enable-ipfs", diff --git a/chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.cc.patch similarity index 85% rename from chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.cc.patch rename to chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.cc.patch index 19143725..7c11fd55 100644 --- a/chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.cc.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 873d802b41094..4b374b38fa838 100644 +index f5f75382e356f..b854f602e77cf 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -312,6 +312,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = +@@ -331,6 +331,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = "Match Field Trial Testing Config"; diff --git a/chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.h.patch b/chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.h.patch similarity index 89% rename from chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.h.patch rename to chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.h.patch index 6c96d74d..df10fd17 100644 --- a/chromium_edits/129.0.6628.3/chrome/browser/flag_descriptions.h.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/flag_descriptions.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index ab6b88706e9b6..d5bbb0ca12333 100644 +index dffa4b8ff2932..a6b31c5482316 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h @@ -24,6 +24,7 @@ @@ -10,7 +10,7 @@ index ab6b88706e9b6..d5bbb0ca12333 100644 // This file declares strings used in chrome://flags. These messages are not // translated, because instead of end-users they target Chromium developers and -@@ -198,6 +199,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; +@@ -213,6 +214,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; diff --git a/chromium_edits/125.0.6368.2/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/130.0.6723.6/chrome/browser/ipfs_extra_parts.cc similarity index 100% rename from chromium_edits/125.0.6368.2/chrome/browser/ipfs_extra_parts.cc rename to chromium_edits/130.0.6723.6/chrome/browser/ipfs_extra_parts.cc diff --git a/chromium_edits/125.0.6368.2/chrome/browser/ipfs_extra_parts.h b/chromium_edits/130.0.6723.6/chrome/browser/ipfs_extra_parts.h similarity index 100% rename from chromium_edits/125.0.6368.2/chrome/browser/ipfs_extra_parts.h rename to chromium_edits/130.0.6723.6/chrome/browser/ipfs_extra_parts.h diff --git a/chromium_edits/125.0.6368.2/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/130.0.6723.6/chrome/browser/prefs/browser_prefs.cc.patch similarity index 75% rename from chromium_edits/125.0.6368.2/chrome/browser/prefs/browser_prefs.cc.patch rename to chromium_edits/130.0.6723.6/chrome/browser/prefs/browser_prefs.cc.patch index fd04d160..3f525893 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/prefs/browser_prefs.cc.patch +++ b/chromium_edits/130.0.6723.6/chrome/browser/prefs/browser_prefs.cc.patch @@ -1,17 +1,16 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 5eef5cdedda4c..a05199c7e40d4 100644 +index e408ae181c2eb..d72b7a7d9ea44 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -190,6 +190,8 @@ +@@ -202,6 +202,7 @@ + #include "ppapi/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" -+ #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" -@@ -234,6 +236,11 @@ +@@ -250,6 +251,11 @@ #include "chrome/browser/pdf/pdf_pref_names.h" #endif // BUILDFLAG(ENABLE_PDF) @@ -20,10 +19,10 @@ index 5eef5cdedda4c..a05199c7e40d4 100644 +#include "components/ipfs/preferences.h" +#endif + - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1746,6 +1753,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + #if BUILDFLAG(IS_ANDROID) + #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" + #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" +@@ -1891,6 +1897,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, IncognitoModePrefs::RegisterProfilePrefs(registry); invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); diff --git a/chromium_edits/130.0.6723.6/chrome/browser/shell_integration_mac.mm.patch b/chromium_edits/130.0.6723.6/chrome/browser/shell_integration_mac.mm.patch new file mode 100644 index 00000000..220e2546 --- /dev/null +++ b/chromium_edits/130.0.6723.6/chrome/browser/shell_integration_mac.mm.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm +index c6bb768979453..c0d0abb9c78f3 100644 +--- a/chrome/browser/shell_integration_mac.mm ++++ b/chrome/browser/shell_integration_mac.mm +@@ -79,6 +79,8 @@ bool SetAsDefaultBrowser() { + if (LSSetDefaultHandlerForURLScheme(CFSTR("https"), identifier) != noErr) { + return false; + } ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipfs"), identifier); ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipns"), identifier); + if (LSSetDefaultRoleHandlerForContentType(kUTTypeHTML, kLSRolesViewer, + identifier) != noErr) { + return false; diff --git a/chromium_edits/125.0.6396.3/chrome/common/chrome_content_client.cc.patch b/chromium_edits/130.0.6723.6/chrome/common/chrome_content_client.cc.patch similarity index 85% rename from chromium_edits/125.0.6396.3/chrome/common/chrome_content_client.cc.patch rename to chromium_edits/130.0.6723.6/chrome/common/chrome_content_client.cc.patch index 59ea01c2..d34894b4 100644 --- a/chromium_edits/125.0.6396.3/chrome/common/chrome_content_client.cc.patch +++ b/chromium_edits/130.0.6723.6/chrome/common/chrome_content_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 2f016718fdd3c..bc38d5c2e4d8e 100644 +index 60515232467d7..14d5e12a76c76 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc -@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { +@@ -314,6 +314,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { #if BUILDFLAG(IS_ANDROID) schemes->local_schemes.push_back(url::kContentScheme); #endif diff --git a/chromium_edits/130.0.6723.6/chrome/installer/linux/common/desktop.template.patch b/chromium_edits/130.0.6723.6/chrome/installer/linux/common/desktop.template.patch new file mode 100644 index 00000000..dcd9460b --- /dev/null +++ b/chromium_edits/130.0.6723.6/chrome/installer/linux/common/desktop.template.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/installer/linux/common/desktop.template b/chrome/installer/linux/common/desktop.template +index 2eb13ee1aba46..9af65726bde89 100644 +--- a/chrome/installer/linux/common/desktop.template ++++ b/chrome/installer/linux/common/desktop.template +@@ -111,7 +111,7 @@ Terminal=false + Icon=@@PACKAGE@@ + Type=Application + Categories=Network;WebBrowser; +-MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; ++MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ipfs;x-scheme-handler/ipns; + Actions=new-window;new-private-window; + + [Desktop Action new-window] diff --git a/chromium_edits/130.0.6723.6/chrome/installer/util/shell_util.cc.patch b/chromium_edits/130.0.6723.6/chrome/installer/util/shell_util.cc.patch new file mode 100644 index 00000000..fccdad80 --- /dev/null +++ b/chromium_edits/130.0.6723.6/chrome/installer/util/shell_util.cc.patch @@ -0,0 +1,20 @@ +diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc +index c087d1c02bca4..382a36b9cd800 100644 +--- a/chrome/installer/util/shell_util.cc ++++ b/chrome/installer/util/shell_util.cc +@@ -1545,11 +1545,12 @@ const wchar_t* ShellUtil::kDefaultFileAssociations[] = { + const wchar_t* ShellUtil::kPotentialFileAssociations[] = { + L".htm", L".html", L".mhtml", L".pdf", L".shtml", + L".svg", L".xht", L".xhtml", L".webp", nullptr}; +-const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"http", L"https", +- nullptr}; ++const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = { ++ L"http", L"https", L"ipfs", L"ipns", nullptr}; + const wchar_t* ShellUtil::kPotentialProtocolAssociations[] = { + L"http", L"https", L"irc", L"mailto", L"mms", L"news", L"nntp", +- L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", nullptr}; ++ L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", L"ipfs", ++ L"ipns", nullptr}; + const wchar_t* ShellUtil::kRegUrlProtocol = L"URL Protocol"; + const wchar_t* ShellUtil::kRegApplication = L"\\Application"; + const wchar_t* ShellUtil::kRegAppUserModelId = L"AppUserModelId"; diff --git a/chromium_edits/129.0.6628.3/components/cbor/reader.cc.patch b/chromium_edits/130.0.6723.6/components/cbor/reader.cc.patch similarity index 100% rename from chromium_edits/129.0.6628.3/components/cbor/reader.cc.patch rename to chromium_edits/130.0.6723.6/components/cbor/reader.cc.patch diff --git a/chromium_edits/129.0.6628.3/components/cbor/reader.h.patch b/chromium_edits/130.0.6723.6/components/cbor/reader.h.patch similarity index 100% rename from chromium_edits/129.0.6628.3/components/cbor/reader.h.patch rename to chromium_edits/130.0.6723.6/components/cbor/reader.h.patch diff --git a/chromium_edits/125.0.6368.2/components/cbor/reader_unittest.cc.patch b/chromium_edits/130.0.6723.6/components/cbor/reader_unittest.cc.patch similarity index 100% rename from chromium_edits/125.0.6368.2/components/cbor/reader_unittest.cc.patch rename to chromium_edits/130.0.6723.6/components/cbor/reader_unittest.cc.patch diff --git a/chromium_edits/129.0.6628.3/components/cbor/values.cc.patch b/chromium_edits/130.0.6723.6/components/cbor/values.cc.patch similarity index 93% rename from chromium_edits/129.0.6628.3/components/cbor/values.cc.patch rename to chromium_edits/130.0.6723.6/components/cbor/values.cc.patch index 2832d248..fba23766 100644 --- a/chromium_edits/129.0.6628.3/components/cbor/values.cc.patch +++ b/chromium_edits/130.0.6723.6/components/cbor/values.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 7c6b7a0aeaae3..5096311ba2a20 100644 +index 303ac7fe300e3..7f796304e465a 100644 --- a/components/cbor/values.cc +++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { +@@ -71,32 +71,34 @@ Value::Value(Type type) : type_(type) { NOTREACHED_IN_MIGRATION(); } @@ -49,7 +49,7 @@ index 7c6b7a0aeaae3..5096311ba2a20 100644 DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); } -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { +@@ -122,7 +124,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { } } @@ -59,7 +59,7 @@ index 7c6b7a0aeaae3..5096311ba2a20 100644 switch (type_) { case Type::STRING: new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(std::string_view in_string, Type type) : type_(type) { +@@ -138,16 +141,18 @@ Value::Value(std::string_view in_string, Type type) : type_(type) { } } @@ -82,7 +82,7 @@ index 7c6b7a0aeaae3..5096311ba2a20 100644 map_value_.reserve(in_map.size()); for (const auto& it : in_map) map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { +@@ -173,31 +178,36 @@ Value Value::Clone() const { case Type::NONE: return Value(); case Type::INVALID_UTF8: @@ -127,7 +127,7 @@ index 7c6b7a0aeaae3..5096311ba2a20 100644 Value::SimpleValue Value::GetSimpleValue() const { CHECK(is_simple()); return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { +@@ -263,9 +273,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { return bytestring_value_; } diff --git a/chromium_edits/129.0.6628.3/components/cbor/values.h.patch b/chromium_edits/130.0.6723.6/components/cbor/values.h.patch similarity index 100% rename from chromium_edits/129.0.6628.3/components/cbor/values.h.patch rename to chromium_edits/130.0.6723.6/components/cbor/values.h.patch diff --git a/chromium_edits/129.0.6628.3/components/cbor/writer.cc.patch b/chromium_edits/130.0.6723.6/components/cbor/writer.cc.patch similarity index 100% rename from chromium_edits/129.0.6628.3/components/cbor/writer.cc.patch rename to chromium_edits/130.0.6723.6/components/cbor/writer.cc.patch diff --git a/chromium_edits/129.0.6628.3/components/cbor/writer_unittest.cc.patch b/chromium_edits/130.0.6723.6/components/cbor/writer_unittest.cc.patch similarity index 100% rename from chromium_edits/129.0.6628.3/components/cbor/writer_unittest.cc.patch rename to chromium_edits/130.0.6723.6/components/cbor/writer_unittest.cc.patch diff --git a/chromium_edits/125.0.6396.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/130.0.6723.6/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch similarity index 95% rename from chromium_edits/125.0.6396.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch rename to chromium_edits/130.0.6723.6/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch index 291d84f1..ee376ce1 100644 --- a/chromium_edits/125.0.6396.3/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ b/chromium_edits/130.0.6723.6/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 32c4138ec358c..e9c62d51bf59b 100644 +index 3683fadcc0914..440d4be132e5c 100644 --- a/components/open_from_clipboard/clipboard_recent_content_generic.cc +++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc @@ -20,7 +20,7 @@ diff --git a/chromium_edits/129.0.6628.3/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/130.0.6723.6/net/dns/dns_config_service_linux.cc.patch similarity index 100% rename from chromium_edits/129.0.6628.3/net/dns/dns_config_service_linux.cc.patch rename to chromium_edits/130.0.6723.6/net/dns/dns_config_service_linux.cc.patch diff --git a/chromium_edits/125.0.6368.2/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/130.0.6723.6/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch similarity index 70% rename from chromium_edits/125.0.6368.2/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch rename to chromium_edits/130.0.6723.6/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch index 119d72b2..663fe49e 100644 --- a/chromium_edits/125.0.6368.2/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ b/chromium_edits/130.0.6723.6/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch @@ -1,13 +1,15 @@ diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index 4eadf46ea0c24..d62fc7fb14e01 100644 +index e1bc209c337c5..6fbac29fcddfd 100644 --- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc +++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -67,7 +67,7 @@ class URLSchemesRegistry final { +@@ -68,8 +68,8 @@ class URLSchemesRegistry final { // is considered secure. Additional checks are performed to ensure that // other http pages are filtered out. service_worker_schemes({"http", "https"}), - fetch_api_schemes({"http", "https"}), +- allowed_in_referrer_schemes({"http", "https"}) { + fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { ++ allowed_in_referrer_schemes({"http", "https", "ipfs", "ipns"}) { for (auto& scheme : url::GetCorsEnabledSchemes()) cors_enabled_schemes.insert(scheme.c_str()); + for (auto& scheme : url::GetCSPBypassingSchemes()) { diff --git a/chromium_edits/129.0.6628.3/url/BUILD.gn.patch b/chromium_edits/130.0.6723.6/url/BUILD.gn.patch similarity index 100% rename from chromium_edits/129.0.6628.3/url/BUILD.gn.patch rename to chromium_edits/130.0.6723.6/url/BUILD.gn.patch diff --git a/chromium_edits/129.0.6628.3/url/url_canon.h.patch b/chromium_edits/130.0.6723.6/url/url_canon.h.patch similarity index 96% rename from chromium_edits/129.0.6628.3/url/url_canon.h.patch rename to chromium_edits/130.0.6723.6/url/url_canon.h.patch index 57a53f5b..ffe72eea 100644 --- a/chromium_edits/129.0.6628.3/url/url_canon.h.patch +++ b/chromium_edits/130.0.6723.6/url/url_canon.h.patch @@ -1,5 +1,5 @@ diff --git a/url/url_canon.h b/url/url_canon.h -index ab5ec90988943..d28d325a01fc0 100644 +index 22def4917fdd0..40dda81954a56 100644 --- a/url/url_canon.h +++ b/url/url_canon.h @@ -821,6 +821,21 @@ bool CanonicalizeMailtoURL(const char16_t* spec, diff --git a/chromium_edits/129.0.6628.3/url/url_canon_ipfs.cc b/chromium_edits/130.0.6723.6/url/url_canon_ipfs.cc similarity index 100% rename from chromium_edits/129.0.6628.3/url/url_canon_ipfs.cc rename to chromium_edits/130.0.6723.6/url/url_canon_ipfs.cc diff --git a/chromium_edits/130.0.6723.6/url/url_util.cc.patch b/chromium_edits/130.0.6723.6/url/url_util.cc.patch new file mode 100644 index 00000000..988797b0 --- /dev/null +++ b/chromium_edits/130.0.6723.6/url/url_util.cc.patch @@ -0,0 +1,45 @@ +diff --git a/url/url_util.cc b/url/url_util.cc +index ce5225e121f5d..79e33208f728e 100644 +--- a/url/url_util.cc ++++ b/url/url_util.cc +@@ -76,6 +76,8 @@ struct SchemeRegistry { + std::vector referrer_schemes = { + {kHttpsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, + {kHttpScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that do not trigger mixed content warning. +@@ -84,6 +86,8 @@ struct SchemeRegistry { + kWssScheme, + kDataScheme, + kAboutScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that normal pages cannot link to or access (i.e., with the same +@@ -105,6 +109,8 @@ struct SchemeRegistry { + kHttpsScheme, + kHttpScheme, + kDataScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that can be used by web to store data (local storage, etc). +@@ -308,7 +314,12 @@ bool DoCanonicalize(const CHAR* spec, + success = CanonicalizeFileSystemURL( + spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), + charset_converter, output, output_parsed); +- ++ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { ++ auto spec_view = std::basic_string_view(spec, spec_len); ++ // Switch multibase away from case-sensitive ones before continuing canonicalization. ++ auto parsed_input = ParseStandardURL(spec_view); ++ success = CanonicalizeIpfsURL(spec_view, parsed_input, scheme_type, ++ charset_converter, output, output_parsed); + } else if (DoIsStandard(spec, scheme, &scheme_type)) { + // All "normal" URLs. + success = CanonicalizeStandardURL( diff --git a/chromium_edits/125.0.6396.3/chrome/browser/BUILD.gn.patch b/chromium_edits/131.0.6724.0/chrome/browser/BUILD.gn.patch similarity index 67% rename from chromium_edits/125.0.6396.3/chrome/browser/BUILD.gn.patch rename to chromium_edits/131.0.6724.0/chrome/browser/BUILD.gn.patch index 6c3b8bd5..aef0fddb 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/BUILD.gn.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 94380071080fc..6e6e14b64560b 100644 +index c61541ba3618f..557c2ea8cb394 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -39,6 +39,7 @@ import("//sandbox/features.gni") +@@ -40,6 +40,7 @@ import("//sandbox/features.gni") import("//services/screen_ai/buildflags/features.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/blink/public/public_features.gni") @@ -10,9 +10,9 @@ index 94380071080fc..6e6e14b64560b 100644 import("//third_party/protobuf/proto_library.gni") import("//third_party/webrtc/webrtc.gni") import("//third_party/widevine/cdm/widevine.gni") -@@ -2693,6 +2694,14 @@ static_library("browser") { - ] - } +@@ -2499,6 +2500,14 @@ static_library("browser") { + "//ui/webui", + ] + if (enable_ipfs) { + sources += [ @@ -22,6 +22,6 @@ index 94380071080fc..6e6e14b64560b 100644 + deps += [ "//components/ipfs" ] + } + - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } + # Platforms that have a network diagnostics dialog. All others fall through + # to the stub which is not implemented. + if (is_chromeos_ash) { diff --git a/chromium_edits/125.0.6368.2/chrome/browser/about_flags.cc.patch b/chromium_edits/131.0.6724.0/chrome/browser/about_flags.cc.patch similarity index 90% rename from chromium_edits/125.0.6368.2/chrome/browser/about_flags.cc.patch rename to chromium_edits/131.0.6724.0/chrome/browser/about_flags.cc.patch index ab68d89c..50db73fc 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/about_flags.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/about_flags.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 1b5f384a735c3..98743f6cdbb92 100644 +index e3b7a5ebf983b..31714d3864f41 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -216,6 +216,7 @@ +@@ -227,6 +227,7 @@ #include "third_party/blink/public/common/features_generated.h" #include "third_party/blink/public/common/forcedark/forcedark_switches.h" #include "third_party/blink/public/common/switches.h" @@ -10,7 +10,7 @@ index 1b5f384a735c3..98743f6cdbb92 100644 #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ozone_buildflags.h" -@@ -309,6 +310,10 @@ +@@ -326,6 +327,10 @@ #include "extensions/common/switches.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -21,7 +21,7 @@ index 1b5f384a735c3..98743f6cdbb92 100644 #if BUILDFLAG(ENABLE_PDF) #include "pdf/pdf_features.h" #endif -@@ -9521,6 +9526,14 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9881,6 +9886,14 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kOmitCorsClientCertDescription, kOsAll, FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, diff --git a/chromium_edits/125.0.6382.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/131.0.6724.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch similarity index 82% rename from chromium_edits/125.0.6382.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch rename to chromium_edits/131.0.6724.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch index 4d172311..f9965a24 100644 --- a/chromium_edits/125.0.6382.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch @@ -1,27 +1,28 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -index 4c88614c68c25..f8bb12a3b0c2e 100644 +index 9f234a2a7d41d..a9378ca80dc1e 100644 --- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -10,6 +10,8 @@ - #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" - #include "chrome/browser/external_protocol/external_protocol_handler.h" - #include "chrome/browser/profiles/profile.h" +@@ -13,6 +13,7 @@ + #include "chrome/browser/profiles/profile_io_data.h" + #include "components/custom_handlers/protocol_handler_registry.h" + #include "content/public/common/url_constants.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" -+ + #include "url/url_util.h" + #if BUILDFLAG(IS_ANDROID) - #include "chrome/browser/profiles/profile_android.h" - #endif -@@ -18,6 +20,9 @@ +@@ -20,6 +21,11 @@ #include "chrome/browser/ui/android/omnibox/jni_headers/ChromeAutocompleteSchemeClassifier_jni.h" #endif - #include "components/custom_handlers/protocol_handler_registry.h" + +#if BUILDFLAG(ENABLE_IPFS) +#include "components/ipfs/ipfs_features.h" +#endif - #include "content/public/common/url_constants.h" - #include "url/url_util.h" - -@@ -55,12 +60,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( ++ ++ + #if BUILDFLAG(IS_ANDROID) + static jlong + JNI_ChromeAutocompleteSchemeClassifier_CreateAutocompleteClassifier( +@@ -53,12 +59,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( if (scheme.empty()) { return metrics::OmniboxInputType::EMPTY; } diff --git a/chromium_edits/125.0.6382.3/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/131.0.6724.0/chrome/browser/chrome_content_browser_client.cc.patch similarity index 80% rename from chromium_edits/125.0.6382.3/chrome/browser/chrome_content_browser_client.cc.patch rename to chromium_edits/131.0.6724.0/chrome/browser/chrome_content_browser_client.cc.patch index a1d53d7f..424199ef 100644 --- a/chromium_edits/125.0.6382.3/chrome/browser/chrome_content_browser_client.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/chrome_content_browser_client.cc.patch @@ -1,17 +1,17 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index ae225c7d31963..49b2b3a05a63a 100644 +index 82438940a2bb6..1c256f9c41e71 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -381,6 +381,7 @@ - #include "third_party/blink/public/common/switches.h" +@@ -404,6 +404,7 @@ #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" + #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h" #include "third_party/blink/public/public_buildflags.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" #include "third_party/widevine/cdm/buildflags.h" #include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/l10n/l10n_util.h" -@@ -503,6 +504,13 @@ - #include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h" +@@ -530,6 +531,13 @@ + #include "chrome/browser/chrome_browser_main_posix.h" #endif +#if BUILDFLAG(ENABLE_IPFS) @@ -22,9 +22,9 @@ index ae225c7d31963..49b2b3a05a63a 100644 +#endif + #if !BUILDFLAG(IS_ANDROID) + #include "chrome/browser/digital_credentials/digital_identity_provider_desktop.h" #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" - #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" -@@ -1695,6 +1703,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { +@@ -1863,6 +1871,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { main_parts->AddParts( std::make_unique()); @@ -36,7 +36,7 @@ index ae225c7d31963..49b2b3a05a63a 100644 return main_parts; } -@@ -6143,12 +6156,25 @@ void ChromeContentBrowserClient:: +@@ -6526,12 +6539,29 @@ void ChromeContentBrowserClient:: const std::optional& request_initiator_origin, NonNetworkURLLoaderFactoryMap* factories) { #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ @@ -48,7 +48,9 @@ index ae225c7d31963..49b2b3a05a63a 100644 #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ // !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { ++ if (!web_contents) { ++ VLOG(2) << "No web contents, can't register url loader factory."; ++ } else if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { + network::mojom::URLLoaderFactory* default_factory = g_browser_process->system_network_context_manager()->GetURLLoaderFactory(); + auto* context = web_contents->GetBrowserContext(); + ipfs::IpfsURLLoaderFactory::Create( @@ -58,12 +60,14 @@ index ae225c7d31963..49b2b3a05a63a 100644 + GetSystemNetworkContext(), + Profile::FromBrowserContext(context)->GetPrefs() + ); ++ } else { ++ LOG(INFO) << "IPFS disabled."; + } +#endif // BUILDFLAG(ENABLE_IPFS) #if BUILDFLAG(IS_CHROMEOS_ASH) if (web_contents) { -@@ -6285,6 +6311,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( +@@ -6679,6 +6709,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( scoped_refptr navigation_response_task_runner) { std::vector> interceptors; diff --git a/chromium_edits/125.0.6382.3/chrome/browser/flag-metadata.json.patch b/chromium_edits/131.0.6724.0/chrome/browser/flag-metadata.json.patch similarity index 84% rename from chromium_edits/125.0.6382.3/chrome/browser/flag-metadata.json.patch rename to chromium_edits/131.0.6724.0/chrome/browser/flag-metadata.json.patch index 2026a41e..dd1765a6 100644 --- a/chromium_edits/125.0.6382.3/chrome/browser/flag-metadata.json.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/flag-metadata.json.patch @@ -1,10 +1,10 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index ab9e93c432f62..77786a6765cf7 100644 +index 382c7128cfbf1..632930129f4cb 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -3132,6 +3132,11 @@ +@@ -3445,6 +3445,11 @@ "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 + "expiry_milestone": 140 }, + { + "name": "enable-ipfs", diff --git a/chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.cc.patch similarity index 85% rename from chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.cc.patch rename to chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.cc.patch index 2527fa0e..c78e2088 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index b9f85a38759fc..029edd4f1e1fc 100644 +index 98acea7a32526..be9c94759f291 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -329,6 +329,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = +@@ -335,6 +335,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = "Match Field Trial Testing Config"; diff --git a/chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.h.patch b/chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.h.patch similarity index 86% rename from chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.h.patch rename to chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.h.patch index 2fa6bb23..06f67fcb 100644 --- a/chromium_edits/125.0.6368.2/chrome/browser/flag_descriptions.h.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/flag_descriptions.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index b6d7b4361e1b2..e984dbf51d888 100644 +index a5335a37764d8..3028a95a2c645 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h @@ -24,6 +24,7 @@ @@ -10,7 +10,7 @@ index b6d7b4361e1b2..e984dbf51d888 100644 // This file declares strings used in chrome://flags. These messages are not // translated, because instead of end-users they target Chromium developers and -@@ -199,6 +200,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; +@@ -216,6 +217,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; @@ -19,6 +19,6 @@ index b6d7b4361e1b2..e984dbf51d888 100644 +extern const char kEnableIpfsDescription[]; +#endif + - #if BUILDFLAG(USE_FONTATIONS_BACKEND) extern const char kFontationsFontBackendName[]; extern const char kFontationsFontBackendDescription[]; + diff --git a/chromium_edits/125.0.6382.3/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/131.0.6724.0/chrome/browser/ipfs_extra_parts.cc similarity index 100% rename from chromium_edits/125.0.6382.3/chrome/browser/ipfs_extra_parts.cc rename to chromium_edits/131.0.6724.0/chrome/browser/ipfs_extra_parts.cc diff --git a/chromium_edits/125.0.6382.3/chrome/browser/ipfs_extra_parts.h b/chromium_edits/131.0.6724.0/chrome/browser/ipfs_extra_parts.h similarity index 100% rename from chromium_edits/125.0.6382.3/chrome/browser/ipfs_extra_parts.h rename to chromium_edits/131.0.6724.0/chrome/browser/ipfs_extra_parts.h diff --git a/chromium_edits/125.0.6396.3/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/131.0.6724.0/chrome/browser/prefs/browser_prefs.cc.patch similarity index 75% rename from chromium_edits/125.0.6396.3/chrome/browser/prefs/browser_prefs.cc.patch rename to chromium_edits/131.0.6724.0/chrome/browser/prefs/browser_prefs.cc.patch index c7b1d324..3f525893 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/prefs/browser_prefs.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/browser/prefs/browser_prefs.cc.patch @@ -1,17 +1,16 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 8c13577c0d847..75932b2fa5e9d 100644 +index e408ae181c2eb..d72b7a7d9ea44 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -189,6 +189,8 @@ +@@ -202,6 +202,7 @@ + #include "ppapi/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" -+ #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" -@@ -233,6 +235,11 @@ +@@ -250,6 +251,11 @@ #include "chrome/browser/pdf/pdf_pref_names.h" #endif // BUILDFLAG(ENABLE_PDF) @@ -20,10 +19,10 @@ index 8c13577c0d847..75932b2fa5e9d 100644 +#include "components/ipfs/preferences.h" +#endif + - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1791,6 +1798,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + #if BUILDFLAG(IS_ANDROID) + #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" + #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" +@@ -1891,6 +1897,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, IncognitoModePrefs::RegisterProfilePrefs(registry); invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); diff --git a/chromium_edits/131.0.6724.0/chrome/browser/shell_integration_mac.mm.patch b/chromium_edits/131.0.6724.0/chrome/browser/shell_integration_mac.mm.patch new file mode 100644 index 00000000..220e2546 --- /dev/null +++ b/chromium_edits/131.0.6724.0/chrome/browser/shell_integration_mac.mm.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm +index c6bb768979453..c0d0abb9c78f3 100644 +--- a/chrome/browser/shell_integration_mac.mm ++++ b/chrome/browser/shell_integration_mac.mm +@@ -79,6 +79,8 @@ bool SetAsDefaultBrowser() { + if (LSSetDefaultHandlerForURLScheme(CFSTR("https"), identifier) != noErr) { + return false; + } ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipfs"), identifier); ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipns"), identifier); + if (LSSetDefaultRoleHandlerForContentType(kUTTypeHTML, kLSRolesViewer, + identifier) != noErr) { + return false; diff --git a/chromium_edits/125.0.6382.3/chrome/common/chrome_content_client.cc.patch b/chromium_edits/131.0.6724.0/chrome/common/chrome_content_client.cc.patch similarity index 85% rename from chromium_edits/125.0.6382.3/chrome/common/chrome_content_client.cc.patch rename to chromium_edits/131.0.6724.0/chrome/common/chrome_content_client.cc.patch index 59ea01c2..d34894b4 100644 --- a/chromium_edits/125.0.6382.3/chrome/common/chrome_content_client.cc.patch +++ b/chromium_edits/131.0.6724.0/chrome/common/chrome_content_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 2f016718fdd3c..bc38d5c2e4d8e 100644 +index 60515232467d7..14d5e12a76c76 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc -@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { +@@ -314,6 +314,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { #if BUILDFLAG(IS_ANDROID) schemes->local_schemes.push_back(url::kContentScheme); #endif diff --git a/chromium_edits/131.0.6724.0/chrome/installer/linux/common/desktop.template.patch b/chromium_edits/131.0.6724.0/chrome/installer/linux/common/desktop.template.patch new file mode 100644 index 00000000..dcd9460b --- /dev/null +++ b/chromium_edits/131.0.6724.0/chrome/installer/linux/common/desktop.template.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/installer/linux/common/desktop.template b/chrome/installer/linux/common/desktop.template +index 2eb13ee1aba46..9af65726bde89 100644 +--- a/chrome/installer/linux/common/desktop.template ++++ b/chrome/installer/linux/common/desktop.template +@@ -111,7 +111,7 @@ Terminal=false + Icon=@@PACKAGE@@ + Type=Application + Categories=Network;WebBrowser; +-MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; ++MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ipfs;x-scheme-handler/ipns; + Actions=new-window;new-private-window; + + [Desktop Action new-window] diff --git a/chromium_edits/131.0.6724.0/chrome/installer/util/shell_util.cc.patch b/chromium_edits/131.0.6724.0/chrome/installer/util/shell_util.cc.patch new file mode 100644 index 00000000..fccdad80 --- /dev/null +++ b/chromium_edits/131.0.6724.0/chrome/installer/util/shell_util.cc.patch @@ -0,0 +1,20 @@ +diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc +index c087d1c02bca4..382a36b9cd800 100644 +--- a/chrome/installer/util/shell_util.cc ++++ b/chrome/installer/util/shell_util.cc +@@ -1545,11 +1545,12 @@ const wchar_t* ShellUtil::kDefaultFileAssociations[] = { + const wchar_t* ShellUtil::kPotentialFileAssociations[] = { + L".htm", L".html", L".mhtml", L".pdf", L".shtml", + L".svg", L".xht", L".xhtml", L".webp", nullptr}; +-const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"http", L"https", +- nullptr}; ++const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = { ++ L"http", L"https", L"ipfs", L"ipns", nullptr}; + const wchar_t* ShellUtil::kPotentialProtocolAssociations[] = { + L"http", L"https", L"irc", L"mailto", L"mms", L"news", L"nntp", +- L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", nullptr}; ++ L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", L"ipfs", ++ L"ipns", nullptr}; + const wchar_t* ShellUtil::kRegUrlProtocol = L"URL Protocol"; + const wchar_t* ShellUtil::kRegApplication = L"\\Application"; + const wchar_t* ShellUtil::kRegAppUserModelId = L"AppUserModelId"; diff --git a/chromium_edits/125.0.6396.3/components/cbor/reader.cc.patch b/chromium_edits/131.0.6724.0/components/cbor/reader.cc.patch similarity index 97% rename from chromium_edits/125.0.6396.3/components/cbor/reader.cc.patch rename to chromium_edits/131.0.6724.0/components/cbor/reader.cc.patch index a9c4a7b3..88eef088 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/reader.cc.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/reader.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc -index 3c31e3d05e5d3..5ad0dbb183884 100644 +index 464e93937d8d7..220dd4960cd2b 100644 --- a/components/cbor/reader.cc +++ b/components/cbor/reader.cc @@ -22,7 +22,7 @@ diff --git a/chromium_edits/125.0.6396.3/components/cbor/reader.h.patch b/chromium_edits/131.0.6724.0/components/cbor/reader.h.patch similarity index 88% rename from chromium_edits/125.0.6396.3/components/cbor/reader.h.patch rename to chromium_edits/131.0.6724.0/components/cbor/reader.h.patch index cd7d9eb0..2dbc0534 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/reader.h.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/reader.h.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/reader.h b/components/cbor/reader.h -index 73c5dcb23e555..a933768608d73 100644 +index 5f11ba48ba494..d4c9c489da4b6 100644 --- a/components/cbor/reader.h +++ b/components/cbor/reader.h -@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader { +@@ -131,6 +131,11 @@ class CBOR_EXPORT Reader { // during decoding will set raise the `UNSUPPORTED_FLOATING_POINT_VALUE` // error. bool allow_floating_point = false; @@ -14,7 +14,7 @@ index 73c5dcb23e555..a933768608d73 100644 }; Reader(const Reader&) = delete; -@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader { +@@ -205,6 +210,9 @@ class CBOR_EXPORT Reader { std::optional ReadMapContent(const DataItemHeader& header, const Config& config, int max_nesting_level); diff --git a/chromium_edits/125.0.6382.3/components/cbor/reader_unittest.cc.patch b/chromium_edits/131.0.6724.0/components/cbor/reader_unittest.cc.patch similarity index 100% rename from chromium_edits/125.0.6382.3/components/cbor/reader_unittest.cc.patch rename to chromium_edits/131.0.6724.0/components/cbor/reader_unittest.cc.patch diff --git a/chromium_edits/125.0.6396.3/components/cbor/values.cc.patch b/chromium_edits/131.0.6724.0/components/cbor/values.cc.patch similarity index 87% rename from chromium_edits/125.0.6396.3/components/cbor/values.cc.patch rename to chromium_edits/131.0.6724.0/components/cbor/values.cc.patch index ddbab2b3..fba23766 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/values.cc.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/values.cc.patch @@ -1,9 +1,9 @@ diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 02498209c820e..34055aef24cfe 100644 +index 303ac7fe300e3..7f796304e465a 100644 --- a/components/cbor/values.cc +++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { - NOTREACHED(); +@@ -71,32 +71,34 @@ Value::Value(Type type) : type_(type) { + NOTREACHED_IN_MIGRATION(); } -Value::Value(SimpleValue in_simple) @@ -49,17 +49,17 @@ index 02498209c820e..34055aef24cfe 100644 DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); } -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { +@@ -122,7 +124,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { } } --Value::Value(base::StringPiece in_string, Type type) : type_(type) { -+Value::Value(base::StringPiece in_string, Type type, uint64_t tag) +-Value::Value(std::string_view in_string, Type type) : type_(type) { ++Value::Value(std::string_view in_string, Type type, uint64_t tag) +: type_(type), tag_(tag) { switch (type_) { case Type::STRING: new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(base::StringPiece in_string, Type type) : type_(type) { +@@ -138,16 +141,18 @@ Value::Value(std::string_view in_string, Type type) : type_(type) { } } @@ -82,7 +82,7 @@ index 02498209c820e..34055aef24cfe 100644 map_value_.reserve(in_map.size()); for (const auto& it : in_map) map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { +@@ -173,31 +178,36 @@ Value Value::Clone() const { case Type::NONE: return Value(); case Type::INVALID_UTF8: @@ -105,7 +105,7 @@ index 02498209c820e..34055aef24cfe 100644 - return Value(map_value_); + return Value(map_value_, tag_); case Type::TAG: - NOTREACHED() << constants::kUnsupportedMajorType; + NOTREACHED_IN_MIGRATION() << constants::kUnsupportedMajorType; return Value(); case Type::SIMPLE_VALUE: - return Value(simple_value_); @@ -115,7 +115,7 @@ index 02498209c820e..34055aef24cfe 100644 + return Value(float_value_, tag_); } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return Value(); } @@ -127,7 +127,7 @@ index 02498209c820e..34055aef24cfe 100644 Value::SimpleValue Value::GetSimpleValue() const { CHECK(is_simple()); return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { +@@ -263,9 +273,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { return bytestring_value_; } diff --git a/chromium_edits/125.0.6382.3/components/cbor/values.h.patch b/chromium_edits/131.0.6724.0/components/cbor/values.h.patch similarity index 87% rename from chromium_edits/125.0.6382.3/components/cbor/values.h.patch rename to chromium_edits/131.0.6724.0/components/cbor/values.h.patch index ca39df01..5556e8c5 100644 --- a/chromium_edits/125.0.6382.3/components/cbor/values.h.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/values.h.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/values.h b/components/cbor/values.h -index d81ef5607c55a..10216a8dcdc57 100644 +index d55369f1a71bf..7dabb368c51d6 100644 --- a/components/cbor/values.h +++ b/components/cbor/values.h -@@ -127,28 +127,29 @@ class CBOR_EXPORT Value { +@@ -125,28 +125,29 @@ class CBOR_EXPORT Value { explicit Value(Type type); @@ -25,8 +25,8 @@ index d81ef5607c55a..10216a8dcdc57 100644 explicit Value(const char* in_string, Type type = Type::STRING); explicit Value(std::string&& in_string, Type type = Type::STRING) noexcept; -- explicit Value(base::StringPiece in_string, Type type = Type::STRING); -+ explicit Value(base::StringPiece in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); +- explicit Value(std::string_view in_string, Type type = Type::STRING); ++ explicit Value(std::string_view in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); - explicit Value(const ArrayValue& in_array); - explicit Value(ArrayValue&& in_array) noexcept; @@ -42,7 +42,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 Value(const Value&) = delete; Value& operator=(const Value&) = delete; -@@ -179,6 +180,7 @@ class CBOR_EXPORT Value { +@@ -177,6 +178,7 @@ class CBOR_EXPORT Value { bool is_string() const { return type() == Type::STRING; } bool is_array() const { return type() == Type::ARRAY; } bool is_map() const { return type() == Type::MAP; } @@ -50,7 +50,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 // These will all fatally assert if the type doesn't match. SimpleValue GetSimpleValue() const; -@@ -194,12 +196,13 @@ class CBOR_EXPORT Value { +@@ -192,12 +194,13 @@ class CBOR_EXPORT Value { const ArrayValue& GetArray() const; const MapValue& GetMap() const; const BinaryValue& GetInvalidUTF8() const; @@ -65,7 +65,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 Type type_; -@@ -213,6 +216,11 @@ class CBOR_EXPORT Value { +@@ -211,6 +214,11 @@ class CBOR_EXPORT Value { MapValue map_value_; }; diff --git a/chromium_edits/125.0.6382.3/components/cbor/writer.cc.patch b/chromium_edits/131.0.6724.0/components/cbor/writer.cc.patch similarity index 91% rename from chromium_edits/125.0.6382.3/components/cbor/writer.cc.patch rename to chromium_edits/131.0.6724.0/components/cbor/writer.cc.patch index bb89c1e6..150c3fca 100644 --- a/chromium_edits/125.0.6382.3/components/cbor/writer.cc.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/writer.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc -index f400a65e7b66a..fcdebb8f3b458 100644 +index e7e47774abe9a..4c085d5693a38 100644 --- a/components/cbor/writer.cc +++ b/components/cbor/writer.cc @@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node, diff --git a/chromium_edits/125.0.6396.3/components/cbor/writer_unittest.cc.patch b/chromium_edits/131.0.6724.0/components/cbor/writer_unittest.cc.patch similarity index 91% rename from chromium_edits/125.0.6396.3/components/cbor/writer_unittest.cc.patch rename to chromium_edits/131.0.6724.0/components/cbor/writer_unittest.cc.patch index 240fee83..1acf5f7f 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/writer_unittest.cc.patch +++ b/chromium_edits/131.0.6724.0/components/cbor/writer_unittest.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/writer_unittest.cc b/components/cbor/writer_unittest.cc -index e3bffe20734bc..0ed569ae164a0 100644 +index ee11e7cb86712..b8942f1829a37 100644 --- a/components/cbor/writer_unittest.cc +++ b/components/cbor/writer_unittest.cc -@@ -522,4 +522,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { +@@ -523,4 +523,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { EXPECT_FALSE(Writer::Write(Value(map), 4).has_value()); } diff --git a/chromium_edits/125.0.6368.2/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/131.0.6724.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch similarity index 95% rename from chromium_edits/125.0.6368.2/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch rename to chromium_edits/131.0.6724.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch index 291d84f1..ee376ce1 100644 --- a/chromium_edits/125.0.6368.2/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ b/chromium_edits/131.0.6724.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 32c4138ec358c..e9c62d51bf59b 100644 +index 3683fadcc0914..440d4be132e5c 100644 --- a/components/open_from_clipboard/clipboard_recent_content_generic.cc +++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc @@ -20,7 +20,7 @@ diff --git a/chromium_edits/125.0.6368.2/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/131.0.6724.0/net/dns/dns_config_service_linux.cc.patch similarity index 88% rename from chromium_edits/125.0.6368.2/net/dns/dns_config_service_linux.cc.patch rename to chromium_edits/131.0.6724.0/net/dns/dns_config_service_linux.cc.patch index 3b042d33..fd7227a5 100644 --- a/chromium_edits/125.0.6368.2/net/dns/dns_config_service_linux.cc.patch +++ b/chromium_edits/131.0.6724.0/net/dns/dns_config_service_linux.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc -index f909f127ba3e1..31d7f9d58c0af 100644 +index 7aaf9fa5b0b78..5a9f5b5a70dd9 100644 --- a/net/dns/dns_config_service_linux.cc +++ b/net/dns/dns_config_service_linux.cc -@@ -271,11 +271,11 @@ bool IsNsswitchConfigCompatible( +@@ -276,11 +276,11 @@ bool IsNsswitchConfigCompatible( // Ignore any entries after `kDns` because Chrome will fallback to the // system resolver if a result was not found in DNS. return true; diff --git a/chromium_edits/125.0.6382.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/131.0.6724.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch similarity index 70% rename from chromium_edits/125.0.6382.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch rename to chromium_edits/131.0.6724.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch index 119d72b2..663fe49e 100644 --- a/chromium_edits/125.0.6382.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ b/chromium_edits/131.0.6724.0/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch @@ -1,13 +1,15 @@ diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index 4eadf46ea0c24..d62fc7fb14e01 100644 +index e1bc209c337c5..6fbac29fcddfd 100644 --- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc +++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -67,7 +67,7 @@ class URLSchemesRegistry final { +@@ -68,8 +68,8 @@ class URLSchemesRegistry final { // is considered secure. Additional checks are performed to ensure that // other http pages are filtered out. service_worker_schemes({"http", "https"}), - fetch_api_schemes({"http", "https"}), +- allowed_in_referrer_schemes({"http", "https"}) { + fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { ++ allowed_in_referrer_schemes({"http", "https", "ipfs", "ipns"}) { for (auto& scheme : url::GetCorsEnabledSchemes()) cors_enabled_schemes.insert(scheme.c_str()); + for (auto& scheme : url::GetCSPBypassingSchemes()) { diff --git a/chromium_edits/125.0.6396.3/url/BUILD.gn.patch b/chromium_edits/131.0.6724.0/url/BUILD.gn.patch similarity index 95% rename from chromium_edits/125.0.6396.3/url/BUILD.gn.patch rename to chromium_edits/131.0.6724.0/url/BUILD.gn.patch index 201770c4..be4bfca8 100644 --- a/chromium_edits/125.0.6396.3/url/BUILD.gn.patch +++ b/chromium_edits/131.0.6724.0/url/BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/url/BUILD.gn b/url/BUILD.gn -index aedf1bf9f80be..b11c73a88aae5 100644 +index f22b73bc29f06..df36977322ec7 100644 --- a/url/BUILD.gn +++ b/url/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/chromium_edits/131.0.6724.0/url/url_canon.h.patch b/chromium_edits/131.0.6724.0/url/url_canon.h.patch new file mode 100644 index 00000000..ffe72eea --- /dev/null +++ b/chromium_edits/131.0.6724.0/url/url_canon.h.patch @@ -0,0 +1,26 @@ +diff --git a/url/url_canon.h b/url/url_canon.h +index 22def4917fdd0..40dda81954a56 100644 +--- a/url/url_canon.h ++++ b/url/url_canon.h +@@ -821,6 +821,21 @@ bool CanonicalizeMailtoURL(const char16_t* spec, + CanonOutput* output, + Parsed* new_parsed); + ++COMPONENT_EXPORT(URL) ++bool CanonicalizeIpfsURL(std::string_view spec, ++ const Parsed& parsed, ++ SchemeType scheme_type, ++ CharsetConverter* query_converter, ++ CanonOutput* output, ++ Parsed* new_parsed); ++COMPONENT_EXPORT(URL) ++bool CanonicalizeIpfsURL(std::basic_string_view spec, ++ const Parsed& parsed, ++ SchemeType scheme_type, ++ CharsetConverter* query_converter, ++ CanonOutput* output, ++ Parsed* new_parsed); ++ + // Part replacer -------------------------------------------------------------- + + // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/131.0.6724.0/url/url_canon_ipfs.cc b/chromium_edits/131.0.6724.0/url/url_canon_ipfs.cc new file mode 100644 index 00000000..e40732ee --- /dev/null +++ b/chromium_edits/131.0.6724.0/url/url_canon_ipfs.cc @@ -0,0 +1,54 @@ +#include "url_canon_internal.h" + +#include +#include + +#include + +bool url::CanonicalizeIpfsURL(std::string_view spec, + const Parsed& parsed, + SchemeType scheme_type, + CharsetConverter* charset_converter, + CanonOutput* output, + Parsed* output_parsed) { + if (spec.size() < 1) { + return false; + } + if ( parsed.host.len < 1 ) { + return false; + } + auto cid_str = spec.substr( parsed.host.begin, static_cast(parsed.host.len) ); + auto cid = ipfs::Cid(cid_str); + if ( !cid.valid() ) { + cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); + } + auto as_str = cid.to_string(); + if ( as_str.empty() ) { + return false; + } + std::string stdurl{ spec.substr(0UL, static_cast(parsed.host.begin)) }; + stdurl.append( as_str ); + spec.remove_prefix(parsed.host.end()); + stdurl.append(spec); + auto len = static_cast(stdurl.size()); + Parsed parsed_input; + ParseStandardURL(stdurl.data(), len, &parsed_input); + return CanonicalizeStandardURL( + stdurl.data(), + parsed_input, + scheme_type, + charset_converter, + output, output_parsed + ); +} +bool url::CanonicalizeIpfsURL(std::basic_string_view spec, + const Parsed& parsed, + SchemeType scheme_type, + CharsetConverter* query_converter, + CanonOutput* output, + Parsed* new_parsed) { + RawCanonOutput<2048> as8; + ConvertUTF16ToUTF8(spec.data(), spec.size(), &as8); + return CanonicalizeIpfsURL({as8.data(), as8.length()}, parsed, scheme_type, + query_converter, output, new_parsed); +} diff --git a/chromium_edits/131.0.6724.0/url/url_util.cc.patch b/chromium_edits/131.0.6724.0/url/url_util.cc.patch new file mode 100644 index 00000000..988797b0 --- /dev/null +++ b/chromium_edits/131.0.6724.0/url/url_util.cc.patch @@ -0,0 +1,45 @@ +diff --git a/url/url_util.cc b/url/url_util.cc +index ce5225e121f5d..79e33208f728e 100644 +--- a/url/url_util.cc ++++ b/url/url_util.cc +@@ -76,6 +76,8 @@ struct SchemeRegistry { + std::vector referrer_schemes = { + {kHttpsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, + {kHttpScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that do not trigger mixed content warning. +@@ -84,6 +86,8 @@ struct SchemeRegistry { + kWssScheme, + kDataScheme, + kAboutScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that normal pages cannot link to or access (i.e., with the same +@@ -105,6 +109,8 @@ struct SchemeRegistry { + kHttpsScheme, + kHttpScheme, + kDataScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that can be used by web to store data (local storage, etc). +@@ -308,7 +314,12 @@ bool DoCanonicalize(const CHAR* spec, + success = CanonicalizeFileSystemURL( + spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), + charset_converter, output, output_parsed); +- ++ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { ++ auto spec_view = std::basic_string_view(spec, spec_len); ++ // Switch multibase away from case-sensitive ones before continuing canonicalization. ++ auto parsed_input = ParseStandardURL(spec_view); ++ success = CanonicalizeIpfsURL(spec_view, parsed_input, scheme_type, ++ charset_converter, output, output_parsed); + } else if (DoIsStandard(spec, scheme, &scheme_type)) { + // All "normal" URLs. + success = CanonicalizeStandardURL( diff --git a/chromium_edits/125.0.6412.0/chrome/browser/BUILD.gn.patch b/chromium_edits/131.0.6724.1/chrome/browser/BUILD.gn.patch similarity index 67% rename from chromium_edits/125.0.6412.0/chrome/browser/BUILD.gn.patch rename to chromium_edits/131.0.6724.1/chrome/browser/BUILD.gn.patch index c16d077d..aef0fddb 100644 --- a/chromium_edits/125.0.6412.0/chrome/browser/BUILD.gn.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index fde5042ab2f11..076c80d450ee7 100644 +index c61541ba3618f..557c2ea8cb394 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -39,6 +39,7 @@ import("//sandbox/features.gni") +@@ -40,6 +40,7 @@ import("//sandbox/features.gni") import("//services/screen_ai/buildflags/features.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/blink/public/public_features.gni") @@ -10,9 +10,9 @@ index fde5042ab2f11..076c80d450ee7 100644 import("//third_party/protobuf/proto_library.gni") import("//third_party/webrtc/webrtc.gni") import("//third_party/widevine/cdm/widevine.gni") -@@ -2702,6 +2703,14 @@ static_library("browser") { - ] - } +@@ -2499,6 +2500,14 @@ static_library("browser") { + "//ui/webui", + ] + if (enable_ipfs) { + sources += [ @@ -22,6 +22,6 @@ index fde5042ab2f11..076c80d450ee7 100644 + deps += [ "//components/ipfs" ] + } + - if (is_chromeos_ash) { - deps += [ "//chrome/browser/screen_ai:screen_ai_dlc_installer" ] - } + # Platforms that have a network diagnostics dialog. All others fall through + # to the stub which is not implemented. + if (is_chromeos_ash) { diff --git a/chromium_edits/125.0.6412.0/chrome/browser/about_flags.cc.patch b/chromium_edits/131.0.6724.1/chrome/browser/about_flags.cc.patch similarity index 90% rename from chromium_edits/125.0.6412.0/chrome/browser/about_flags.cc.patch rename to chromium_edits/131.0.6724.1/chrome/browser/about_flags.cc.patch index e129ad39..50db73fc 100644 --- a/chromium_edits/125.0.6412.0/chrome/browser/about_flags.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/about_flags.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 4e93f36dbc68b..1890cd7b866fa 100644 +index e3b7a5ebf983b..31714d3864f41 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -217,6 +217,7 @@ +@@ -227,6 +227,7 @@ #include "third_party/blink/public/common/features_generated.h" #include "third_party/blink/public/common/forcedark/forcedark_switches.h" #include "third_party/blink/public/common/switches.h" @@ -10,7 +10,7 @@ index 4e93f36dbc68b..1890cd7b866fa 100644 #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ozone_buildflags.h" -@@ -311,6 +312,10 @@ +@@ -326,6 +327,10 @@ #include "extensions/common/switches.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -21,7 +21,7 @@ index 4e93f36dbc68b..1890cd7b866fa 100644 #if BUILDFLAG(ENABLE_PDF) #include "pdf/pdf_features.h" #endif -@@ -9601,6 +9606,14 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9881,6 +9886,14 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kOmitCorsClientCertDescription, kOsAll, FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)}, diff --git a/chromium_edits/125.0.6396.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch b/chromium_edits/131.0.6724.1/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch similarity index 82% rename from chromium_edits/125.0.6396.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch rename to chromium_edits/131.0.6724.1/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch index 4d172311..f9965a24 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.patch @@ -1,27 +1,28 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -index 4c88614c68c25..f8bb12a3b0c2e 100644 +index 9f234a2a7d41d..a9378ca80dc1e 100644 --- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -10,6 +10,8 @@ - #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" - #include "chrome/browser/external_protocol/external_protocol_handler.h" - #include "chrome/browser/profiles/profile.h" +@@ -13,6 +13,7 @@ + #include "chrome/browser/profiles/profile_io_data.h" + #include "components/custom_handlers/protocol_handler_registry.h" + #include "content/public/common/url_constants.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" -+ + #include "url/url_util.h" + #if BUILDFLAG(IS_ANDROID) - #include "chrome/browser/profiles/profile_android.h" - #endif -@@ -18,6 +20,9 @@ +@@ -20,6 +21,11 @@ #include "chrome/browser/ui/android/omnibox/jni_headers/ChromeAutocompleteSchemeClassifier_jni.h" #endif - #include "components/custom_handlers/protocol_handler_registry.h" + +#if BUILDFLAG(ENABLE_IPFS) +#include "components/ipfs/ipfs_features.h" +#endif - #include "content/public/common/url_constants.h" - #include "url/url_util.h" - -@@ -55,12 +60,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( ++ ++ + #if BUILDFLAG(IS_ANDROID) + static jlong + JNI_ChromeAutocompleteSchemeClassifier_CreateAutocompleteClassifier( +@@ -53,12 +59,20 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme( if (scheme.empty()) { return metrics::OmniboxInputType::EMPTY; } diff --git a/chromium_edits/125.0.6412.0/chrome/browser/chrome_content_browser_client.cc.patch b/chromium_edits/131.0.6724.1/chrome/browser/chrome_content_browser_client.cc.patch similarity index 80% rename from chromium_edits/125.0.6412.0/chrome/browser/chrome_content_browser_client.cc.patch rename to chromium_edits/131.0.6724.1/chrome/browser/chrome_content_browser_client.cc.patch index d57d264b..424199ef 100644 --- a/chromium_edits/125.0.6412.0/chrome/browser/chrome_content_browser_client.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/chrome_content_browser_client.cc.patch @@ -1,17 +1,17 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc -index c0f9870dbb282..3097911fdf0c3 100644 +index 82438940a2bb6..1c256f9c41e71 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -384,6 +384,7 @@ - #include "third_party/blink/public/common/switches.h" +@@ -404,6 +404,7 @@ #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h" + #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h" #include "third_party/blink/public/public_buildflags.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" #include "third_party/widevine/cdm/buildflags.h" #include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/l10n/l10n_util.h" -@@ -506,6 +507,13 @@ - #include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h" +@@ -530,6 +531,13 @@ + #include "chrome/browser/chrome_browser_main_posix.h" #endif +#if BUILDFLAG(ENABLE_IPFS) @@ -22,9 +22,9 @@ index c0f9870dbb282..3097911fdf0c3 100644 +#endif + #if !BUILDFLAG(IS_ANDROID) + #include "chrome/browser/digital_credentials/digital_identity_provider_desktop.h" #include "chrome/browser/preloading/preview/preview_navigation_throttle.h" - #include "chrome/browser/web_applications/isolated_web_apps/chrome_content_browser_client_isolated_web_apps_part.h" -@@ -1723,6 +1731,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { +@@ -1863,6 +1871,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) { main_parts->AddParts( std::make_unique()); @@ -36,7 +36,7 @@ index c0f9870dbb282..3097911fdf0c3 100644 return main_parts; } -@@ -6177,12 +6190,25 @@ void ChromeContentBrowserClient:: +@@ -6526,12 +6539,29 @@ void ChromeContentBrowserClient:: const std::optional& request_initiator_origin, NonNetworkURLLoaderFactoryMap* factories) { #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ @@ -48,7 +48,9 @@ index c0f9870dbb282..3097911fdf0c3 100644 #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \ // !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(ENABLE_IPFS) -+ if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { ++ if (!web_contents) { ++ VLOG(2) << "No web contents, can't register url loader factory."; ++ } else if (base::FeatureList::IsEnabled(ipfs::kEnableIpfs)) { + network::mojom::URLLoaderFactory* default_factory = g_browser_process->system_network_context_manager()->GetURLLoaderFactory(); + auto* context = web_contents->GetBrowserContext(); + ipfs::IpfsURLLoaderFactory::Create( @@ -58,12 +60,14 @@ index c0f9870dbb282..3097911fdf0c3 100644 + GetSystemNetworkContext(), + Profile::FromBrowserContext(context)->GetPrefs() + ); ++ } else { ++ LOG(INFO) << "IPFS disabled."; + } +#endif // BUILDFLAG(ENABLE_IPFS) #if BUILDFLAG(IS_CHROMEOS_ASH) if (web_contents) { -@@ -6316,6 +6342,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( +@@ -6679,6 +6709,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors( scoped_refptr navigation_response_task_runner) { std::vector> interceptors; diff --git a/chromium_edits/125.0.6396.3/chrome/browser/flag-metadata.json.patch b/chromium_edits/131.0.6724.1/chrome/browser/flag-metadata.json.patch similarity index 84% rename from chromium_edits/125.0.6396.3/chrome/browser/flag-metadata.json.patch rename to chromium_edits/131.0.6724.1/chrome/browser/flag-metadata.json.patch index ad068ba9..dd1765a6 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/flag-metadata.json.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/flag-metadata.json.patch @@ -1,10 +1,10 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json -index f5f5f5081974f..0ee831ea6645b 100644 +index 382c7128cfbf1..632930129f4cb 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -3132,6 +3132,11 @@ +@@ -3445,6 +3445,11 @@ "owners": [ "adamta@google.com", "chrome-feed-fundamentals@google.com" ], - "expiry_milestone": 130 + "expiry_milestone": 140 }, + { + "name": "enable-ipfs", diff --git a/chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.cc.patch b/chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.cc.patch similarity index 85% rename from chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.cc.patch rename to chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.cc.patch index b07d85df..c78e2088 100644 --- a/chromium_edits/125.0.6396.3/chrome/browser/flag_descriptions.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 50ab6dddbcddc..0eaaaa3a28fb1 100644 +index 98acea7a32526..be9c94759f291 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -312,6 +312,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = +@@ -335,6 +335,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] = const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] = "Match Field Trial Testing Config"; diff --git a/chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.h.patch b/chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.h.patch similarity index 84% rename from chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.h.patch rename to chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.h.patch index bb761151..06f67fcb 100644 --- a/chromium_edits/125.0.6382.3/chrome/browser/flag_descriptions.h.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/flag_descriptions.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 801ea7a83dfaf..288fd279d7407 100644 +index a5335a37764d8..3028a95a2c645 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h -@@ -23,6 +23,7 @@ +@@ -24,6 +24,7 @@ #include "pdf/buildflags.h" #include "printing/buildflags/buildflags.h" #include "third_party/blink/public/common/buildflags.h" @@ -10,7 +10,7 @@ index 801ea7a83dfaf..288fd279d7407 100644 // This file declares strings used in chrome://flags. These messages are not // translated, because instead of end-users they target Chromium developers and -@@ -192,6 +193,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; +@@ -216,6 +217,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[]; extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[]; extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[]; @@ -19,6 +19,6 @@ index 801ea7a83dfaf..288fd279d7407 100644 +extern const char kEnableIpfsDescription[]; +#endif + - #if BUILDFLAG(USE_FONTATIONS_BACKEND) extern const char kFontationsFontBackendName[]; extern const char kFontationsFontBackendDescription[]; + diff --git a/chromium_edits/125.0.6396.3/chrome/browser/ipfs_extra_parts.cc b/chromium_edits/131.0.6724.1/chrome/browser/ipfs_extra_parts.cc similarity index 100% rename from chromium_edits/125.0.6396.3/chrome/browser/ipfs_extra_parts.cc rename to chromium_edits/131.0.6724.1/chrome/browser/ipfs_extra_parts.cc diff --git a/chromium_edits/125.0.6396.3/chrome/browser/ipfs_extra_parts.h b/chromium_edits/131.0.6724.1/chrome/browser/ipfs_extra_parts.h similarity index 100% rename from chromium_edits/125.0.6396.3/chrome/browser/ipfs_extra_parts.h rename to chromium_edits/131.0.6724.1/chrome/browser/ipfs_extra_parts.h diff --git a/chromium_edits/125.0.6412.0/chrome/browser/prefs/browser_prefs.cc.patch b/chromium_edits/131.0.6724.1/chrome/browser/prefs/browser_prefs.cc.patch similarity index 75% rename from chromium_edits/125.0.6412.0/chrome/browser/prefs/browser_prefs.cc.patch rename to chromium_edits/131.0.6724.1/chrome/browser/prefs/browser_prefs.cc.patch index 9dc1c14e..3f525893 100644 --- a/chromium_edits/125.0.6412.0/chrome/browser/prefs/browser_prefs.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/browser/prefs/browser_prefs.cc.patch @@ -1,17 +1,16 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 5eff3512acbc9..fb8ea9a5e2da9 100644 +index e408ae181c2eb..d72b7a7d9ea44 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -190,6 +190,8 @@ +@@ -202,6 +202,7 @@ + #include "ppapi/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" +#include "third_party/ipfs_client/ipfs_buildflags.h" -+ #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" -@@ -234,6 +236,11 @@ +@@ -250,6 +251,11 @@ #include "chrome/browser/pdf/pdf_pref_names.h" #endif // BUILDFLAG(ENABLE_PDF) @@ -20,10 +19,10 @@ index 5eff3512acbc9..fb8ea9a5e2da9 100644 +#include "components/ipfs/preferences.h" +#endif + - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) - #include "chrome/browser/screen_ai/pref_names.h" - #endif -@@ -1808,6 +1815,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + #if BUILDFLAG(IS_ANDROID) + #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" + #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" +@@ -1891,6 +1897,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, IncognitoModePrefs::RegisterProfilePrefs(registry); invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry); invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry); diff --git a/chromium_edits/131.0.6724.1/chrome/browser/shell_integration_mac.mm.patch b/chromium_edits/131.0.6724.1/chrome/browser/shell_integration_mac.mm.patch new file mode 100644 index 00000000..220e2546 --- /dev/null +++ b/chromium_edits/131.0.6724.1/chrome/browser/shell_integration_mac.mm.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm +index c6bb768979453..c0d0abb9c78f3 100644 +--- a/chrome/browser/shell_integration_mac.mm ++++ b/chrome/browser/shell_integration_mac.mm +@@ -79,6 +79,8 @@ bool SetAsDefaultBrowser() { + if (LSSetDefaultHandlerForURLScheme(CFSTR("https"), identifier) != noErr) { + return false; + } ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipfs"), identifier); ++ LSSetDefaultHandlerForURLScheme(CFSTR("ipns"), identifier); + if (LSSetDefaultRoleHandlerForContentType(kUTTypeHTML, kLSRolesViewer, + identifier) != noErr) { + return false; diff --git a/chromium_edits/125.0.6412.0/chrome/common/chrome_content_client.cc.patch b/chromium_edits/131.0.6724.1/chrome/common/chrome_content_client.cc.patch similarity index 85% rename from chromium_edits/125.0.6412.0/chrome/common/chrome_content_client.cc.patch rename to chromium_edits/131.0.6724.1/chrome/common/chrome_content_client.cc.patch index 59ea01c2..d34894b4 100644 --- a/chromium_edits/125.0.6412.0/chrome/common/chrome_content_client.cc.patch +++ b/chromium_edits/131.0.6724.1/chrome/common/chrome_content_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc -index 2f016718fdd3c..bc38d5c2e4d8e 100644 +index 60515232467d7..14d5e12a76c76 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc -@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { +@@ -314,6 +314,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) { #if BUILDFLAG(IS_ANDROID) schemes->local_schemes.push_back(url::kContentScheme); #endif diff --git a/chromium_edits/131.0.6724.1/chrome/installer/linux/common/desktop.template.patch b/chromium_edits/131.0.6724.1/chrome/installer/linux/common/desktop.template.patch new file mode 100644 index 00000000..dcd9460b --- /dev/null +++ b/chromium_edits/131.0.6724.1/chrome/installer/linux/common/desktop.template.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/installer/linux/common/desktop.template b/chrome/installer/linux/common/desktop.template +index 2eb13ee1aba46..9af65726bde89 100644 +--- a/chrome/installer/linux/common/desktop.template ++++ b/chrome/installer/linux/common/desktop.template +@@ -111,7 +111,7 @@ Terminal=false + Icon=@@PACKAGE@@ + Type=Application + Categories=Network;WebBrowser; +-MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; ++MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ipfs;x-scheme-handler/ipns; + Actions=new-window;new-private-window; + + [Desktop Action new-window] diff --git a/chromium_edits/131.0.6724.1/chrome/installer/util/shell_util.cc.patch b/chromium_edits/131.0.6724.1/chrome/installer/util/shell_util.cc.patch new file mode 100644 index 00000000..fccdad80 --- /dev/null +++ b/chromium_edits/131.0.6724.1/chrome/installer/util/shell_util.cc.patch @@ -0,0 +1,20 @@ +diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc +index c087d1c02bca4..382a36b9cd800 100644 +--- a/chrome/installer/util/shell_util.cc ++++ b/chrome/installer/util/shell_util.cc +@@ -1545,11 +1545,12 @@ const wchar_t* ShellUtil::kDefaultFileAssociations[] = { + const wchar_t* ShellUtil::kPotentialFileAssociations[] = { + L".htm", L".html", L".mhtml", L".pdf", L".shtml", + L".svg", L".xht", L".xhtml", L".webp", nullptr}; +-const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"http", L"https", +- nullptr}; ++const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = { ++ L"http", L"https", L"ipfs", L"ipns", nullptr}; + const wchar_t* ShellUtil::kPotentialProtocolAssociations[] = { + L"http", L"https", L"irc", L"mailto", L"mms", L"news", L"nntp", +- L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", nullptr}; ++ L"sms", L"smsto", L"snews", L"tel", L"urn", L"webcal", L"ipfs", ++ L"ipns", nullptr}; + const wchar_t* ShellUtil::kRegUrlProtocol = L"URL Protocol"; + const wchar_t* ShellUtil::kRegApplication = L"\\Application"; + const wchar_t* ShellUtil::kRegAppUserModelId = L"AppUserModelId"; diff --git a/chromium_edits/125.0.6368.2/components/cbor/reader.cc.patch b/chromium_edits/131.0.6724.1/components/cbor/reader.cc.patch similarity index 97% rename from chromium_edits/125.0.6368.2/components/cbor/reader.cc.patch rename to chromium_edits/131.0.6724.1/components/cbor/reader.cc.patch index a9c4a7b3..88eef088 100644 --- a/chromium_edits/125.0.6368.2/components/cbor/reader.cc.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/reader.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc -index 3c31e3d05e5d3..5ad0dbb183884 100644 +index 464e93937d8d7..220dd4960cd2b 100644 --- a/components/cbor/reader.cc +++ b/components/cbor/reader.cc @@ -22,7 +22,7 @@ diff --git a/chromium_edits/125.0.6368.2/components/cbor/reader.h.patch b/chromium_edits/131.0.6724.1/components/cbor/reader.h.patch similarity index 88% rename from chromium_edits/125.0.6368.2/components/cbor/reader.h.patch rename to chromium_edits/131.0.6724.1/components/cbor/reader.h.patch index cd7d9eb0..2dbc0534 100644 --- a/chromium_edits/125.0.6368.2/components/cbor/reader.h.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/reader.h.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/reader.h b/components/cbor/reader.h -index 73c5dcb23e555..a933768608d73 100644 +index 5f11ba48ba494..d4c9c489da4b6 100644 --- a/components/cbor/reader.h +++ b/components/cbor/reader.h -@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader { +@@ -131,6 +131,11 @@ class CBOR_EXPORT Reader { // during decoding will set raise the `UNSUPPORTED_FLOATING_POINT_VALUE` // error. bool allow_floating_point = false; @@ -14,7 +14,7 @@ index 73c5dcb23e555..a933768608d73 100644 }; Reader(const Reader&) = delete; -@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader { +@@ -205,6 +210,9 @@ class CBOR_EXPORT Reader { std::optional ReadMapContent(const DataItemHeader& header, const Config& config, int max_nesting_level); diff --git a/chromium_edits/125.0.6396.3/components/cbor/reader_unittest.cc.patch b/chromium_edits/131.0.6724.1/components/cbor/reader_unittest.cc.patch similarity index 100% rename from chromium_edits/125.0.6396.3/components/cbor/reader_unittest.cc.patch rename to chromium_edits/131.0.6724.1/components/cbor/reader_unittest.cc.patch diff --git a/chromium_edits/125.0.6382.3/components/cbor/values.cc.patch b/chromium_edits/131.0.6724.1/components/cbor/values.cc.patch similarity index 87% rename from chromium_edits/125.0.6382.3/components/cbor/values.cc.patch rename to chromium_edits/131.0.6724.1/components/cbor/values.cc.patch index ddbab2b3..fba23766 100644 --- a/chromium_edits/125.0.6382.3/components/cbor/values.cc.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/values.cc.patch @@ -1,9 +1,9 @@ diff --git a/components/cbor/values.cc b/components/cbor/values.cc -index 02498209c820e..34055aef24cfe 100644 +index 303ac7fe300e3..7f796304e465a 100644 --- a/components/cbor/values.cc +++ b/components/cbor/values.cc -@@ -66,32 +66,34 @@ Value::Value(Type type) : type_(type) { - NOTREACHED(); +@@ -71,32 +71,34 @@ Value::Value(Type type) : type_(type) { + NOTREACHED_IN_MIGRATION(); } -Value::Value(SimpleValue in_simple) @@ -49,17 +49,17 @@ index 02498209c820e..34055aef24cfe 100644 DCHECK(type_ == Type::BYTE_STRING || type_ == Type::INVALID_UTF8); } -@@ -117,7 +119,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { +@@ -122,7 +124,8 @@ Value::Value(std::string&& in_string, Type type) noexcept : type_(type) { } } --Value::Value(base::StringPiece in_string, Type type) : type_(type) { -+Value::Value(base::StringPiece in_string, Type type, uint64_t tag) +-Value::Value(std::string_view in_string, Type type) : type_(type) { ++Value::Value(std::string_view in_string, Type type, uint64_t tag) +: type_(type), tag_(tag) { switch (type_) { case Type::STRING: new (&string_value_) std::string(); -@@ -133,16 +136,18 @@ Value::Value(base::StringPiece in_string, Type type) : type_(type) { +@@ -138,16 +141,18 @@ Value::Value(std::string_view in_string, Type type) : type_(type) { } } @@ -82,7 +82,7 @@ index 02498209c820e..34055aef24cfe 100644 map_value_.reserve(in_map.size()); for (const auto& it : in_map) map_value_.emplace_hint(map_value_.end(), it.first.Clone(), -@@ -168,31 +173,36 @@ Value Value::Clone() const { +@@ -173,31 +178,36 @@ Value Value::Clone() const { case Type::NONE: return Value(); case Type::INVALID_UTF8: @@ -105,7 +105,7 @@ index 02498209c820e..34055aef24cfe 100644 - return Value(map_value_); + return Value(map_value_, tag_); case Type::TAG: - NOTREACHED() << constants::kUnsupportedMajorType; + NOTREACHED_IN_MIGRATION() << constants::kUnsupportedMajorType; return Value(); case Type::SIMPLE_VALUE: - return Value(simple_value_); @@ -115,7 +115,7 @@ index 02498209c820e..34055aef24cfe 100644 + return Value(float_value_, tag_); } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return Value(); } @@ -127,7 +127,7 @@ index 02498209c820e..34055aef24cfe 100644 Value::SimpleValue Value::GetSimpleValue() const { CHECK(is_simple()); return simple_value_; -@@ -258,9 +268,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { +@@ -263,9 +273,14 @@ const Value::BinaryValue& Value::GetInvalidUTF8() const { return bytestring_value_; } diff --git a/chromium_edits/125.0.6396.3/components/cbor/values.h.patch b/chromium_edits/131.0.6724.1/components/cbor/values.h.patch similarity index 87% rename from chromium_edits/125.0.6396.3/components/cbor/values.h.patch rename to chromium_edits/131.0.6724.1/components/cbor/values.h.patch index ca39df01..5556e8c5 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/values.h.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/values.h.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/values.h b/components/cbor/values.h -index d81ef5607c55a..10216a8dcdc57 100644 +index d55369f1a71bf..7dabb368c51d6 100644 --- a/components/cbor/values.h +++ b/components/cbor/values.h -@@ -127,28 +127,29 @@ class CBOR_EXPORT Value { +@@ -125,28 +125,29 @@ class CBOR_EXPORT Value { explicit Value(Type type); @@ -25,8 +25,8 @@ index d81ef5607c55a..10216a8dcdc57 100644 explicit Value(const char* in_string, Type type = Type::STRING); explicit Value(std::string&& in_string, Type type = Type::STRING) noexcept; -- explicit Value(base::StringPiece in_string, Type type = Type::STRING); -+ explicit Value(base::StringPiece in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); +- explicit Value(std::string_view in_string, Type type = Type::STRING); ++ explicit Value(std::string_view in_string, Type type = Type::STRING, uint64_t tag = NO_TAG); - explicit Value(const ArrayValue& in_array); - explicit Value(ArrayValue&& in_array) noexcept; @@ -42,7 +42,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 Value(const Value&) = delete; Value& operator=(const Value&) = delete; -@@ -179,6 +180,7 @@ class CBOR_EXPORT Value { +@@ -177,6 +178,7 @@ class CBOR_EXPORT Value { bool is_string() const { return type() == Type::STRING; } bool is_array() const { return type() == Type::ARRAY; } bool is_map() const { return type() == Type::MAP; } @@ -50,7 +50,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 // These will all fatally assert if the type doesn't match. SimpleValue GetSimpleValue() const; -@@ -194,12 +196,13 @@ class CBOR_EXPORT Value { +@@ -192,12 +194,13 @@ class CBOR_EXPORT Value { const ArrayValue& GetArray() const; const MapValue& GetMap() const; const BinaryValue& GetInvalidUTF8() const; @@ -65,7 +65,7 @@ index d81ef5607c55a..10216a8dcdc57 100644 Type type_; -@@ -213,6 +216,11 @@ class CBOR_EXPORT Value { +@@ -211,6 +214,11 @@ class CBOR_EXPORT Value { MapValue map_value_; }; diff --git a/chromium_edits/125.0.6396.3/components/cbor/writer.cc.patch b/chromium_edits/131.0.6724.1/components/cbor/writer.cc.patch similarity index 91% rename from chromium_edits/125.0.6396.3/components/cbor/writer.cc.patch rename to chromium_edits/131.0.6724.1/components/cbor/writer.cc.patch index bb89c1e6..150c3fca 100644 --- a/chromium_edits/125.0.6396.3/components/cbor/writer.cc.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/writer.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc -index f400a65e7b66a..fcdebb8f3b458 100644 +index e7e47774abe9a..4c085d5693a38 100644 --- a/components/cbor/writer.cc +++ b/components/cbor/writer.cc @@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node, diff --git a/chromium_edits/125.0.6382.3/components/cbor/writer_unittest.cc.patch b/chromium_edits/131.0.6724.1/components/cbor/writer_unittest.cc.patch similarity index 91% rename from chromium_edits/125.0.6382.3/components/cbor/writer_unittest.cc.patch rename to chromium_edits/131.0.6724.1/components/cbor/writer_unittest.cc.patch index 240fee83..1acf5f7f 100644 --- a/chromium_edits/125.0.6382.3/components/cbor/writer_unittest.cc.patch +++ b/chromium_edits/131.0.6724.1/components/cbor/writer_unittest.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/cbor/writer_unittest.cc b/components/cbor/writer_unittest.cc -index e3bffe20734bc..0ed569ae164a0 100644 +index ee11e7cb86712..b8942f1829a37 100644 --- a/components/cbor/writer_unittest.cc +++ b/components/cbor/writer_unittest.cc -@@ -522,4 +522,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { +@@ -523,4 +523,31 @@ TEST(CBORWriterTest, OverlyNestedCBOR) { EXPECT_FALSE(Writer::Write(Value(map), 4).has_value()); } diff --git a/chromium_edits/125.0.6412.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch b/chromium_edits/131.0.6724.1/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch similarity index 95% rename from chromium_edits/125.0.6412.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch rename to chromium_edits/131.0.6724.1/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch index 291d84f1..ee376ce1 100644 --- a/chromium_edits/125.0.6412.0/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch +++ b/chromium_edits/131.0.6724.1/components/open_from_clipboard/clipboard_recent_content_generic.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc -index 32c4138ec358c..e9c62d51bf59b 100644 +index 3683fadcc0914..440d4be132e5c 100644 --- a/components/open_from_clipboard/clipboard_recent_content_generic.cc +++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc @@ -20,7 +20,7 @@ diff --git a/chromium_edits/125.0.6382.3/net/dns/dns_config_service_linux.cc.patch b/chromium_edits/131.0.6724.1/net/dns/dns_config_service_linux.cc.patch similarity index 88% rename from chromium_edits/125.0.6382.3/net/dns/dns_config_service_linux.cc.patch rename to chromium_edits/131.0.6724.1/net/dns/dns_config_service_linux.cc.patch index 3b042d33..fd7227a5 100644 --- a/chromium_edits/125.0.6382.3/net/dns/dns_config_service_linux.cc.patch +++ b/chromium_edits/131.0.6724.1/net/dns/dns_config_service_linux.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc -index f909f127ba3e1..31d7f9d58c0af 100644 +index 7aaf9fa5b0b78..5a9f5b5a70dd9 100644 --- a/net/dns/dns_config_service_linux.cc +++ b/net/dns/dns_config_service_linux.cc -@@ -271,11 +271,11 @@ bool IsNsswitchConfigCompatible( +@@ -276,11 +276,11 @@ bool IsNsswitchConfigCompatible( // Ignore any entries after `kDns` because Chrome will fallback to the // system resolver if a result was not found in DNS. return true; diff --git a/chromium_edits/125.0.6396.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch b/chromium_edits/131.0.6724.1/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch similarity index 70% rename from chromium_edits/125.0.6396.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch rename to chromium_edits/131.0.6724.1/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch index 7fcbedc1..663fe49e 100644 --- a/chromium_edits/125.0.6396.3/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch +++ b/chromium_edits/131.0.6724.1/third_party/blink/renderer/platform/weborigin/scheme_registry.cc.patch @@ -1,13 +1,15 @@ diff --git a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -index 62163e44e292e..60d00b8140759 100644 +index e1bc209c337c5..6fbac29fcddfd 100644 --- a/third_party/blink/renderer/platform/weborigin/scheme_registry.cc +++ b/third_party/blink/renderer/platform/weborigin/scheme_registry.cc -@@ -66,7 +66,7 @@ class URLSchemesRegistry final { +@@ -68,8 +68,8 @@ class URLSchemesRegistry final { // is considered secure. Additional checks are performed to ensure that // other http pages are filtered out. service_worker_schemes({"http", "https"}), - fetch_api_schemes({"http", "https"}), +- allowed_in_referrer_schemes({"http", "https"}) { + fetch_api_schemes({"http", "https", "ipfs", "ipns"}), - allowed_in_referrer_schemes({"http", "https"}) { ++ allowed_in_referrer_schemes({"http", "https", "ipfs", "ipns"}) { for (auto& scheme : url::GetCorsEnabledSchemes()) cors_enabled_schemes.insert(scheme.c_str()); + for (auto& scheme : url::GetCSPBypassingSchemes()) { diff --git a/chromium_edits/125.0.6368.2/url/BUILD.gn.patch b/chromium_edits/131.0.6724.1/url/BUILD.gn.patch similarity index 95% rename from chromium_edits/125.0.6368.2/url/BUILD.gn.patch rename to chromium_edits/131.0.6724.1/url/BUILD.gn.patch index 201770c4..be4bfca8 100644 --- a/chromium_edits/125.0.6368.2/url/BUILD.gn.patch +++ b/chromium_edits/131.0.6724.1/url/BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/url/BUILD.gn b/url/BUILD.gn -index aedf1bf9f80be..b11c73a88aae5 100644 +index f22b73bc29f06..df36977322ec7 100644 --- a/url/BUILD.gn +++ b/url/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/chromium_edits/131.0.6724.1/url/url_canon.h.patch b/chromium_edits/131.0.6724.1/url/url_canon.h.patch new file mode 100644 index 00000000..ffe72eea --- /dev/null +++ b/chromium_edits/131.0.6724.1/url/url_canon.h.patch @@ -0,0 +1,26 @@ +diff --git a/url/url_canon.h b/url/url_canon.h +index 22def4917fdd0..40dda81954a56 100644 +--- a/url/url_canon.h ++++ b/url/url_canon.h +@@ -821,6 +821,21 @@ bool CanonicalizeMailtoURL(const char16_t* spec, + CanonOutput* output, + Parsed* new_parsed); + ++COMPONENT_EXPORT(URL) ++bool CanonicalizeIpfsURL(std::string_view spec, ++ const Parsed& parsed, ++ SchemeType scheme_type, ++ CharsetConverter* query_converter, ++ CanonOutput* output, ++ Parsed* new_parsed); ++COMPONENT_EXPORT(URL) ++bool CanonicalizeIpfsURL(std::basic_string_view spec, ++ const Parsed& parsed, ++ SchemeType scheme_type, ++ CharsetConverter* query_converter, ++ CanonOutput* output, ++ Parsed* new_parsed); ++ + // Part replacer -------------------------------------------------------------- + + // Internal structure used for storing separate strings for each component. diff --git a/chromium_edits/131.0.6724.1/url/url_canon_ipfs.cc b/chromium_edits/131.0.6724.1/url/url_canon_ipfs.cc new file mode 100644 index 00000000..e40732ee --- /dev/null +++ b/chromium_edits/131.0.6724.1/url/url_canon_ipfs.cc @@ -0,0 +1,54 @@ +#include "url_canon_internal.h" + +#include +#include + +#include + +bool url::CanonicalizeIpfsURL(std::string_view spec, + const Parsed& parsed, + SchemeType scheme_type, + CharsetConverter* charset_converter, + CanonOutput* output, + Parsed* output_parsed) { + if (spec.size() < 1) { + return false; + } + if ( parsed.host.len < 1 ) { + return false; + } + auto cid_str = spec.substr( parsed.host.begin, static_cast(parsed.host.len) ); + auto cid = ipfs::Cid(cid_str); + if ( !cid.valid() ) { + cid = ipfs::id_cid::forText( std::string{cid_str} + " is not a valid CID." ); + } + auto as_str = cid.to_string(); + if ( as_str.empty() ) { + return false; + } + std::string stdurl{ spec.substr(0UL, static_cast(parsed.host.begin)) }; + stdurl.append( as_str ); + spec.remove_prefix(parsed.host.end()); + stdurl.append(spec); + auto len = static_cast(stdurl.size()); + Parsed parsed_input; + ParseStandardURL(stdurl.data(), len, &parsed_input); + return CanonicalizeStandardURL( + stdurl.data(), + parsed_input, + scheme_type, + charset_converter, + output, output_parsed + ); +} +bool url::CanonicalizeIpfsURL(std::basic_string_view spec, + const Parsed& parsed, + SchemeType scheme_type, + CharsetConverter* query_converter, + CanonOutput* output, + Parsed* new_parsed) { + RawCanonOutput<2048> as8; + ConvertUTF16ToUTF8(spec.data(), spec.size(), &as8); + return CanonicalizeIpfsURL({as8.data(), as8.length()}, parsed, scheme_type, + query_converter, output, new_parsed); +} diff --git a/chromium_edits/131.0.6724.1/url/url_util.cc.patch b/chromium_edits/131.0.6724.1/url/url_util.cc.patch new file mode 100644 index 00000000..988797b0 --- /dev/null +++ b/chromium_edits/131.0.6724.1/url/url_util.cc.patch @@ -0,0 +1,45 @@ +diff --git a/url/url_util.cc b/url/url_util.cc +index ce5225e121f5d..79e33208f728e 100644 +--- a/url/url_util.cc ++++ b/url/url_util.cc +@@ -76,6 +76,8 @@ struct SchemeRegistry { + std::vector referrer_schemes = { + {kHttpsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, + {kHttpScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that do not trigger mixed content warning. +@@ -84,6 +86,8 @@ struct SchemeRegistry { + kWssScheme, + kDataScheme, + kAboutScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that normal pages cannot link to or access (i.e., with the same +@@ -105,6 +109,8 @@ struct SchemeRegistry { + kHttpsScheme, + kHttpScheme, + kDataScheme, ++ {"ipfs", SCHEME_WITH_HOST}, ++ {"ipns", SCHEME_WITH_HOST}, + }; + + // Schemes that can be used by web to store data (local storage, etc). +@@ -308,7 +314,12 @@ bool DoCanonicalize(const CHAR* spec, + success = CanonicalizeFileSystemURL( + spec, ParseFileSystemURL(std::basic_string_view(spec, spec_len)), + charset_converter, output, output_parsed); +- ++ } else if (DoCompareSchemeComponent(spec, scheme, "ipfs")) { ++ auto spec_view = std::basic_string_view(spec, spec_len); ++ // Switch multibase away from case-sensitive ones before continuing canonicalization. ++ auto parsed_input = ParseStandardURL(spec_view); ++ success = CanonicalizeIpfsURL(spec_view, parsed_input, scheme_type, ++ charset_converter, output, output_parsed); + } else if (DoIsStandard(spec, scheme, &scheme_type)) { + // All "normal" URLs. + success = CanonicalizeStandardURL( diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index adf13eb6..00867801 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -297,7 +297,7 @@ function(setup_target_for_coverage_lcov) ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} --rc genhtml_hi_limit=88 - --rc genhtml_med_limit=73.4 + --rc genhtml_med_limit=74 --prefix "${BASEDIR}" -o ${Coverage_NAME} ${Coverage_NAME}.info diff --git a/cmake/chromium.py b/cmake/chromium.py index 54d2f7e1..ee3e2cae 100755 --- a/cmake/chromium.py +++ b/cmake/chromium.py @@ -133,7 +133,7 @@ def runpy(args, silent=False, cwd=None): makedirs(chromium_dir) if not isdir(src): makedirs(src) - open(join(build_dir, 'fresh'), 'a').close() + open(join(build_dir, 'fresh'), 'a', encoding='utf-8').close() if isfile(join(build_dir, 'fresh')): if not isdir(join(src, '.git')): @@ -175,7 +175,7 @@ def files_content_differ(a, b): def touch_update(s): - with open(UPDATED, 'w') as f: + with open(UPDATED, 'w', encoding='utf-8') as f: f.write(s) @@ -239,20 +239,20 @@ def sync_dir(source_relative, target_relative, complete=True): formatted_protos = '\n'.join(map(lambda s: f' "{s}",', protos)) build_in = join(source, 'BUILD.gn.in') if isfile(build_in): - with open(build_in) as bif: + with open(build_in, encoding='utf-8') as bif: bn = bif.read() bn = bn.replace('@gn_sources@', formatted_sources) bn = bn.replace('@gn_protos@', formatted_protos) old_build_gn = join(target, 'BUILD.gn') obn = '' try: - with open(old_build_gn) as obif: + with open(old_build_gn, encoding='utf-8') as obif: obn = obif.read() - except Exception: + except FileNotFoundError: pass if bn != obn: print("Updating BUILD.gn", file=stderr) - open(old_build_gn, 'w').write(bn) + open(old_build_gn, 'w', encoding='utf-8').write(bn) touch_update('BUILD.gn') @@ -279,10 +279,10 @@ def sync_dir(source_relative, target_relative, complete=True): makedirs(out) n = join(out, 'obj', 'components', 'ipfs', 'ipfs.ninja') if not isfile(n) or (isfile(UPDATED) and getmtime(UPDATED) > getmtime(n)): - a = [python, join(depot_tools_dir, 'gn.py'), 'gen', '--args=' + gnargs.replace("'", ""), out] - verbose('Running gn gen', a) - run(a) + gncmd = [python, join(depot_tools_dir, 'gn.py'), 'gen', '--args=' + gnargs.replace("'", ""), out] + verbose('Running gn gen', gncmd) + run(gncmd) -for target in argv[2:]: - print("Build target", target, file=stderr) - run([python, join(depot_tools_dir, 'ninja.py'), '-C', out, '-j', jobs, target]) +for build_target in argv[2:]: + print("Build target", build_target, file=stderr) + run([python, join(depot_tools_dir, 'ninja.py'), '-C', out, '-j', jobs, build_target]) diff --git a/cmake/clean_rmed.py b/cmake/clean_rmed.py index dc34e64d..36d775dd 100755 --- a/cmake/clean_rmed.py +++ b/cmake/clean_rmed.py @@ -5,7 +5,7 @@ from os import remove from os.path import splitext -known_obj = [c['output'] for c in load(open('compile_commands.json'))] +known_obj = [c['output'] for c in load(open('compile_commands.json', encoding='utf-8'))] for o in glob('*/CMakeFiles/**/*.o', recursive=True): if not o in known_obj: base = splitext(o)[0] diff --git a/cmake/inc_link.py b/cmake/inc_link.py index cccb74e4..6bb31369 100755 --- a/cmake/inc_link.py +++ b/cmake/inc_link.py @@ -51,6 +51,8 @@ def angled(inc): class Command: def __init__(self,c,d): + self.retry = False + self.dead = False self.command = c self.command[self.command.index('-c')] = '-E' i = self.command.index('-o') diff --git a/cmake/patch.py b/cmake/patch.py index cece82a8..dc71efbc 100755 --- a/cmake/patch.py +++ b/cmake/patch.py @@ -28,7 +28,7 @@ verbose('Installed requests because of', ex) -VERSION_CLOSE_ENOUGH = 30110 +VERSION_CLOSE_ENOUGH = 30112 LARGE_INT = 9876543210 here = dirname(__file__) diff --git a/cmake/setup.cmake b/cmake/setup.cmake index 2731abc6..d58c43f4 100644 --- a/cmake/setup.cmake +++ b/cmake/setup.cmake @@ -4,7 +4,12 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}") include(${CMAKE_CXX_COMPILER_ID}) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) find_package(Git QUIET) -find_program(CLANG_TIDY_EXE NAMES "clang-tidy") +if(USE_CLANG_TIDY) + find_program(CLANG_TIDY_EXE NAMES "clang-tidy") + if(NOT CLANG_TIDY_EXE) + message(WARNING "clang-tidy not found") + endif() +endif() include("${CMAKE_CURRENT_LIST_DIR}/python.cmake") if(INSIDE_CONAN) message(STATUS "CMake invoked by Conan - assuming the outer Conan did all the dependency work.") diff --git a/component/block_http_request.cc b/component/block_http_request.cc index ff52b432..a4685e90 100644 --- a/component/block_http_request.cc +++ b/component/block_http_request.cc @@ -66,8 +66,6 @@ void Self::OnResponse(std::shared_ptr, status = 408; break; default: - // VLOG(2) << "NetErr " << loader_->NetError() << " for " << - // inf_.url; status = 500; } // auto sz = body ? body->size() : 0UL; diff --git a/component/chromium_dns_txt_lookup.h b/component/chromium_dns_txt_lookup.h index b7719c83..237647f9 100644 --- a/component/chromium_dns_txt_lookup.h +++ b/component/chromium_dns_txt_lookup.h @@ -7,6 +7,12 @@ namespace ipfs { class InterRequestState; +/*! Lookup TXT records from a DNS service using Chromium facilities + * @note This is currently fragile, as only DNSClient is capable of these requests + * yet DNSClient may not always be available, depending on Chromium's parsing of + * system config files. + * @todo Fix the note. + */ class ChromiumDnsTxtLookup : public ctx::DnsTxtLookup { raw_ptr state_; std::map>> dns_reqs_; diff --git a/doc/0.0.1.2_blog.md b/doc/0.0.1.2_blog.md new file mode 100644 index 00000000..c14100dc --- /dev/null +++ b/doc/0.0.1.2_blog.md @@ -0,0 +1,65 @@ +# IPFS-Chromium Version 0.0.1.2 Released + +Recently we cut a new release of [IPFS-Chromium](https://github.com/little-bear-labs/ipfs-chromium/), +so this is a good milestone to update on what's been going on since the [last time](https://blog.ipfs.tech/2023-05-multigateway-chromium-client/) +we discussed this project. + +## WICG Discussion + +The very beginning of a discussion about standarizing IPFS functionality in browsers, +of which this would be one implementation, is started over [here](https://github.com/WICG/proposals/issues/143). + +Naturally the suggestion isn't to adopt everything we've done here exactly as-is, +but to look for a reasonable subset of functionality that would give a good level of interoperability. +Feel free to read the [explainer](https://little-bear-labs.github.io/ipfs-chromium/md_doc_explainer.html) +on what we arrived at, and join in the discussion. + +## IPFS-Electron + +While it may be [unlikely](https://github.com/electron/electron/issues/41539) to get IPFS +support in vanilla Electron by default, there are a number of use cases for slightly modified +[spins](TODO - link to blog post) on Electron, and if we get those +[extension points](https://github.com/electron/electron/issues/42455) IPFS-enabled Electron could +be one. + +And with that in mind, this repo now builds an IPFS-enabled electron as well, if you're using +[this](https://github.com/little-bear-labs/ipfs-electron) fork of Electron rather than the +upstream where the extension points are not-yet-adopted. You can find some build artifacts in the +release if you'd like to give it a try without building it yourself. + +## Enhancements + +As mentioned previously, this is an experimental proof-of-concept. +There are features from some corners of the IPFS ecosystem not everyone needs, +naturally they did not get prioritized at first. +Now, we've implemented some of that, making things more complete. +Also, we've added conveniences that make adoption easier, +and some considerations for the end user. + +* Handling [inline CIDs](https://github.com/ipfs/specs/blob/6c70fc240fb14f3022177af55f1dcbe1ab8f35c6/UNIXFS.md#deduplication-and-inlining) locally. +* Using [delegated routing](https://specs.ipfs.tech/routing/http-routing-v1/#get-routing-v1-providers-cid) gateway API to discover additional gateways +* Support for the environment variable [IPFS_GATEWAY](https://curl.se/docs/ipfs.html), though this project supports a superset: it's a whitespace-delimited list of gateways instead of just 1. +* [DAG-JSON](https://ipld.io/docs/codecs/known/dag-json/) +* [DAG-CBOR](https://ipld.io/docs/codecs/known/dag-cbor/) +* Partial ([dag-scope=entity](https://specs.ipfs.tech/http-gateways/trustless-gateway/#dag-scope-request-query-parameter)) CAR requests, for fetching multiple blocks in one round trip. +* Support for [base-16](https://github.com/multiformats/multibase?tab=readme-ov-file#multibase-table) URLs and a fix for dealing with unsupported bases (no longer crashes the process). +* Handling of content root [_redirects](https://specs.ipfs.tech/http-gateways/web-redirects-file/) +* Handling [UnixFS symbolic links](https://github.com/ipfs/specs/blob/9131a7cfb56bf2ef4fb916feec53836c75ba1a05/src/unixfs-data-format.md#symlink-type) +* Some response headers for use in devtools, including some Server-Timing +* Chromium build flag, so a codebase containing these changes can still be built without IPFS support, to ease adoption. +* A feature flag, so Chromium built with this (and the build flag on) can still have IPFS turned off with about://flags if the user wishes. +* Cache entries for IPNS records expire based on the date contained in the record +* Proper URL canonicalization for IPFS URLs (switching multibase) so that it surives lowercasing. +* Gateway rate (soft) limits persisted to user preferences +* Some user preferences where performance trades off against privacy concerns. +* Preview page for a sharded directory that contains no index.html. It's ugly, but usable. +* Option to fallback to gateway for DNSLink-like roots. Helps when there's a DNS problem or if you need a resolver your system doesn't use but the gateway does, like ENS. + +## Dev & maintenance updates + +* CI for library artifacts in releases (see ipfs-client* [here](https://github.com/little-bear-labs/ipfs-chromium/releases/latest)) +* Patches for new versions of Chromium. +* Various refactors in the ipfs-client library. +* [Doxygen documentation](https://little-bear-labs.github.io/ipfs-chromium/) +* Explicit licensing for ipfs-client (it's dual MIT/Apache) +* A bug fix in default URL escaping of ipfs::Client (not in Chromium) diff --git a/docker/all.sh b/docker/all.sh deleted file mode 100755 index 592018e7..00000000 --- a/docker/all.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -ex -cd "$(dirname "${0}")/.." - -branch=`git rev-parse --abbrev-ref HEAD` -./docker/library-builds.sh -for profile in Debug Release -do - for variant in boost python - do - echo -e "\n ### BUILDING CHROMIUM ### $(tag) ### ${variant}/${profile} ###" - sleep 3 - docker run --network=host --add-host=host.docker.internal:host-gateway `tag` --mount type=bind,source=.docker-debian-cache,target=/cache /ipfs-chromium/docker/chromium-build.sh - done -done -./docker/library-builds.sh -for d in ./docker/dist-*.sh -do - "${d}" -done diff --git a/docker/chromium-build.sh b/docker/chromium-build.sh deleted file mode 100755 index 0a0fefbe..00000000 --- a/docker/chromium-build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -ex - -source source /ipfs-chromium/docker/shared.env - -# ... you will need to make sure that the following tools are available: -for tool in curl git lsb_release sudo -do - echo ${tool} ; ${tool} --version -done -RUN mkdir -p /chromium/src/out/${PROFILE} -RUN cd /chromium/src && gn gen /chromium/src/out/${PROFILE} -mkdir -p /ipfs-chromium-${PROFILE} -cmake -G Ninja -D CMAKE_BUILD_TYPE=${PROFILE} -D CHROMIUM_SOURCE_TREE=/chromium/src -D CHROMIUM_PROFILE=${PROFILE} -S /ipfs-chromium -B /ipfs-chromium-${PROFILE} -ninja -C ipfs-chromium-${PROFILE} -j 1 setup_component -RUN cd /chromium/src && gn gen /chromium/src/out/${PROFILE} -RUN autoninja -j 1 -C /chromium/src/out/${PROFILE} chrome - diff --git a/docker/cmake-build.sh b/docker/cmake-build.sh deleted file mode 100755 index 940c4c56..00000000 --- a/docker/cmake-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -ex -source /ipfs-chromium/docker/shared.env -mkdir -p /ipfs-chromium-${PROFILE} -git -C /ipfs-chromium pull -cmake -G Ninja -D CMAKE_BUILD_TYPE=${PROFILE} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -D CXX_VERSION=${CXX_STD-17} -S /ipfs-chromium -B /ipfs-chromium-${PROFILE} -ninja -C ipfs-chromium-${PROFILE} -j 1 -ninja -C ipfs-chromium-${PROFILE} -j 1 test diff --git a/docker/debian-base b/docker/debian-base deleted file mode 100644 index 6cd198d9..00000000 --- a/docker/debian-base +++ /dev/null @@ -1,27 +0,0 @@ -ARG DEBIAN_TAG=stable -FROM debian:${DEBIAN_TAG} - -RUN apt-get update -RUN apt-get install --yes apt-utils -RUN apt-get install --yes ccache curl g++ git iproute2 iputils-ping lsb-base lsb-release ninja-build procps python3 sudo wget - -# Debian stable version of cmake is weirdly old. I could try to support it, but some of my dependencies don't. -# Alternatively, one could get cmake from conan. But then we wouldn't be adequately testing the cmake code that installs conan. -RUN wget 'https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.tar.gz' -RUN tar --extract --file cmake*.tar.gz -RUN ln -s /cmake-3.25.2-linux-x86_64/ /cmake - -#RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools -#ENV PATH=/usr/bin:/bin:/depot_tools -#RUN mkdir /chromium -#RUN cd /chromium && fetch --nohooks chromium - -RUN echo 'test -f /ipfs-chromium/docker/shared.env && source /ipfs-chromium/docker/shared.env' >> /root/.bash_profile -RUN echo 'test -f /ipfs-chromium/docker/shared.env && source /ipfs-chromium/docker/shared.env' >> /root/.bashrc - -RUN ip addr -RUN ping -c 1 -w 1 host.docker.internal -RUN ln -s /cache/ccache /root/.ccache - -ARG GIT_REF=main -RUN git clone --branch "${GIT_REF}" https://github.com/little-bear-labs/ipfs-chromium.git /ipfs-chromium diff --git a/docker/debian-boost b/docker/debian-boost deleted file mode 100644 index fb05183e..00000000 --- a/docker/debian-boost +++ /dev/null @@ -1,8 +0,0 @@ -FROM ipfs-chromium-debian-base - -RUN apt-get install --yes protobuf-compiler libboost-dev libprotobuf-dev libssl-dev libgtest-dev libgmock-dev - -ARG PROFILE=Debug -git -C /ipfs-chromium pull -RUN echo "export PROFILE=${PROFILE}" >> /ipfs-chromium/docker/shared.env - diff --git a/docker/debian-cxx23 b/docker/debian-cxx23 deleted file mode 100644 index 9b88a648..00000000 --- a/docker/debian-cxx23 +++ /dev/null @@ -1,8 +0,0 @@ -FROM ipfs-chromium-debian-base-bookworm - -RUN apt-get install --yes protobuf-compiler libprotobuf-dev libssl-dev libgtest-dev libgmock-dev - -ARG PROFILE=Debug -git -C /ipfs-chromium pull -RUN echo "export PROFILE=${PROFILE}" >> /ipfs-chromium/docker/shared.env -RUN echo "export CXX_STD=23" >> /ipfs-chromium/docker/shared.env diff --git a/docker/debian-python b/docker/debian-python deleted file mode 100644 index 2ec5ae80..00000000 --- a/docker/debian-python +++ /dev/null @@ -1,10 +0,0 @@ -FROM ipfs-chromium-debian-base -RUN apt-get install --yes python3 python3-pip - -ARG PROFILE=Debug -ENV PROFILE=${PROFILE} -RUN ln -s /cache/conan /root/.conan2 -git -C /ipfs-chromium pull -RUN echo "export PROFILE=${PROFILE}" >> /ipfs-chromium/docker/shared.env -RUN echo 'export CONAN_REQUEST_TIMEOUT=120' >> /ipfs-chromium/docker/shared.env - diff --git a/docker/dist-ubuntu.sh b/docker/dist-ubuntu.sh deleted file mode 100755 index 85704ee3..00000000 --- a/docker/dist-ubuntu.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ex -cd `dirname "${0}"` -./dist.sh ubuntu diff --git a/docker/dist.sh b/docker/dist.sh deleted file mode 100755 index 480ad6bc..00000000 --- a/docker/dist.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -ex -cd `dirname "${0}"`/.. - -branch=`git rev-parse --abbrev-ref HEAD` -docker build --file docker/${1}.chrome_browser --network=host --add-host=host.docker.internal:host-gateway --build-arg "GIT_REF=${branch}" --tag ${1}-chrome-browser . diff --git a/docker/library-builds.sh b/docker/library-builds.sh deleted file mode 100755 index 7727f0bc..00000000 --- a/docker/library-builds.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -ex -uname | grep Linux # Portability is untested. Would not surprise me if other Unix-like doesn't have fuser and needs a different way to count CPUs - -cd `dirname "${0}"`/.. -branch=`git rev-parse --abbrev-ref HEAD` -docker build --file docker/debian-base --network=host --add-host=host.docker.internal:host-gateway --build-arg "GIT_REF=${branch}" --tag ipfs-chromium-debian-base . -docker build --file docker/debian-base --network=host --add-host=host.docker.internal:host-gateway --build-arg "DEBIAN_TAG=bookworm" --build-arg "GIT_REF=${branch}" --tag ipfs-chromium-debian-base-bookworm . -tag() { - tr '[:upper:]' '[:lower:]' <<< "debian-${variant}-${profile}" -} -for variant in python boost cxx23 -do - for profile in Debug Release - do - echo -e "\n ### BUILDING IMAGE ### $(tag) ### ${variant}/${profile} ###" - sleep 3 - docker build --file docker/debian-${variant} --network=host --add-host=host.docker.internal:host-gateway --build-arg "PROFILE=${profile}" --tag `tag` . - done -done -if ccache --version -then - export cache_dir=`ccache --get-config cache_dir`/../ipfs-chromium-cache/docker -else - export cache_dir="${HOME}/ipfs-chromium-cache/docker" -fi -mkdir -p "${cache_dir}"/{ccache,conan} -for profile in Debug Release -do - for variant in boost python cxx23 - do - echo -e "\n ### BUILDING LIBRARY ### $(tag) ### ${variant}/${profile} ###" - sleep 3 - docker run --volume "${cache_dir}:/cache:Z" --network=host --add-host=host.docker.internal:host-gateway `tag` /ipfs-chromium/docker/cmake-build.sh - done -done diff --git a/docker/shared.env b/docker/shared.env deleted file mode 100644 index c17bc4d2..00000000 --- a/docker/shared.env +++ /dev/null @@ -1,8 +0,0 @@ - -alias ll='/bin/ls -lrth --color=auto ' - -export PATH="/usr/lib/icecc/bin:/usr/libexec/icecc/bin:/usr/local/bin:/usr/bin:/bin:/cmake/bin:${PATH-/bin}:/depot_tools" -export CC=gcc -export CXX=g++ - -chmod -R 777 /cache/ || echo chmod fail diff --git a/docker/ubuntu.chrome_browser b/docker/ubuntu.chrome_browser deleted file mode 100644 index c7615728..00000000 --- a/docker/ubuntu.chrome_browser +++ /dev/null @@ -1,86 +0,0 @@ -FROM ubuntu:latest - -ARG DEBIAN_FRONTEND=noninteractive -RUN export DEBIAN_FRONTEND=noninteractive -RUN apt-get update -RUN apt-get install --yes apt-utils cmake file snapd software-properties-common wget - -# https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md#docker-requirements -RUN apt-get install --yes curl git lsb-release python3-pip sudo - -#From install-build-deps.sh -RUN apt-get install --yes adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-core autoconf automake autopoint autotools-dev binutils binutils-aarch64-linux-gnu \ - binutils-arm-linux-gnueabihf binutils-common binutils-mips64el-linux-gnuabi64 binutils-mipsel-linux-gnu binutils-x86-64-linux-gnu bison bsdextrautils build-essential \ - bzip2 bzip2-doc cdbs comerr-dev cpp cpp-11 curl dbus-x11 dconf-gsettings-backend dconf-service dctrl-tools debhelper debugedit devscripts dh-autoreconf \ - dh-strip-nondeterminism dh-translations diffstat dpkg-dev dput dwz elfutils fakeroot flex fontconfig fontconfig-config fonts-dejavu-core fonts-lato g++ g++-11 gcc \ - gcc-11 gcc-11-base gettext gettext-base gir1.2-atk-1.0 gir1.2-atspi-2.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0 gir1.2-gudev-1.0 gir1.2-harfbuzz-0.0 \ - gir1.2-pango-1.0 git git-man gperf groff-base gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme i965-va-driver icu-devtools intel-media-va-driver \ - intltool intltool-debian iso-codes javascript-common jq krb5-multidev less lib32gcc-s1 lib32stdc++6 lib32z1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl \ - libaliased-perl libapr1 libaprutil1 libapt-pkg-perl libarchive-cpio-perl libarchive-zip-perl libarchive13 libarray-intspan-perl libasan6 libasm1 libasound2 libasound2-data \ - libasound2-dev libasyncns0 libatk-bridge2.0-0 libatk-bridge2.0-dev libatk1.0-0 libatk1.0-data libatk1.0-dev libatomic1 libatspi2.0-0 libatspi2.0-dev libauthen-sasl-perl \ - libavahi-client3 libavahi-common-data libavahi-common3 libb-hooks-endofscope-perl libb-hooks-op-check-perl libbinutils libblkid-dev libbluetooth-dev libbluetooth3 libbrlapi-dev \ - libbrlapi0.8 libbrotli-dev libbrotli1 libbz2-dev libc-dev-bin libc-devtools libc6-dev libc6-i386 libcairo-gobject2 libcairo-script-interpreter2 libcairo2 libcairo2-dev libcap-dev \ - libcapture-tiny-perl libcc1-0 libcgi-fast-perl libcgi-pm-perl libcgi-session-perl libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl \ - libcolord2 libcommon-sense-perl libconfig-tiny-perl libconst-fast-perl libcontextual-return-perl libcpanel-json-xs-perl libcrypt-dev libctf-nobfd0 libctf0 libcups2 libcups2-dev \ - libcupsfilters-dev libcupsfilters1 libcupsimage2 libcupsimage2-dev libcurl3-gnutls libcurl4 libcurl4-gnutls-dev libdata-dpath-perl libdata-dump-perl libdata-messagepack-perl \ - libdata-optlist-perl libdata-validate-domain-perl libdata-validate-ip-perl libdata-validate-uri-perl libdatrie-dev libdatrie1 libdbd-pg-perl libdbi-perl libdbus-1-dev libdconf1 \ - libdebhelper-perl libdeflate-dev libdeflate0 libdevel-callchecker-perl libdevel-size-perl libdevel-stacktrace-perl libdistro-info-perl libdpkg-perl libdrm-amdgpu1 libdrm-common \ - libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdw1 libdynaloader-functions-perl libegl-dev libegl-mesa0 libegl1 libegl1-mesa-dev libelf-dev libelf1 \ - libemail-address-xs-perl libencode-locale-perl libepoxy-dev libepoxy0 liberror-perl libevdev-dev libevdev2 libexception-class-perl libexpat1-dev libexporter-tiny-perl libfakeroot \ - libfcgi-bin libfcgi-perl libfcgi0ldbl libffi-dev libfile-basedir-perl libfile-chdir-perl libfile-dirlist-perl libfile-fcntllock-perl libfile-find-rule-perl libfile-homedir-perl \ - libfile-listing-perl libfile-stripnondeterminism-perl libfile-touch-perl libfile-which-perl libfl-dev libfl2 libflac8 libfont-afm-perl libfont-ttf-perl libfontconfig-dev libfontconfig1 \ - libfontconfig1-dev libfontenc1 libfreetype-dev libfreetype6 libfreetype6-dev libfreezethaw-perl libfribidi-dev libfribidi0 libfsverity0 libgbm-dev libgbm1 libgcc-11-dev libgd3 \ - libgdbm-compat4 libgdbm6 libgdk-pixbuf-2.0-0 libgdk-pixbuf-2.0-dev libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgit-wrapper-perl libgitlab-api-v4-perl libgl-dev libgl1 \ - libgl1-amber-dri libgl1-mesa-dri libglapi-mesa libgles-dev libgles1 libgles2 libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin libglu1-mesa libglu1-mesa-dev libglvnd-core-dev \ - libglvnd-dev libglvnd0 libglx-dev libglx-mesa0 libglx0 libgomp1 libgpgme11 libgraphite2-3 libgraphite2-dev libgssrpc4 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk-3-dev \ - libgudev-1.0-0 libgudev-1.0-dev libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b libhash-fieldhash-perl libhtml-form-perl libhtml-format-perl \ - libhtml-html5-entities-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl \ - libhttp-negotiate-perl libhttp-tiny-multipart-perl libice-dev libice6 libicu-dev libid3tag0 libigdgmm12 libimlib2 libimport-into-perl libinput-bin libinput-dev libinput10 \ - libio-html-perl libio-interactive-perl libio-prompt-tiny-perl libio-prompter-perl libio-pty-perl libio-socket-ssl-perl libio-string-perl libipc-run-perl libipc-run3-perl \ - libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl libitm1 libjbig-dev libjbig0 libjpeg-dev libjpeg-turbo8 libjpeg-turbo8-dev libjpeg8 libjpeg8-dev libjq1 \ - libjs-jquery libjson-maybexs-perl libjson-perl libjson-xs-perl libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10 libkrb5-dev liblcms2-2 liblist-compare-perl liblist-moreutils-perl \ - liblist-moreutils-xs-perl liblist-someutils-perl liblist-someutils-xs-perl liblist-utilsby-perl libllvm15 liblocale-gettext-perl liblog-any-adapter-screen-perl liblog-any-perl \ - liblsan0 libltdl-dev libltdl7 liblua5.3-0 liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma-dev libmail-sendmail-perl libmailtools-perl libmarkdown2 libmath-base85-perl \ - libmodule-implementation-perl libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmoox-struct-perl libmount-dev libmouse-perl libmpc3 libmpfr6 libmtdev-dev libmtdev1 \ - libnamespace-autoclean-perl libnamespace-clean-perl libnet-domain-tld-perl libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl libnet-smtp-ssl-perl libnet-ssleay-perl \ - libnetaddr-ip-perl libnghttp2-14 libnsl-dev libnspr4 libnspr4-dev libnss3 libnss3-dev libnumber-compare-perl libobject-id-perl libobrender32v5 libobt2v5 libogg0 libonig5 libopengl-dev \ - libopengl0 libopus0 libpackage-stash-perl libpackage-stash-xs-perl libpam0g-dev libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 \ - libparams-classify-perl libparams-util-perl libpath-iterator-rule-perl libpath-tiny-perl libpci-dev libpci3 libpciaccess-dev libpciaccess0 libpcre16-3 libpcre2-16-0 libpcre2-32-0 \ - libpcre2-dev libpcre2-posix3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.34 libperlio-gzip-perl libperlio-utf8-strict-perl libpipeline1 libpixman-1-0 libpixman-1-dev libpng-dev \ - libpng-tools libpng16-16 libpod-constants-perl libpod-parser-perl libpopt0 libpq5 libproc-processtable-perl libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 libpulse0 \ - libquadmath0 libre-engine-re2-perl libre2-9 libreadonly-perl libref-util-perl libref-util-xs-perl libregexp-pattern-license-perl libregexp-pattern-perl librole-tiny-perl librpm9 \ - librpmbuild9 librpmio9 librpmsign9 librsvg2-2 librsvg2-common librtmp1 libruby3.0 libsctp-dev libsctp1 libselinux1-dev libsensors-config libsensors5 libsepol-dev \ - libsereal-decoder-perl libsereal-encoder-perl libserf-1-1 libset-intspan-perl libset-scalar-perl libsigsegv2 libsm-dev libsm6 libsndfile1 libsocket6-perl libsort-versions-perl \ - libspeechd-dev libspeechd2 libsqlite3-dev libssh-4 libssl-dev libstartup-notification0 libstdc++-11-dev libstrictures-perl libstring-copyright-perl libstring-escape-perl \ - libstring-shellquote-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-override-perl libsub-quote-perl \ - libsvn1 libsyntax-keyword-try-perl libsys-hostname-long-perl libsystemd-dev libterm-readkey-perl libtext-glob-perl libtext-levenshteinxs-perl libtext-markdown-discount-perl \ - libtext-xslate-perl libthai-data libthai-dev libthai0 libtiff-dev libtiff5 libtiffxx5 libtime-duration-perl libtime-moment-perl libtimedate-perl libtirpc-dev libtool libtry-tiny-perl \ - libtsan0 libtype-tiny-perl libtype-tiny-xs-perl libtypes-serialiser-perl libubsan1 libuchardet0 libudev-dev libunicode-utf8-perl libunwind8 liburi-perl libutf8proc2 libva-dev \ - libva-drm2 libva-glx2 libva-wayland2 libva-x11-2 libva2 libvariable-magic-perl libvorbis0a libvorbisenc2 libvulkan-dev libvulkan1 libwacom-bin libwacom-common libwacom-dev libwacom9 \ - libwant-perl libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-egl1-mesa libwayland-server0 libwebp7 libwww-perl libwww-robotrules-perl \ - libx11-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shm0 \ - libxcb-shm0-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb1-dev libxcomposite-dev libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev \ - libxfixes-dev libxfixes3 libxfont2 libxft-dev libxft2 libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon0 libxkbfile1 libxml-libxml-perl \ - libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml2-dev libxmu6 libxpm4 libxrandr-dev libxrandr2 libxrender-dev \ - libxrender1 libxs-parse-keyword-perl libxshmfence-dev libxshmfence1 libxslt1-dev libxslt1.1 libxss-dev libxss1 libxt-dev libxt6 libxtst-dev libxtst6 libxv1 libxxf86dga1 libxxf86vm1 \ - libyaml-0-2 libyaml-libyaml-perl licensecheck lighttpd lighttpd-mod-deflate lighttpd-mod-openssl lintian linux-libc-dev locales lto-disabled-list lzip lzop m4 make man-db manpages \ - manpages-dev mesa-common-dev mesa-va-drivers mesa-vulkan-drivers netbase obconf openbox p7zip pango1.0-tools patch patchutils pci.ids perl perl-modules-5.34 perl-openssl-defaults \ - pkg-config po-debconf python-apt-common python3-apt python3-certifi python3-chardet python3-debian python3-distutils python3-gpg python3-idna python3-lib2to3 python3-magic \ - python3-pkg-resources python3-requests python3-scour python3-six python3-unidiff python3-urllib3 python3-xdg rake rpcsvc-proto rpm rpm-common rpm2cpio ruby ruby-net-telnet \ - ruby-rubygems ruby-webrick ruby-xmlrpc ruby3.0 rubygems-integration scour scrot session-migration spawn-fcgi strace subversion t1utils ubuntu-mono ucf unzip uuid-dev \ - va-driver-all wayland-protocols wdiff x11-common x11-utils x11-xkb-utils x11proto-dev xcompmgr xfonts-base xfonts-encodings xfonts-utils xkb-data xorg-sgml-doctools xserver-common \ - xtrans-dev xvfb xz-utils zip zlib1g-dev zstd - -# For dpkg stuff -RUN apt-get install --yes build-essential binutils lintian debhelper dh-make devscripts - -ARG GIT_REF=main -RUN git clone --branch "${GIT_REF}" https://github.com/little-bear-labs/ipfs-chromium.git /source -RUN git -C /source pull -RUN pip install httplib2 -RUN cmake -D CMAKE_BUILD_TYPE=Release -D DOWNLOAD_CHROMIUM=TRUE -S /source/ -B /build/ - -RUN cmake --build /build/ --target package - - -CMD ["/build/chromium/src/out/Release/chrome", "--no-sandbox", "ipns://ipfs.tech"] diff --git a/library/.clang-tidy b/library/.clang-tidy index 014a07ab..40eb32c2 100644 --- a/library/.clang-tidy +++ b/library/.clang-tidy @@ -1,7 +1,6 @@ Checks: '-*, - bugprone-argument-comment, - bugprone-assert-side-effect, - bugprone-bool-pointer-implicit-conversion, + bugprone-a*, + bugprone-b*, bugprone-dangling-handle, bugprone-forward-declaration-namespace, bugprone-inaccurate-erase, diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 2feba8cc..d099ddae 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -76,11 +76,12 @@ add_library(ipfs_client ${sources} ${headers} #Mostly for IDEs' sake - this used to be considered bad practice but... generator expressions and such ) -if(CLANG_TIDY_EXE) +if(USE_CLANG_TIDY AND CLANG_TIDY_EXE) set_target_properties(ipfs_client PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};--config-file=${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy;--fix" ) + message(WARNING "Will run: ${CLANG_TIDY_EXE};--config-file=${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy;--fix") endif() add_library(ipfs_client_covered EXCLUDE_FROM_ALL diff --git a/library/include/ipfs_client/ctx/json_parser.h b/library/include/ipfs_client/ctx/json_parser.h index 3e5d0497..ec3a0e3c 100644 --- a/library/include/ipfs_client/ctx/json_parser.h +++ b/library/include/ipfs_client/ctx/json_parser.h @@ -9,6 +9,8 @@ class DagJsonValue; } namespace ipfs::ctx { +/*! Base class for implementations of JSON parsing + */ class JsonParser { public: virtual ~JsonParser() noexcept {} diff --git a/library/include/ipfs_client/ctx/null_dns_txt_lookup.h b/library/include/ipfs_client/ctx/null_dns_txt_lookup.h index e8973b27..a019d8f1 100644 --- a/library/include/ipfs_client/ctx/null_dns_txt_lookup.h +++ b/library/include/ipfs_client/ctx/null_dns_txt_lookup.h @@ -4,6 +4,8 @@ #include "dns_txt_lookup.h" namespace ipfs::ctx { +/*! "Null Object" non-implementation of DNS TXT requests + */ class NullDnsTxtLookup : public DnsTxtLookup { void SendDnsTextRequest(std::string, DnsTextResultsCallback, diff --git a/library/include/ipfs_client/ctx/null_http_provider.h b/library/include/ipfs_client/ctx/null_http_provider.h index 361e0bb0..697c146c 100644 --- a/library/include/ipfs_client/ctx/null_http_provider.h +++ b/library/include/ipfs_client/ctx/null_http_provider.h @@ -4,6 +4,8 @@ #include "http_api.h" namespace ipfs::ctx { +/*! "Null Object" non-implementation of HTTP requests. + */ class NullHttpProvider : public HttpApi { Canceller SendHttpRequest(ReqDesc, OnComplete cb) const; }; diff --git a/library/include/ipfs_client/gw/dnslink_requestor.h b/library/include/ipfs_client/gw/dnslink_requestor.h index 3688d329..8f0f0c44 100644 --- a/library/include/ipfs_client/gw/dnslink_requestor.h +++ b/library/include/ipfs_client/gw/dnslink_requestor.h @@ -8,6 +8,8 @@ class Client; } namespace ipfs::gw { +/*! Link in chain-of-command for request for a DNSLink name + */ class DnsLinkRequestor final : public Requestor { public: explicit DnsLinkRequestor(std::shared_ptr); diff --git a/library/include/ipfs_client/gw/gateway_request.h b/library/include/ipfs_client/gw/gateway_request.h index d4743df1..dd9e85e6 100644 --- a/library/include/ipfs_client/gw/gateway_request.h +++ b/library/include/ipfs_client/gw/gateway_request.h @@ -30,8 +30,10 @@ std::string_view name(GatewayRequestType); constexpr std::size_t BLOCK_RESPONSE_BUFFER_SIZE = 2 * 1024 * 1024; -// TODO this class has gotten large enough that it should probably be a base class - // with subclasses instead of switch statements on type +/*! Information about a request that needs to be sent to an IPFS HTTP Gateway + * @todo this class has gotten large enough that it should probably be a base + * class with subclasses instead of switch statements on type + */ class GatewayRequest : public std::enable_shared_from_this { public: using BytesReceivedHook = diff --git a/library/include/ipfs_client/ipld/block_source.h b/library/include/ipfs_client/ipld/block_source.h index 73130cd6..f7944593 100644 --- a/library/include/ipfs_client/ipld/block_source.h +++ b/library/include/ipfs_client/ipld/block_source.h @@ -12,6 +12,8 @@ namespace ipfs::ipld { struct BlockSource { using Clock = std::chrono::system_clock; + /*! Categorization of sources + */ struct Category { std::string gateway_url; gw::GatewayRequestType request_type = gw::GatewayRequestType::Zombie; diff --git a/library/include/ipfs_client/ipld/dag_headers.h b/library/include/ipfs_client/ipld/dag_headers.h index 5b7ac5ce..1a43e242 100644 --- a/library/include/ipfs_client/ipld/dag_headers.h +++ b/library/include/ipfs_client/ipld/dag_headers.h @@ -8,6 +8,8 @@ #include namespace ipfs::ipld { +/*! Response headers coming from the IPLD DAG + */ class DagHeaders { public: void Add(BlockSource const&); diff --git a/library/include/ipfs_client/ipld/dag_node.h b/library/include/ipfs_client/ipld/dag_node.h index eec825a7..8b48d1c3 100644 --- a/library/include/ipfs_client/ipld/dag_node.h +++ b/library/include/ipfs_client/ipld/dag_node.h @@ -35,15 +35,28 @@ class DirShard; class DnsLinkName; class IpnsName; +/*! Response when the partition does not yet have all the blocks + * needed to fulfill the request. + */ struct MoreDataNeeded { - MoreDataNeeded(std::string one) : ipfs_abs_paths_{{one}} {} + /*! Construct if just one piece of data is known to be needed + * @param one The /ipfs/path of the data needed + */ + explicit MoreDataNeeded(std::string one) : ipfs_abs_paths_{{one}} {} + /*! Construct from a range of needed data + * @param many The /ipfs/paths known to be needed + */ template - MoreDataNeeded(Range const& many) + explicit MoreDataNeeded(Range const& many) : ipfs_abs_paths_(many.begin(), many.end()) {} + /*! The paths + */ std::vector ipfs_abs_paths_; - bool insist_on_car = false; }; enum class ProvenAbsent {}; +/*! Response from a redirection or symlink that causes the requested path + * to be equivalent to another. + */ struct PathChange { std::string new_path; }; @@ -81,7 +94,12 @@ class DagNode : public std::enable_shared_from_this { std::string_view block_key); public: - // ResolveResult resolve(SlashDelimited initial_path, BlockLookup); + /*! Query the DAG + * @param params Information about what you're looking for + * @return The data needed + * or how to get it + * or some additional info needed before asking again. + */ ResolveResult Resolve(ResolutionState& params); static NodePtr fromBytes(std::shared_ptr const& api, @@ -92,17 +110,41 @@ class DagNode : public std::enable_shared_from_this { std::string_view bytes); static NodePtr fromBlock(PbDag const&); - virtual ~DagNode() noexcept {} + virtual ~DagNode() noexcept; + /*! Get a root node that is logically this node + * @return this iff this is of type ipfs::ipld::Root + * Otherwise a Root that has this as a child. + */ virtual NodePtr rooted(); + /*! @return *this if it's not a Root, otherwise its child + */ virtual NodePtr deroot(); - // Wish I had access to dynamic_cast + /*! @defgroup downcast Down-casting to specific subclasses + * @brief I wish I had access to dynamic_cast, but Chromium. + * @{ + */ + + /*! @return this if this is a DNSLinkName, otherwise nullptr + */ virtual DnsLinkName const* as_dnslink() const { return nullptr; } + /*! @return this if this is a DirShard, otherwise nullptr + */ virtual DirShard* as_hamt() { return nullptr; } + /*! @return this if this is a IpnsName, otherwise nullptr + */ virtual IpnsName const* as_ipns() const { return nullptr; } + /** @} */ + + /*! @return Whether the node should be considered expired. + * @note immutable data never expires + */ virtual bool expired() const; + /*! @return Whether this is a "better"/more-up-to-date replacement + * @param another The node to compare to. + */ virtual bool PreferOver(DagNode const& another) const; void set_api(std::shared_ptr); diff --git a/library/include/ipfs_client/ipld/link.h b/library/include/ipfs_client/ipld/link.h index a0d290b2..43cb7c32 100644 --- a/library/include/ipfs_client/ipld/link.h +++ b/library/include/ipfs_client/ipld/link.h @@ -11,11 +11,22 @@ using Ptr = std::shared_ptr; class Link { public: + /*! String representation of the CID + */ std::string cid; + /*! The pointed-to node, or nullptr if not yet resolved + */ Ptr node; - Link(std::string); - explicit Link(std::string, std::shared_ptr); + /*! Construct an unresolved IPLD link + * @param The child's CID + */ + explicit Link(std::string cid); + /*! Construct a resolved IPLD link + * @param The child's CID + * @param node The node linked to if we already have it + */ + explicit Link(std::string cid, std::shared_ptr node); }; } // namespace ipfs::ipld diff --git a/library/src/ipfs_client/crypto/openssl_sha2_256.h b/library/src/ipfs_client/crypto/openssl_sha2_256.h index c4e7bb97..e5071fec 100644 --- a/library/src/ipfs_client/crypto/openssl_sha2_256.h +++ b/library/src/ipfs_client/crypto/openssl_sha2_256.h @@ -8,6 +8,8 @@ #include namespace ipfs::crypto { +/*! Implement SHA-256 hashing + */ class OpensslSha2_256 final : public Hasher { public: ~OpensslSha2_256() noexcept override; diff --git a/library/src/ipfs_client/crypto/openssl_signature_verifier.cc b/library/src/ipfs_client/crypto/openssl_signature_verifier.cc index e28f84a0..69ca7104 100644 --- a/library/src/ipfs_client/crypto/openssl_signature_verifier.cc +++ b/library/src/ipfs_client/crypto/openssl_signature_verifier.cc @@ -9,7 +9,7 @@ using Self = ipfs::crypto::OpensslSignatureVerifier; Self::OpensslSignatureVerifier(int key_type) : openssl_key_type_{key_type} {} -Self::~OpensslSignatureVerifier() = default; +Self::~OpensslSignatureVerifier() noexcept = default; bool Self::VerifySignature(ipfs::ByteView signature, ipfs::ByteView data, ipfs::ByteView key_bytes) { diff --git a/library/src/ipfs_client/ctx/ares_dns_txt_lookup.cc b/library/src/ipfs_client/ctx/ares_dns_txt_lookup.cc index eb2f23cf..a8ab5803 100644 --- a/library/src/ipfs_client/ctx/ares_dns_txt_lookup.cc +++ b/library/src/ipfs_client/ctx/ares_dns_txt_lookup.cc @@ -52,7 +52,7 @@ Self::AresDnsTxtLookup(boost::asio::io_context* io) : io_{io} { throw std::runtime_error("Failed to initialize c-ares channel."); } } -Self::~AresDnsTxtLookup() { +Self::~AresDnsTxtLookup() noexcept { pending_dns_.clear(); ares_destroy(ares_channel_); ares_library_cleanup(); diff --git a/library/src/ipfs_client/ctx/boost_beast_http.cc b/library/src/ipfs_client/ctx/boost_beast_http.cc index 25469dbb..0ea692fa 100644 --- a/library/src/ipfs_client/ctx/boost_beast_http.cc +++ b/library/src/ipfs_client/ctx/boost_beast_http.cc @@ -46,7 +46,7 @@ class HttpSession : public std::enable_shared_from_this { << " URL:" << desc_.url << " HOST:" << host_ << " PORT:" << port_ << " TARGET:" << target_; auto status = ec.value() == 1 ? 408 : 500; - cb_(status, "", [](auto) { return std::string{}; }); + cb_(static_cast(status), "", [](auto) { return std::string{}; }); } std::string parse_url() { ipfs::SlashDelimited ss{desc_.url}; @@ -240,7 +240,7 @@ class HttpSession : public std::enable_shared_from_this { auto me = shared_from_this(); auto respond = [me, get_hdr]() { auto& r = *(me->res_); - me->cb_(r.result_int(), r.body(), get_hdr); + me->cb_(static_cast(r.result_int()), r.body(), get_hdr); }; if (content_type.empty() || boost::algorithm::icontains(content_type, desc_.accept)) { diff --git a/library/src/ipfs_client/ctx/default_gateways.cc b/library/src/ipfs_client/ctx/default_gateways.cc index 4c94d2d1..7e77542e 100644 --- a/library/src/ipfs_client/ctx/default_gateways.cc +++ b/library/src/ipfs_client/ctx/default_gateways.cc @@ -29,23 +29,23 @@ bool ctx::LoadGatewaysFromEnvironmentVariable(ipfs::ctx::GatewayConfig& cfg) { void ctx::LoadStaticGatewayList(ipfs::ctx::GatewayConfig& cfg) { auto static_list = { - std::pair{"http://127.0.0.1:8080/", 1023}, - {"https://ipfs.io/", 989}, - {"https://dweb.link/", 962}, - {"https://hardbin.com/", 946}, - {"https://trustless-gateway.link/", 917}, - {"https://ipfs.joaoleitao.org/", 881}, - {"https://ipfs.greyh.at/", 878}, - {"https://dlunar.net/", 724}, - {"https://flk-ipfs.io/", 708}, - {"https://ipfs.cyou/", 492}, - {"https://human.mypinata.cloud/", 431}, - {"https://jcsl.hopto.org/", 351}, - {"https://delegated-ipfs.dev/", 340}, - {"https://4everland.io/", 316}, - {"https://ipfs.runfission.com/", 286}, - {"https://gateway.pinata.cloud/", 160}, - {"https://dag.w3s.link/", 153}, + std::pair{"http://127.0.0.1:8080/", 1026}, + {"https://ipfs.io/", 986}, + {"https://dweb.link/", 959}, + {"https://hardbin.com/", 941}, + {"https://trustless-gateway.link/", 928}, + {"https://ipfs.joaoleitao.org/", 876}, + {"https://ipfs.greyh.at/", 875}, + {"https://dlunar.net/", 719}, + {"https://flk-ipfs.io/", 703}, + {"https://ipfs.cyou/", 487}, + {"https://human.mypinata.cloud/", 428}, + {"https://jcsl.hopto.org/", 389}, + {"https://delegated-ipfs.dev/", 339}, + {"https://4everland.io/", 313}, + {"https://ipfs.runfission.com/", 283}, + {"https://gateway.pinata.cloud/", 156}, + {"https://dag.w3s.link/", 150}, {"https://ipfs.eth.aragon.network/", 11}, {"https://data.filstorage.io/", 10}, {"https://storry.tv/", 9}, diff --git a/library/src/ipfs_client/gw/gateway_request_unittest.cc b/library/src/ipfs_client/gw/gateway_request_unittest.cc index 2d7892d8..3db88b4e 100644 --- a/library/src/ipfs_client/gw/gateway_request_unittest.cc +++ b/library/src/ipfs_client/gw/gateway_request_unittest.cc @@ -94,6 +94,8 @@ TEST_F(GatewayRequestTest, suffices) { EXPECT_EQ(t_.url_suffix(), "/ipfs/main/?entity-bytes=0:2097152"); t_.type = RT::Ipns; EXPECT_EQ(t_.url_suffix(), "/ipns/main"); + t_.type = RT::DnsLink; + EXPECT_EQ(t_.url_suffix(), "/ipns/main"); t_.type = RT::Providers; EXPECT_EQ(t_.url_suffix(), "/routing/v1/providers/main"); t_.type = RT::Identity; @@ -129,3 +131,20 @@ TEST_F(GatewayRequestTest, describe_block_http) { ASSERT_TRUE(d.max_response_size.has_value()); EXPECT_EQ(d.max_response_size.value(), 2097152); } +TEST_F(GatewayRequestTest, from_path_unsupportedCID) { + i::SlashDelimited p{ + "/ipfs/bafkrsqgi3m3fi6kqwdzbucyn3fo4tv7pq5hqig7npu5o7gdcmk45a7chshayimpzumfakl732bqxmtata6y2jf43rm6z3bc3vxm7vzyss2366" + }; + //ipfs_client doesn't support shake-256 by default + auto t = T::fromIpfsPath(p); + EXPECT_FALSE(t); +} +TEST_F(GatewayRequestTest, from_path_detectsInline) { + i::SlashDelimited p{ + "/ipfs/bafyaacqkbaeaeeqcnburqaq" + }; + //ipfs_client doesn't support shake-256 by default + auto t = T::fromIpfsPath(p); + ASSERT_TRUE(t); + EXPECT_TRUE(t->type==RT::Identity); +} diff --git a/library/src/ipfs_client/gw/gateway_state.cc b/library/src/ipfs_client/gw/gateway_state.cc index e7ed78f6..d67edf4b 100644 --- a/library/src/ipfs_client/gw/gateway_state.cc +++ b/library/src/ipfs_client/gw/gateway_state.cc @@ -22,7 +22,7 @@ long Self::score(GatewayRequest const& req, unsigned baseline) const { return result; } bool Self::over_rate(unsigned req_per_min) { - return total_sent + current_bucket() > req_per_min * MinutesTracked; + return total_sent + current_bucket() > static_cast(req_per_min) * MinutesTracked; } bool Self::over_rate() { return over_rate(cfg().GetGatewayRate(prefix_)); @@ -51,7 +51,7 @@ void Self::hit(GatewayRequestType grt, GatewayRequest const& req) { affinity_success[req.affinity] += 9; auto rpm = c.GetGatewayRate(prefix_); for (auto i = 9; i; --i) { - if (over_rate(rpm / i)) { + if (over_rate(++rpm / i)) { ++rpm; } else { break; diff --git a/library/src/ipfs_client/gw/gateway_state.h b/library/src/ipfs_client/gw/gateway_state.h index 75f00d76..990189e2 100644 --- a/library/src/ipfs_client/gw/gateway_state.h +++ b/library/src/ipfs_client/gw/gateway_state.h @@ -20,6 +20,8 @@ class GatewayConfig; namespace ipfs::gw { class GatewayRequest; +/*! Information about an IPFS HTTP gateway and how often it should be used for what + */ class GatewayState { std::string prefix_; std::shared_ptr api_; diff --git a/library/src/ipfs_client/ipfs_request.cc b/library/src/ipfs_client/ipfs_request.cc index 990ae8c0..3fcd7b39 100644 --- a/library/src/ipfs_client/ipfs_request.cc +++ b/library/src/ipfs_client/ipfs_request.cc @@ -37,6 +37,7 @@ void Self::finish(ipfs::Response& r) { for (auto& cleanup : cleanups_) { cleanup(); } + cleanups_.clear(); } void Self::new_path(std::string_view sv) { path_.assign(sv); diff --git a/library/src/ipfs_client/ipld/dag_json_node.h b/library/src/ipfs_client/ipld/dag_json_node.h index 1d8012a0..6c78c460 100644 --- a/library/src/ipfs_client/ipld/dag_json_node.h +++ b/library/src/ipfs_client/ipld/dag_json_node.h @@ -5,6 +5,14 @@ #include namespace ipfs::ipld { +/*! A DAG-JSON value. + * @details + * The `links_` are path-able, so... + * * If it represents a dictionary, the links are the members of the dict. + * * If it's a "link", the node has exactly one child, the thing linked to. + * * Otherwise the one node contains all child JSON values. + * - e.g. if it's an array this one node contains all members of the array + */ class DagJsonNode final : public DagNode { std::unique_ptr data_; std::string html_; @@ -13,7 +21,9 @@ class DagJsonNode final : public DagNode { std::string const& html(); public: - DagJsonNode(std::unique_ptr); + /*! Construct from parsed JSON + */ + explicit DagJsonNode(std::unique_ptr); ~DagJsonNode() noexcept override; }; diff --git a/library/src/ipfs_client/ipld/dag_node.cc b/library/src/ipfs_client/ipld/dag_node.cc index 582e21b1..51e5e83f 100644 --- a/library/src/ipfs_client/ipld/dag_node.cc +++ b/library/src/ipfs_client/ipld/dag_node.cc @@ -21,6 +21,7 @@ using Node = ipfs::ipld::DagNode; +Node::~DagNode() noexcept = default; std::shared_ptr Node::fromBytes(std::shared_ptr const& api, Cid const& cid, std::string_view bytes) { diff --git a/library/src/ipfs_client/ipld/directory_shard.cc b/library/src/ipfs_client/ipld/directory_shard.cc index 7e1f02d4..c1f25267 100644 --- a/library/src/ipfs_client/ipld/directory_shard.cc +++ b/library/src/ipfs_client/ipld/directory_shard.cc @@ -118,7 +118,7 @@ std::size_t Self::hex_width() const { std::vector Self::hexhash(std::string_view path_element) const { std::array digest = {0U, 0U}; - MurmurHash3_x64_128(path_element.data(), path_element.size(), 0, + MurmurHash3_x64_128(path_element.data(), static_cast(path_element.size()), 0, digest.data()); std::vector result; for (auto d : digest) { @@ -130,7 +130,7 @@ std::vector Self::hexhash(std::string_view path_element) const { hash_bits /= fanout_; std::ostringstream oss; // ... then hex encode (using 0-F) using little endian those bits ... - oss << std::setfill('0') << std::setw(hex_width()) << std::uppercase + oss << std::setfill('0') << std::setw(static_cast(hex_width())) << std::uppercase << std::hex << popped; result.push_back(oss.str()); } diff --git a/library/src/ipfs_client/ipld/directory_shard.h b/library/src/ipfs_client/ipld/directory_shard.h index e11b80d8..7a652e95 100644 --- a/library/src/ipfs_client/ipld/directory_shard.h +++ b/library/src/ipfs_client/ipld/directory_shard.h @@ -20,6 +20,8 @@ class DirShard : public DagNode { std::string listing_json() const; public: + /*! Construct with a known fanout + */ explicit DirShard(std::uint64_t fanout = 256UL); virtual ~DirShard() noexcept; }; diff --git a/library/src/ipfs_client/ipld/dnslink_name.cc b/library/src/ipfs_client/ipld/dnslink_name.cc index 40c5283e..77331d7e 100644 --- a/library/src/ipfs_client/ipld/dnslink_name.cc +++ b/library/src/ipfs_client/ipld/dnslink_name.cc @@ -13,6 +13,7 @@ Self::DnsLinkName(std::string_view target_abs_path) links_.emplace_back("", Link{target_root_, nullptr}); target_path_.assign(target.to_string()); } +Self::~DnsLinkName() noexcept = default; auto Self::resolve(ResolutionState& params) -> ResolveResult { auto& node = links_.at(0).second.node; diff --git a/library/src/ipfs_client/ipld/dnslink_name.h b/library/src/ipfs_client/ipld/dnslink_name.h index 8dbeb89d..61895efb 100644 --- a/library/src/ipfs_client/ipld/dnslink_name.h +++ b/library/src/ipfs_client/ipld/dnslink_name.h @@ -18,7 +18,7 @@ class DnsLinkName : public DagNode { public: DnsLinkName(std::string_view target_abs_path); - virtual ~DnsLinkName() noexcept {} + ~DnsLinkName() noexcept override; bool expired() const override; }; diff --git a/library/src/ipfs_client/ipld/ipns_name.h b/library/src/ipfs_client/ipld/ipns_name.h index ab422c2c..965821c9 100644 --- a/library/src/ipfs_client/ipld/ipns_name.h +++ b/library/src/ipfs_client/ipld/ipns_name.h @@ -20,9 +20,15 @@ class IpnsName : public DagNode { IpnsName const* as_ipns() const override { return this; } public: - IpnsName(ValidatedIpns const&); + /*! Construct from a validated entry + */ + explicit IpnsName(ValidatedIpns const&); ~IpnsName() noexcept override; + /*! @return whether this record should be considered expired + * @note Most useful for cached entries, but also can expire + * While sitting in the in-memory DAG, particularly by TTL + */ bool expired() const override; }; } // namespace ipld diff --git a/library/src/ipfs_client/ipld/unixfs_file.cc b/library/src/ipfs_client/ipld/unixfs_file.cc index aea3675c..f02fe98e 100644 --- a/library/src/ipfs_client/ipld/unixfs_file.cc +++ b/library/src/ipfs_client/ipld/unixfs_file.cc @@ -43,7 +43,6 @@ auto Self::resolve(ResolutionState& params) -> ResolveResult { }; } auto result = MoreDataNeeded{missing}; - result.insist_on_car = true; return result; } diff --git a/library/src/ipfs_client/ipns_record.cc b/library/src/ipfs_client/ipns_record.cc index 5124427a..462ca3c9 100644 --- a/library/src/ipfs_client/ipns_record.cc +++ b/library/src/ipfs_client/ipns_record.cc @@ -208,7 +208,7 @@ ipfs::ValidatedIpns::ValidatedIpns(IpnsCborEntry const& e) std::istringstream ss{e.validity}; std::tm t = {}; ss >> std::get_time(&t, "%Y-%m-%dT%H:%M:%S"); - long ttl = (e.ttl / 1'000'000'000UL) + 1; + long ttl = static_cast(e.ttl / 1'000'000'000UL) + 1; #ifdef _MSC_VER use_until = _mkgmtime(&t); #else diff --git a/library/src/ipfs_client/multi_base.cc b/library/src/ipfs_client/multi_base.cc index 58c9a0f1..cb79aaba 100644 --- a/library/src/ipfs_client/multi_base.cc +++ b/library/src/ipfs_client/multi_base.cc @@ -57,8 +57,8 @@ constexpr imb::Codec adapt(std::string_view name) { auto imb::Codec::Get(Code c) -> Codec const* { switch (c) { case Code::IDENTITY: - return nullptr; case Code::UNSUPPORTED: + case Code::BASE64: return nullptr; case Code::BASE16_LOWER: { static auto b16 = @@ -85,14 +85,14 @@ auto imb::Codec::Get(Code c) -> Codec const* { return &b36; } case Code::BASE36_UPPER: - return nullptr; + static auto b36u = + adapt("base36upper"sv); + return &b36u; case Code::BASE58_BTC: { static auto b58 = adapt("base58btc"sv); return &b58; } - case Code::BASE64: - return nullptr; } return nullptr; } @@ -130,4 +130,4 @@ std::string imb::encode(Code c, ByteView bs) { << " because I can't find a codec??"; } return {}; -} \ No newline at end of file +} diff --git a/library/src/ipfs_client/pb_dag.cc b/library/src/ipfs_client/pb_dag.cc index 8dd6b6e5..c7399ceb 100644 --- a/library/src/ipfs_client/pb_dag.cc +++ b/library/src/ipfs_client/pb_dag.cc @@ -63,6 +63,8 @@ std::pair InitBlock(ipfs::MultiCodec c, } } // namespace +/*! The parsed protobufs + */ struct ipfs::PbDag::Data { pb_dag::PBNode node_; unix_fs::Data fsdata_; diff --git a/library/src/ipfs_client/redirects.cc b/library/src/ipfs_client/redirects.cc index 51df70a2..813b5ef1 100644 --- a/library/src/ipfs_client/redirects.cc +++ b/library/src/ipfs_client/redirects.cc @@ -157,7 +157,8 @@ bool r::File::parse_line(std::string_view line, int line_number) { if (bpos == std::string_view::npos) { // effectively empty line return false; - } else if (line[bpos] == '#') { + } + if (line[bpos] == '#') { // https://specs.ipfs.tech/http-gateways/web-redirects-file/#comments return false; } diff --git a/test_data/blocks/QmaZ87Tp8qARaF2e3ciNL2dfzMhzBfx34AbELqSub1zxd6 b/test_data/blocks/QmaZ87Tp8qARaF2e3ciNL2dfzMhzBfx34AbELqSub1zxd6 deleted file mode 100644 index e3266c44..00000000 --- a/test_data/blocks/QmaZ87Tp8qARaF2e3ciNL2dfzMhzBfx34AbELqSub1zxd6 +++ /dev/null @@ -1,2 +0,0 @@ - -Tn6 Tn7 Tn8 Tn9 To0 To1 To2 To3 To4 To5 To6 To7 To8 To9 Tp0 Tp1 Tp2 Tp3 Tp4 Tp5 Tp6 Tp7 Tp8 Tp9 Tq0 Tq1 Tq2 Tq3 Tq4 Tq5 Tq6 Tq7 Tq8 Tq9 Tr0 Tr1  \ No newline at end of file diff --git a/test_data/blocks/QmaZRMMo58sp9E7jxJNkoh93eJyZ8XM93KEcWQRAHMcgDW b/test_data/blocks/QmaZRMMo58sp9E7jxJNkoh93eJyZ8XM93KEcWQRAHMcgDW deleted file mode 100644 index be5af54e..00000000 --- a/test_data/blocks/QmaZRMMo58sp9E7jxJNkoh93eJyZ8XM93KEcWQRAHMcgDW +++ /dev/null @@ -1,3 +0,0 @@ -; -" /,;umSh >+ܨb^=multinodefile.txt - \ No newline at end of file diff --git a/test_data/blocks/bafkreibaffbwukjz6x5qa5foqvyjjnl5mtk4hq2hbl73csgsqx6ap5ox5u b/test_data/blocks/bafkreibaffbwukjz6x5qa5foqvyjjnl5mtk4hq2hbl73csgsqx6ap5ox5u new file mode 100644 index 00000000..8ba5f33d --- /dev/null +++ b/test_data/blocks/bafkreibaffbwukjz6x5qa5foqvyjjnl5mtk4hq2hbl73csgsqx6ap5ox5u @@ -0,0 +1,278 @@ + + + + + + + Can I Use Planet While Offline? + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + +
+
+
+
 
+
+ + +
+ Can I Use Planet While Offline? +
+ + +
+ +

Yes, you can write and generate a static website while offline and publish it later when you have connectivity.

+

You can also read articles from any Planet you follow while offline, as they are stored in the local repo. For example, if you fetched the latest articles from vitalik.eth, you can read them during a long flight without Wi-Fi.

+
+

When you start Planet in an offline environment, the IPFS status area shows Online (0) indicating that no peers are currently connected.

+online-0 +
+

These features are fully functional offline:

+
    +
  • Write or edit a post
  • +
  • Generate a website
  • +
  • Read retrieved articles from the Planets you are following
  • +
+

These features need connectivity:

+
    +
  • Publish: Write CID to an IPNS and broadcast the update to your IPFS peers
  • +
  • Check for Update: Find new posts, or a new version of the app, from the Internet
  • +
  • Aggregation: Fetch posts from other IPNS, ENS, or RSS addresses
  • +
+ + +
+ + +
+ + + +
+
+ + + +
+
+
+ + diff --git a/test_data/blocks/bafkreifmvsdmbzqjzkig6yzlbyw2ztfsw56sfmdcd4qox3hbusbvxe7w6a b/test_data/blocks/bafkreifmvsdmbzqjzkig6yzlbyw2ztfsw56sfmdcd4qox3hbusbvxe7w6a deleted file mode 100644 index baf72b1d..00000000 --- a/test_data/blocks/bafkreifmvsdmbzqjzkig6yzlbyw2ztfsw56sfmdcd4qox3hbusbvxe7w6a +++ /dev/null @@ -1 +0,0 @@ -l \ No newline at end of file diff --git a/test_data/blocks/bafybeibvfj5evbxihislroxz4g7qeap5kfvgta2kpocfhpsfni4krcjfjq b/test_data/blocks/bafybeibvfj5evbxihislroxz4g7qeap5kfvgta2kpocfhpsfni4krcjfjq new file mode 100644 index 0000000000000000000000000000000000000000..6b2048f237e8bfeeac922690668757afccfab2c9 GIT binary patch literal 4962 zcmai1X;hSD8x}CZ!G&HU#stM06^)nPeMwN?)m%_fLCr`97+??vni&W+6-5M*L;;mW zltOa}O+-y77u@hez$HWjOf3*C6)m0eL*aX1X8g{fA9FZofH~*7p8L6%>$)E(K%ugW zgFJKY1njt{nc8rvD$Av7lFR#lPIqnyxia55IOp=lu&^&_NQGcDju9*h3kb@?1VwN# z&mb&}5hTf?B*K#jqug-+wjE@l^!16<)J{ssy)l2yClB!Dee>5|yw2wY*Qb4)NfxaA z^CLhh&?q5FJdBbk3n*CuW@V0s35gUbmXKwHA(iEAmG;mqbCi{>CrWXe0v| zNkoJhN#F#TB}i0~l$Wv=TdzGRb#8h4K=<)A#Ah4VeYS4<=a0(0MwEP;eCWomsBsg{ z4hM|1M1dPqFfWiIOkf1~OT-YE$4D9@WS-(BO!@nnr>`^lFnjR#Pk*=_u{5io&^~fu z!o(FGYIWV6>BknN*A}<2-$N=~AZVPU2$;Y@NeDp(Hx_9DW)KO(1@Ob7qO$8+lD{>| z&vX0q`LO9+q_>dL#GjbGyF$Jnpm+P=Xql&6d+(I{Y)D1O9Lq_(1WPOfCzRWk5?KGRGkVj)U`*XF6wE84thZNi4p1 z{$R9kgig0by{|B6ks)=+_;UM$HPhkU;t!CDB58&uLH=+V;b4NL!Hq$ru!JJGM3NjW z5|Z*^7Hm!A(rKm{Kh+G@b2}S0r1slfmEy+Om5g}oUDUZC|^`~Iy{aUwaH%Yh zx%AaeyQYlX#*Xm!hV5^yxD2Uin&(jt<3MO&S_lFMDMe)hmPtg$5R$~e{3xsU4zOMu zYs{QWs@yX}YcA&AI<|R!>30*VzaZV#kOLhzo}m0(0HeSVJVkS`$kP&FWMohpse6nF zhG#|440S+wwFuof$Qw^Om+6q`;<%(5r)- zcY7rV*Pg=0Cc}V|MR5Wl2+%PgHiG0((B+~8Be+PTJS$5W#VAiFcfF=m{qme+C#J;i z33{V6Bi)Ebc)Qw#Ki7X<@U-7{0Y3c%P>Kl7BOC{Flt2PXAV!=laj?YW0*9akMPZ_H zUCz#r@?cCA#N|9JU=mH2Jf@TUABE~g?RtG@w^EJ{nD ziGYidD4=C=7P-9*^}MAWqsE@oC#5;|u+q%#%l} z;(vbPR#vC1fK&oXqiDAq$_Nkq0azh0F@Xa27YGccMH)<$vfx_d>kd*REesl1!YAZE zc{&P8+f-~?iArbF(=|k~Z`PhC+0+a+$83as?)GZqX%7`#a zf^o-ycT+%<1eOz(SAUsfz4!2vij=d$=04MgzCV9l%Arty{EXwfkn#KxdR*$OjSfcu zqby^hfZ#AI$UrD%oP-$+qq_?vkpx1^D32+3nl`--k}NJ+uUeQApP111)svuAAyN0? z)FQI=8?SBI(;QdM3WHP&@he5K=1^d zWJpoDt-RO{qQQm{2zhQxW|A(PT)H7MC^NI}Ku7z6L3Im$>ofOL$#1ZDc-oWI&;YeQ zG*X+O@rg9XL@O`Mf&9#?iOpDC)Ow>fG+F~2G)ALV7hy1;i<#l?>eeSYoLgW#RrL5) z@S4rj$`6o}AHE$PaHHPGv`Q>ZfcmKo0BBG)-F1K{Ge#TJRBAtb($S&M>fcHI?XUay ziyJn%?3LRS?1J`q5?Mb%3Uz|osMh<$=^~W(%07T5m~rQeZl9;OoXd`KbO=7Z_g+Ee z-mCn%@75_++U-7Tj3fyN3W?W7hrwE%!KjZ9HELsZ24%jfKjdr1+cZ&^(3mjT5UC9} z!r-??7uI8#I6#98&zSbn;CXZAj|s^gZ>~zGYD>{z$)hwDE4p zE@+?yXie{ffv{MWnIz! z>J#C!^d7I?135>;Yr`~_!%iHsv#JRiShrzjUna|CQ|-!kz02Pb<~hC?H7W4teVZ4% zPl=d!4pL}!VVXqq^(uaN1L_t%@VvHZ(2hWC!HN1F54H@U&8;2M>Wuo>u=r45CvaS} zTBkAg?C69!so(K$ET35UsG#~x-$uFRkEsC@lZb6+bL!#MTOI^vP0oP&YvaN#cRUo> zQ$rA{%}1AWlp$6JhsWw;)W)8-Rks}hrL~=#ICX>u{eNyOxXH7Uh8(ZT*zhnb?MuJ! zca6WfV9NR*6Nj|<*Sdb_lN&q)Qgq`mGp+#Cf;6Ak82MmC&fNFL=9L>SECF2 zoTfqpcgTrT<5XO+}0duQiic|8R= zn`>Y`@o&jG75Z?<%@mh?z<1b4)$QUrWy}^+&Cva;9*%l7Y4ONxx2>;n-HBDctW@+E zHOS~fx4eY4{$EawD=JbvcqeLD?xNzIUNh?EP5aw>?gYP`o)DzhL~GOr4XlebTDvv* zN?*v*0KXkN$LGFue=EP^*~Prra@ClFTuWF%_Vis_@`feOJ{|}u^synaMuU$r(Wvax z)2rZAqtBAxO}=#}ckjBK_9{=eCqwwE(0x#C&XneTr?&@(ehWG34F;b?u>EwF^|R)t z`OHlPyS{^?^D8`u;EZchc;|(g6P|z5;&&r(XmnL0q%dgWv}$u|I@Z`(L+o?sm%56E zXPVZ8u$g{83zrtBeLJ>orR#Ct~afF_ztFAj+<4lIjEe^Wm2 z_TTrzcI0%-JTszgWwOiZ#U}UtUFndkQ4<4-VbsjAEL%Q3xwY>J7c{xehhcv!fx-Ox zv-Dil%kYyk(?_^{<@_+k$sz65@!8n8gV}|qYS-rHSN|~Gg%k;3iY-gXmNTj2>t`x(|bJEYZvT0SP9q`jzVJ<7g1=E>u-jVb*%+cw$`RxJ$%@m>;FcNORay{zg~YU#Fd$sl3JmcQIeY@ zaoI-50%F_c=KMzrY0*vR*cL9E`M%vxZuP|#`rkCfPJH=N@Zx~@5+R=ayqwIuR9yqT Pg1mHzNn4n>m^c^#VQO3~ literal 0 HcmV?d00001 diff --git a/test_data/include/mock_gw_cfg.h b/test_data/include/mock_gw_cfg.h index 7053151e..c0c0707f 100644 --- a/test_data/include/mock_gw_cfg.h +++ b/test_data/include/mock_gw_cfg.h @@ -3,6 +3,8 @@ #include +//NOLINT + namespace i = ipfs; namespace ig = i::gw; diff --git a/test_data/names/planetable.eth b/test_data/names/planetable.eth new file mode 100644 index 00000000..ef67d711 --- /dev/null +++ b/test_data/names/planetable.eth @@ -0,0 +1 @@ +/ipfs/bafybeibvfj5evbxihislroxz4g7qeap5kfvgta2kpocfhpsfni4krcjfjq diff --git a/test_data/test_server.py b/test_data/test_server.py index 672ab3f7..cbb2e12b 100755 --- a/test_data/test_server.py +++ b/test_data/test_server.py @@ -44,8 +44,16 @@ def respond(self, path): self.send_response(200) mime = self.headers.get('Accept') self.send_header("Content-type", mime) + content = f.read() + if '/names/' in path and len(content) < 99: + try: + content = content.decode("utf-8") + content = content.strip() + self.send_header("X-Ipfs-Roots", content) + except UnicodeError: + pass self.end_headers() - self.wfile.write(f.read()) + self.wfile.write(str.encode(content)) # print('test server responded to', self.path, ' Accept:', mime) return except OSError as e: