Skip to content

Commit

Permalink
Merge pull request #314 from teeminus/update
Browse files Browse the repository at this point in the history
  • Loading branch information
teeminus authored Jan 25, 2024
2 parents c693d3b + 7793d3a commit 18f4f4d
Show file tree
Hide file tree
Showing 13 changed files with 594 additions and 115 deletions.
332 changes: 233 additions & 99 deletions domain_substitution.list

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ ungoogled-chromium/windows/windows-disable-clang-version-check.patch
ungoogled-chromium/windows/windows-disable-nodebug_assertion.patch
ungoogled-chromium/windows/windows-fix-licenses-gn-path.patch
ungoogled-chromium/windows/windows-fix-missing-clang-features.patch
ungoogled-chromium/windows/windows-fix-building-without-rust.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1575,7 +1575,7 @@ config("compiler_deterministic") {
@@ -1577,7 +1577,7 @@ config("compiler_deterministic") {
}

config("clang_revision") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/components/download/internal/common/download_item_impl.cc
+++ b/components/download/internal/common/download_item_impl.cc
@@ -2429,7 +2429,7 @@ void DownloadItemImpl::SetDangerType(Dow
@@ -2426,7 +2426,7 @@ void DownloadItemImpl::SetDangerType(Dow
TRACE_EVENT_SCOPE_THREAD, "danger_type",
GetDownloadDangerNames(danger_type).c_str());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -427,7 +427,6 @@ static_library("common_lib") {
@@ -428,7 +428,6 @@ static_library("common_lib") {
]
deps += [
"//chrome/chrome_elf:chrome_elf_main_include",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Windows does not support weak symbols
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1098,7 +1098,7 @@ component("base") {
@@ -1091,7 +1091,7 @@ component("base") {
public_deps += [ "//build/rust:cxx_cppdeps" ]
}

Expand Down
19 changes: 17 additions & 2 deletions patches/ungoogled-chromium/windows/windows-disable-rcpy.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"P", IDC_BASIC_PRINT, VIRTKEY, CONTROL, SHIFT
#endif
"D", IDC_BOOKMARK_ALL_TABS, VIRTKEY, CONTROL, SHIFT
@@ -166,7 +166,7 @@ END
@@ -166,12 +166,12 @@ END
// the icon from the current module). We can perhaps work around this in the
// future to get the icon from the .exe, which would save a copy.

Expand All @@ -40,6 +40,12 @@
IDR_MAINFRAME ICON "theme\google_chrome\win\chrome.ico"
IDR_SXS ICON "theme\google_chrome\win\chrome_sxs.ico"
IDR_X004_DEV ICON "theme\google_chrome\win\chrome_dev.ico"
IDR_X005_BETA ICON "theme\google_chrome\win\chrome_beta.ico"
-#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
+#elif 0
IDR_MAINFRAME ICON "theme\google_chrome\google_chrome_for_testing\win\chrome.ico"
#else
IDR_MAINFRAME ICON "theme\chromium\win\chromium.ico"
--- a/chrome/app/chrome_exe.rc
+++ b/chrome/app/chrome_exe.rc
@@ -36,7 +36,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
Expand All @@ -51,7 +57,16 @@
IDR_MAINFRAME ICON "theme\\google_chrome\\win\\chrome.ico"
// These three are no longer used, but remain as placeholders. (They cannot be
// removed, or existing shortcuts to the later resources will break.)
@@ -55,7 +55,7 @@ IDR_MAINFRAME ICON "them
@@ -46,7 +46,7 @@ IDR_MAINFRAME_4 ICON "them
// The SXS icon must have an index of 4, the constant is used in Chrome code to
// identify it.
IDR_SXS ICON "theme\\google_chrome\\win\\chrome_sxs.ico"
-#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
+#elif 0
IDR_MAINFRAME ICON "theme\\google_chrome\\google_chrome_for_testing\\win\\chrome.ico"
#else
IDR_MAINFRAME ICON "theme\\chromium\\win\\chromium.ico"
@@ -57,7 +57,7 @@ IDR_MAINFRAME ICON "them
// should be incremented when a new icon is added. The icon indices in
// chrome_icon_resources_win.h should also be updated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# each platform lists its own files rather than relying on filtering or
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -476,11 +476,6 @@ python_library("chromedriver_py_tests")
@@ -474,11 +474,6 @@ python_library("chromedriver_py_tests")
if (is_component_build && is_mac) {
data_deps += [ "//chrome:chrome_framework" ]
}
Expand All @@ -69,7 +69,7 @@
- }
}

python_library("chromedriver_replay_unittests") {
python_library("chromedriver_py_tests_headless_shell") {
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -43,10 +43,6 @@ group("telemetry_chrome_test") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
--- a/components/qr_code_generator/BUILD.gn
+++ b/components/qr_code_generator/BUILD.gn
@@ -39,21 +39,11 @@ source_set("qr_code_generator") {
]
deps = [
":qr_code_generator_features",
- ":qr_code_generator_ffi_glue",
"//base",
]
public_deps = [ "//base" ]
}

-rust_static_library("qr_code_generator_ffi_glue") {
- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
- crate_root = "qr_code_generator_ffi_glue.rs"
- sources = [ "qr_code_generator_ffi_glue.rs" ]
- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
- visibility = [ ":qr_code_generator" ]
- deps = [ "//third_party/rust/qr_code/v2:lib" ]
-}
-
source_set("unit_tests") {
testonly = true
sources = [ "qr_code_generator_unittest.cc" ]
--- a/components/qr_code_generator/qr_code_generator.cc
+++ b/components/qr_code_generator/qr_code_generator.cc
@@ -11,12 +11,10 @@
#include <vector>

#include "base/check_op.h"
-#include "base/containers/span_rust.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "components/qr_code_generator/features.h"
-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"

namespace qr_code_generator {

@@ -572,31 +570,6 @@ size_t SegmentSpanLength(base::span<cons
return sum;
}

-absl::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
- base::span<const uint8_t> in,
- absl::optional<int> min_version) {
- rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
-
- // `min_version` might come from a fuzzer and therefore we use a lenient
- // `saturated_cast` instead of a `checked_cast`.
- int16_t rs_min_version =
- base::saturated_cast<int16_t>(min_version.value_or(0));
-
- std::vector<uint8_t> result_pixels;
- size_t result_width = 0;
- bool result_is_success = generate_qr_code_using_rust(
- rs_in, rs_min_version, result_pixels, result_width);
-
- if (!result_is_success) {
- return absl::nullopt;
- }
- QRCodeGenerator::GeneratedCode code;
- code.data = std::move(result_pixels);
- code.qr_size = base::checked_cast<int>(result_width);
- CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
- return code;
-}
-
} // namespace

QRCodeGenerator::QRCodeGenerator() = default;
@@ -617,10 +590,6 @@ absl::optional<QRCodeGenerator::Generate
return absl::nullopt;
}

- if (IsRustyQrCodeGeneratorFeatureEnabled()) {
- return GenerateQrCodeUsingRust(in, min_version);
- }
-
std::vector<Segment> segments;
const QRVersionInfo* version_info = nullptr;

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#define IDC_LACROS_DATA_MIGRATION 40265
#endif

@@ -461,7 +451,7 @@
@@ -463,7 +453,7 @@
#define IDC_MEDIA_ROUTER_TOGGLE_MEDIA_REMOTING 51208

// Context menu items for media toolbar button
Expand All @@ -55,7 +55,7 @@
#define IDC_MEDIA_TOOLBAR_CONTEXT_REPORT_CAST_ISSUE 51209
#endif
#define IDC_MEDIA_TOOLBAR_CONTEXT_SHOW_OTHER_SESSIONS 51210
@@ -495,7 +485,7 @@
@@ -500,7 +490,7 @@
#define IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS 52411
#define IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_TOGGLE_ONCE 52412

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -873,7 +873,7 @@ def _GnBinary():
@@ -880,7 +880,7 @@ def _GnBinary():
elif sys.platform == 'darwin':
subdir = 'mac'
elif sys.platform == 'win32':
Expand Down
Loading

0 comments on commit 18f4f4d

Please sign in to comment.