Skip to content

Commit

Permalink
License (#106)
Browse files Browse the repository at this point in the history
* Closes #88
Library dual licensed.
component's googled
  • Loading branch information
John-LittleBearLabs authored May 1, 2024
1 parent f45e0cf commit 07bfbd5
Show file tree
Hide file tree
Showing 175 changed files with 3,808 additions and 222 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 9e7f057a1c35d..846fe6d119c66 100644
index 5d698b969a134..530ef283aea55 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -39,6 +39,7 @@ import("//rlz/buildflags/buildflags.gni")
import("//sandbox/features.gni")
@@ -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")
@@ -2619,6 +2620,14 @@ static_library("browser") {
@@ -2653,6 +2654,14 @@ static_library("browser") {
]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 61699cdf19305..5b99fd9811eb0 100644
index 4a8a44e4a87de..28a442b093dff 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -214,6 +214,7 @@
@@ -216,6 +216,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"
Expand All @@ -21,7 +21,7 @@ index 61699cdf19305..5b99fd9811eb0 100644
#if BUILDFLAG(ENABLE_PDF)
#include "pdf/pdf_features.h"
#endif
@@ -9413,6 +9418,14 @@ const FeatureEntry kFeatureEntries[] = {
@@ -9552,6 +9557,14 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kOmitCorsClientCertDescription, kOsAll,
FEATURE_VALUE_TYPE(network::features::kOmitCorsClientCert)},

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a9f0eb5ab9151..8956d3ca5519e 100644
index 66b50cf0fd99b..9662a72a3bd33 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -374,6 +374,7 @@
@@ -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"
@@ -497,6 +498,13 @@
@@ -500,6 +501,13 @@
#include "chrome/browser/fuchsia/chrome_browser_main_parts_fuchsia.h"
#endif

Expand All @@ -21,10 +21,10 @@ index a9f0eb5ab9151..8956d3ca5519e 100644
+#include "components/ipfs/url_loader_factory.h"
+#endif
+
#if BUILDFLAG(IS_CHROMEOS)
#include "base/debug/leak_annotations.h"
#include "chrome/browser/apps/app_service/app_install/app_install_navigation_throttle.h"
@@ -1709,6 +1717,11 @@ ChromeContentBrowserClient::CreateBrowserMainParts(bool is_integration_test) {
#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<ChromeBrowserMainExtraPartsNaclDeprecation>());

Expand All @@ -36,8 +36,8 @@ index a9f0eb5ab9151..8956d3ca5519e 100644
return main_parts;
}

@@ -6049,12 +6062,25 @@ void ChromeContentBrowserClient::
const absl::optional<url::Origin>& request_initiator_origin,
@@ -6100,12 +6113,25 @@ void ChromeContentBrowserClient::
const std::optional<url::Origin>& request_initiator_origin,
NonNetworkURLLoaderFactoryMap* factories) {
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_EXTENSIONS) || \
- !BUILDFLAG(IS_ANDROID)
Expand All @@ -46,8 +46,7 @@ index a9f0eb5ab9151..8956d3ca5519e 100644
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)
+ // !BUILDFLAG(IS_ANDROID) || BUILDFLAG(ENABLE_IPFS)
// !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();
Expand All @@ -64,7 +63,7 @@ index a9f0eb5ab9151..8956d3ca5519e 100644

#if BUILDFLAG(IS_CHROMEOS_ASH)
if (web_contents) {
@@ -6196,6 +6222,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
@@ -6242,6 +6268,11 @@ ChromeContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
interceptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 91740e0cc9e2b..916f584f37a54 100644
index b5c5b2d917208..189348efbd047 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2943,6 +2943,11 @@
"owners": [ "[email protected]", "[email protected]" ],
@@ -3132,6 +3132,11 @@
"owners": [ "[email protected]", "[email protected]" ],
"expiry_milestone": 130
},
+ {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index bddee4563e255..9e84641ac307f 100644
index d3baaf38f5eb2..fb7162b452871 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -284,6 +284,11 @@ const char kEnableBenchmarkingDescription[] =
"after 3 restarts. On the third restart, the flag will appear to be off "
"but the effect is still active.";
@@ -329,6 +329,11 @@ const char kEnableBenchmarkingChoiceDefaultFeatureStates[] =
const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[] =
"Match Field Trial Testing Config";

+#if BUILDFLAG(ENABLE_IPFS)
+extern const char kEnableIpfsName[] = "Enable IPFS";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index dc09da6e1897a..f139e88d67ae1 100644
index 49c7d75f3115e..1cdeb27b5e0f0 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -23,6 +23,7 @@
Expand All @@ -10,9 +10,9 @@ index dc09da6e1897a..f139e88d67ae1 100644

// This file declares strings used in chrome://flags. These messages are not
// translated, because instead of end-users they target Chromium developers and
@@ -176,6 +177,11 @@ extern const char kDownloadWarningImprovementsDescription[];
extern const char kEnableBenchmarkingName[];
extern const char kEnableBenchmarkingDescription[];
@@ -198,6 +199,11 @@ extern const char kEnableBenchmarkingChoiceDisabled[];
extern const char kEnableBenchmarkingChoiceDefaultFeatureStates[];
extern const char kEnableBenchmarkingChoiceMatchFieldTrialTestingConfig[];

+#if BUILDFLAG(ENABLE_IPFS)
+extern const char kEnableIpfsName[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index e406d936c277c..0aff4e87587ae 100644
index 5eef5cdedda4c..a05199c7e40d4 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -189,6 +189,7 @@
@@ -190,6 +190,8 @@
#include "printing/buildflags/buildflags.h"
#include "rlz/buildflags/buildflags.h"
#include "third_party/abseil-cpp/absl/types/optional.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 +234,11 @@
@@ -234,6 +236,11 @@
#include "chrome/browser/pdf/pdf_pref_names.h"
#endif // BUILDFLAG(ENABLE_PDF)

Expand All @@ -22,7 +23,7 @@ index e406d936c277c..0aff4e87587ae 100644
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
#include "chrome/browser/screen_ai/pref_names.h"
#endif
@@ -1658,6 +1664,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -1746,6 +1753,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
IncognitoModePrefs::RegisterProfilePrefs(registry);
invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry);
invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 246ec9c5c911f..5d66d133a7907 100644
index 2f016718fdd3c..bc38d5c2e4d8e 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -296,6 +296,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) {
@@ -302,6 +302,12 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) {
#if BUILDFLAG(IS_ANDROID)
schemes->local_schemes.push_back(url::kContentScheme);
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/components/cbor/reader.cc b/components/cbor/reader.cc
index 306ba52fa4944..6b13b3a679a65 100644
index 3c31e3d05e5d3..5ad0dbb183884 100644
--- a/components/cbor/reader.cc
+++ b/components/cbor/reader.cc
@@ -22,7 +22,7 @@
Expand All @@ -11,7 +11,7 @@ index 306ba52fa4944..6b13b3a679a65 100644
}

namespace {
@@ -156,7 +156,11 @@ absl::optional<Value> Reader::DecodeCompleteDataItem(const Config& config,
@@ -156,7 +156,11 @@ std::optional<Value> 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);
Expand All @@ -24,11 +24,11 @@ index 306ba52fa4944..6b13b3a679a65 100644
case Value::Type::NONE:
case Value::Type::INVALID_UTF8:
break;
@@ -347,6 +351,17 @@ absl::optional<Value> Reader::ReadByteStringContent(
@@ -347,6 +351,17 @@ std::optional<Value> Reader::ReadByteStringContent(
return Value(std::move(cbor_byte_string));
}

+absl::optional<Value> Reader::ReadTagContent(
+std::optional<Value> Reader::ReadTagContent(
+ const Reader::DataItemHeader& header,
+ const Config& config,
+ int max_nesting_level) {
Expand All @@ -39,6 +39,6 @@ index 306ba52fa4944..6b13b3a679a65 100644
+ return tagged_content;
+}
+
absl::optional<Value> Reader::ReadArrayContent(
std::optional<Value> Reader::ReadArrayContent(
const Reader::DataItemHeader& header,
const Config& config,
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/components/cbor/reader.h b/components/cbor/reader.h
index f0b43a5517528..a57e277a1bc66 100644
index 73c5dcb23e555..a933768608d73 100644
--- a/components/cbor/reader.h
+++ b/components/cbor/reader.h
@@ -130,6 +130,11 @@ class CBOR_EXPORT Reader {
Expand All @@ -15,12 +15,12 @@ index f0b43a5517528..a57e277a1bc66 100644

Reader(const Reader&) = delete;
@@ -204,6 +209,9 @@ class CBOR_EXPORT Reader {
absl::optional<Value> ReadMapContent(const DataItemHeader& header,
const Config& config,
int max_nesting_level);
+ absl::optional<Value> ReadTagContent(const DataItemHeader& header,
std::optional<Value> ReadMapContent(const DataItemHeader& header,
const Config& config,
int max_nesting_level);
+ std::optional<Value> ReadTagContent(const DataItemHeader& header,
+ const Config& config,
+ int max_nesting_level);
absl::optional<uint8_t> ReadByte();
absl::optional<base::span<const uint8_t>> ReadBytes(uint64_t num_bytes);
std::optional<uint8_t> ReadByte();
std::optional<base::span<const uint8_t>> ReadBytes(uint64_t num_bytes);
bool IsKeyInOrder(const Value& new_key,
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/components/cbor/reader_unittest.cc b/components/cbor/reader_unittest.cc
index 83d44a48d6dfa..a6ec5299b3241 100644
index e5c02ceea3402..f26b8e77f6da3 100644
--- a/components/cbor/reader_unittest.cc
+++ b/components/cbor/reader_unittest.cc
@@ -1451,5 +1451,42 @@ TEST(CBORReaderTest, AllowInvalidUTF8) {
@@ -1449,5 +1449,42 @@ TEST(CBORReaderTest, AllowInvalidUTF8) {
EXPECT_FALSE(cbor);
EXPECT_EQ(Reader::DecoderError::INVALID_UTF8, error);
}
Expand All @@ -14,7 +14,7 @@ index 83d44a48d6dfa..a6ec5299b3241 100644
+ 0x9d, 0xf6, 0x3a, 0x36, 0x5b
+ };
+ Reader::Config config;
+ absl::optional<Value> cbor = Reader::Read(kTaggedCbor, config);
+ auto cbor = Reader::Read(kTaggedCbor, config);
+ EXPECT_FALSE(cbor.has_value());
+}
+TEST(CBORReaderTest, ReadsTagWhenConfiguredToDoSo) {
Expand All @@ -26,7 +26,7 @@ index 83d44a48d6dfa..a6ec5299b3241 100644
+ };
+ Reader::Config config;
+ config.parse_tags = true;
+ absl::optional<Value> cbor = Reader::Read(kTaggedCbor, config);
+ auto cbor = Reader::Read(kTaggedCbor, config);
+ EXPECT_TRUE(cbor.has_value());
+ auto& v = cbor.value();
+ EXPECT_TRUE(v.has_tag());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/components/cbor/writer.cc b/components/cbor/writer.cc
index bb22754d36a07..aae4027836377 100644
index f400a65e7b66a..fcdebb8f3b458 100644
--- a/components/cbor/writer.cc
+++ b/components/cbor/writer.cc
@@ -47,6 +47,9 @@ bool Writer::EncodeCBOR(const Value& node,
Expand Down
Original file line number Diff line number Diff line change
@@ -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 4dcafecbc66c6..d205209c08162 100644
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 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/net/dns/dns_config_service_linux.cc b/net/dns/dns_config_service_linux.cc
index 5273da5190277..12b28b86a4c00 100644
index f909f127ba3e1..31d7f9d58c0af 100644
--- a/net/dns/dns_config_service_linux.cc
+++ b/net/dns/dns_config_service_linux.cc
@@ -272,11 +272,11 @@ bool IsNsswitchConfigCompatible(
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/url/BUILD.gn b/url/BUILD.gn
index b5edb89f7698f..d299856674d7d 100644
index aedf1bf9f80be..b11c73a88aae5 100644
--- a/url/BUILD.gn
+++ b/url/BUILD.gn
@@ -5,6 +5,7 @@
Expand All @@ -10,15 +10,15 @@ index b5edb89f7698f..d299856674d7d 100644
import("features.gni")

import("//build/config/cronet/config.gni")
@@ -68,6 +69,7 @@ component("url") {
@@ -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" ]
@@ -90,6 +92,11 @@ component("url") {
@@ -89,6 +91,11 @@ component("url") {
public_configs = [ "//third_party/jdk" ]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/url/url_canon.h b/url/url_canon.h
index 8c48f9825d8cf..b9ad961e1b123 100644
index bd40235e4aa85..05d250fe1b746 100644
--- a/url/url_canon.h
+++ b/url/url_canon.h
@@ -804,6 +804,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec,
@@ -815,6 +815,23 @@ bool CanonicalizeMailtoURL(const char16_t* spec,
CanonOutput* output,
Parsed* new_parsed);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/url/url_util.cc b/url/url_util.cc
index 6f83f33c01c6b..a248e11c49445 100644
index 82b27b8f59684..2f3045adefaa7 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -273,8 +273,15 @@ bool DoCanonicalize(const CHAR* spec,
@@ -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);
Expand Down
27 changes: 27 additions & 0 deletions chromium_edits/125.0.6368.2/chrome/browser/BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 7a4534d39b491..8caeb8ab3ec7c 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")
@@ -2654,6 +2655,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" ]
}
Loading

0 comments on commit 07bfbd5

Please sign in to comment.