mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
Remove patches/pending_relocate
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
description: GCC ICE with optimized version
|
||||
author: Riku Voipio
|
||||
bug-debian: http://bugs.debian.org/901290
|
||||
|
||||
--- a/third_party/skia/third_party/skcms/skcms.gni
|
||||
+++ b/third_party/skia/third_party/skcms/skcms.gni
|
||||
@@ -3,6 +3,10 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
+if ((current_cpu == "arm64" || current_cpu == "arm") && !is_clang) {
|
||||
+ defines = [ "SKCMS_PORTABLE=1" ]
|
||||
+}
|
||||
+
|
||||
skcms_sources = [
|
||||
"skcms.cc",
|
||||
"skcms.h",
|
||||
@@ -1,18 +0,0 @@
|
||||
description: search for master_preferences in /usr/share/chromium
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
+++ b/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
@@ -18,11 +18,7 @@ bool IsOrganicFirstRun() {
|
||||
}
|
||||
|
||||
base::FilePath MasterPrefsPath() {
|
||||
- // The standard location of the master prefs is next to the chrome binary.
|
||||
- base::FilePath master_prefs;
|
||||
- if (!base::PathService::Get(base::DIR_EXE, &master_prefs))
|
||||
- return base::FilePath();
|
||||
- return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
|
||||
+ return base::FilePath("/etc/chromium/master_preferences");
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
@@ -1,24 +0,0 @@
|
||||
description: debian specific instructions when no working sandbox is available
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/services/service_manager/zygote/host/zygote_host_impl_linux.cc
|
||||
+++ b/services/service_manager/zygote/host/zygote_host_impl_linux.cc
|
||||
@@ -113,14 +113,13 @@ void ZygoteHostImpl::Init(const base::Co
|
||||
// root.
|
||||
use_suid_sandbox_for_adj_oom_score_ = use_suid_sandbox_;
|
||||
} else {
|
||||
- LOG(FATAL)
|
||||
- << "No usable sandbox! Update your kernel or see "
|
||||
- "https://chromium.googlesource.com/chromium/src/+/master/"
|
||||
- "docs/linux_suid_sandbox_development.md for more information on "
|
||||
- "developing with the SUID sandbox. "
|
||||
+ LOG(ERROR)
|
||||
+ << "No usable sandbox! If this is a Debian system, please install the "
|
||||
+ "chromium-sandbox package to solve this problem. "
|
||||
"If you want to live dangerously and need an immediate workaround, "
|
||||
"you can try using --"
|
||||
<< service_manager::switches::kNoSandbox << ".";
|
||||
+ exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
description: avoid building chromium's installer, which is unused in debian
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -66,7 +66,6 @@ group("gn_all") {
|
||||
":gn_visibility",
|
||||
"//base:base_perftests",
|
||||
"//base:base_unittests",
|
||||
- "//chrome/installer",
|
||||
"//net:net_unittests",
|
||||
"//skia:skia_unittests",
|
||||
"//sql:sql_unittests",
|
||||
@@ -1,14 +0,0 @@
|
||||
description: disable support for openh264, will be added later
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/webrtc/webrtc.gni
|
||||
+++ b/third_party/webrtc/webrtc.gni
|
||||
@@ -153,7 +153,7 @@ declare_args() {
|
||||
# H.264, compilation succeeds but |H264DecoderImpl| fails to initialize.
|
||||
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
|
||||
# http://www.openh264.org, https://www.ffmpeg.org/
|
||||
- rtc_use_h264 = proprietary_codecs && !is_android && !is_ios
|
||||
+ rtc_use_h264 = false
|
||||
|
||||
# By default, use normal platform audio support or dummy audio, but don't
|
||||
# use file-based audio playout and record.
|
||||
@@ -1,14 +0,0 @@
|
||||
description: avoid building the swiftshader library
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -449,7 +449,7 @@ group("gn_all") {
|
||||
]
|
||||
}
|
||||
|
||||
- if ((is_win || is_mac || is_linux || is_chromeos || is_fuchsia) &&
|
||||
+ if (false &&
|
||||
(target_cpu == "x86" || target_cpu == "x64")) {
|
||||
deps += [ "//third_party/swiftshader" ]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
description: use __alignof__ since as of gcc8 alignof returns 4 != 8 bytes on i386
|
||||
origin: https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-66.0.3359.170-gcc8-alignof.patch
|
||||
author: Fedora chromium maintainers
|
||||
|
||||
--- a/mojo/public/c/system/macros.h
|
||||
+++ b/mojo/public/c/system/macros.h
|
||||
@@ -27,9 +27,7 @@
|
||||
(sizeof(void*) == 4 ? 32 : 0)
|
||||
|
||||
// Like the C++11 |alignof| operator.
|
||||
-#if __cplusplus >= 201103L
|
||||
-#define MOJO_ALIGNOF(type) alignof(type)
|
||||
-#elif defined(__GNUC__)
|
||||
+#if defined(__GNUC__)
|
||||
#define MOJO_ALIGNOF(type) __alignof__(type)
|
||||
#elif defined(_MSC_VER)
|
||||
// The use of |sizeof| is to work around a bug in MSVC 2010 (see
|
||||
@@ -1,14 +0,0 @@
|
||||
description: some libraries fail to link when --as-needed is set
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -396,7 +396,7 @@ config("compiler") {
|
||||
if (!using_sanitizer) {
|
||||
ldflags += [
|
||||
"-Wl,-z,defs",
|
||||
- "-Wl,--as-needed",
|
||||
+ "-Wl,--no-as-needed",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
description: arraysize macro fails for zero length array, add one character
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/blink/renderer/platform/text/character_property_data.h
|
||||
+++ b/third_party/blink/renderer/platform/text/character_property_data.h
|
||||
@@ -244,10 +244,10 @@ static const UChar32 kIsHangulRanges[] =
|
||||
0xD7B0, 0xD7FF,
|
||||
// Halfwidth Hangul Jamo
|
||||
// https://www.unicode.org/charts/nameslist/c_FF00.html
|
||||
- 0xFFA0, 0xFFDC,
|
||||
+ 0xFFA0, 0xFFDB,
|
||||
};
|
||||
|
||||
-static const UChar32 kIsHangulArray[] = {};
|
||||
+static const UChar32 kIsHangulArray[] = {0xFFDC};
|
||||
|
||||
#if !defined(USING_SYSTEM_ICU)
|
||||
// Freezed trie tree, see character_property_data_generator.cc.
|
||||
@@ -1,15 +0,0 @@
|
||||
description: 10 seconds may not be enough, so don't kill the gpu process until 20.
|
||||
author: Chad MILLER <chad.miller@canonical.com>
|
||||
bug-debian: http://bugs.debian.org/781940
|
||||
|
||||
--- a/gpu/ipc/service/gpu_watchdog_thread.cc
|
||||
+++ b/gpu/ipc/service/gpu_watchdog_thread.cc
|
||||
@@ -44,7 +44,7 @@ const int kGpuTimeout = 30000;
|
||||
// infected machines.
|
||||
const int kGpuTimeout = 15000;
|
||||
#else
|
||||
-const int kGpuTimeout = 10000;
|
||||
+const int kGpuTimeout = 20000;
|
||||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
@@ -1,70 +0,0 @@
|
||||
description: fix mojo layout test build error
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/content/shell/BUILD.gn
|
||||
+++ b/content/shell/BUILD.gn
|
||||
@@ -125,8 +125,6 @@ jumbo_static_library("content_shell_lib"
|
||||
"browser/layout_test/layout_test_url_request_context_getter.h",
|
||||
"browser/layout_test/leak_detector.cc",
|
||||
"browser/layout_test/leak_detector.h",
|
||||
- "browser/layout_test/mojo_layout_test_helper.cc",
|
||||
- "browser/layout_test/mojo_layout_test_helper.h",
|
||||
"browser/layout_test/secondary_test_window_observer.cc",
|
||||
"browser/layout_test/secondary_test_window_observer.h",
|
||||
"browser/layout_test/test_info_extractor.cc",
|
||||
@@ -289,9 +287,7 @@ jumbo_static_library("content_shell_lib"
|
||||
"//content/public/common",
|
||||
"//content/public/common:service_names",
|
||||
"//content/shell/test_runner:test_runner",
|
||||
- "//content/test:content_test_mojo_bindings",
|
||||
"//content/test:layouttest_support",
|
||||
- "//content/test:mojo_layouttest_bindings",
|
||||
"//content/test:test_support",
|
||||
"//device/bluetooth",
|
||||
"//device/bluetooth:fake_bluetooth",
|
||||
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
||||
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "content/shell/browser/layout_test/layout_test_browser_context.h"
|
||||
#include "content/shell/browser/layout_test/layout_test_browser_main_parts.h"
|
||||
#include "content/shell/browser/layout_test/layout_test_message_filter.h"
|
||||
-#include "content/shell/browser/layout_test/mojo_layout_test_helper.h"
|
||||
#include "content/shell/browser/shell_browser_context.h"
|
||||
#include "content/shell/common/layout_test/layout_test_switches.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
@@ -47,11 +46,6 @@ namespace {
|
||||
|
||||
LayoutTestContentBrowserClient* g_layout_test_browser_client;
|
||||
|
||||
-void BindLayoutTestHelper(mojom::MojoLayoutTestHelperRequest request,
|
||||
- RenderFrameHost* render_frame_host) {
|
||||
- MojoLayoutTestHelper::Create(std::move(request));
|
||||
-}
|
||||
-
|
||||
class TestOverlayWindow : public OverlayWindow {
|
||||
public:
|
||||
TestOverlayWindow() = default;
|
||||
@@ -157,7 +151,6 @@ void LayoutTestContentBrowserClient::Exp
|
||||
&LayoutTestContentBrowserClient::CreateFakeBluetoothChooser,
|
||||
base::Unretained(this)),
|
||||
ui_task_runner);
|
||||
- registry->AddInterface(base::BindRepeating(&MojoLayoutTestHelper::Create));
|
||||
registry->AddInterface(
|
||||
base::BindRepeating(&LayoutTestContentBrowserClient::BindClipboardHost,
|
||||
base::Unretained(this)),
|
||||
@@ -314,7 +307,6 @@ bool LayoutTestContentBrowserClient::Can
|
||||
void LayoutTestContentBrowserClient::ExposeInterfacesToFrame(
|
||||
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
|
||||
registry) {
|
||||
- registry->AddInterface(base::Bind(&BindLayoutTestHelper));
|
||||
}
|
||||
|
||||
scoped_refptr<LoginDelegate>
|
||||
--- a/chromecast/common/mojom/typemaps.gni
|
||||
+++ b/chromecast/common/mojom/typemaps.gni
|
||||
@@ -2,4 +2,4 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
-typemaps = [ "//chromecast/common/mojom/multiroom.typemap" ]
|
||||
+typemaps = [ ]
|
||||
@@ -1,17 +0,0 @@
|
||||
description: jumbo build has trouble with these namespaces
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.h
|
||||
+++ b/chrome/browser/apps/platform_apps/api/sync_file_system/extension_sync_event_observer.h
|
||||
@@ -81,8 +81,10 @@ class ExtensionSyncEventObserver : publi
|
||||
} // namespace api
|
||||
} // namespace chrome_apps
|
||||
|
||||
+namespace extensions {
|
||||
template <>
|
||||
-void extensions::BrowserContextKeyedAPIFactory<
|
||||
+void BrowserContextKeyedAPIFactory<
|
||||
chrome_apps::api::ExtensionSyncEventObserver>::DeclareFactoryDependencies();
|
||||
+}
|
||||
|
||||
#endif // CHROME_BROWSER_APPS_PLATFORM_APPS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSERVER_H_
|
||||
@@ -1,18 +0,0 @@
|
||||
description: try alternative locations for libwidevinecdm.so
|
||||
- $HOME/.local/lib/ (snap-friendly, see https://launchpad.net/bugs/1738149)
|
||||
author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||
|
||||
--- a/chrome/common/chrome_paths.cc
|
||||
+++ b/chrome/common/chrome_paths.cc
|
||||
@@ -375,6 +375,11 @@ bool PathProvider(int key, base::FilePat
|
||||
// TODO(crbug.com/663554): Remove this after component updated CDM is
|
||||
// supported on Linux and ChromeOS.
|
||||
case chrome::FILE_WIDEVINE_CDM:
|
||||
+ base::PathService::Get(base::DIR_HOME, &cur);
|
||||
+ cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdm.so"));
|
||||
+ if (base::PathExists(cur)) {
|
||||
+ break;
|
||||
+ }
|
||||
if (!GetComponentDirectory(&cur))
|
||||
return false;
|
||||
cur =
|
||||
@@ -1,13 +0,0 @@
|
||||
description: avoid chromium's embedded C++ library when bootstrapping gn
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/tools/gn/build/gen.py
|
||||
+++ b/tools/gn/build/gen.py
|
||||
@@ -320,7 +320,6 @@ def WriteGNNinja(path, platform, host, o
|
||||
|
||||
if platform.is_linux():
|
||||
ldflags.extend([
|
||||
- '-static-libstdc++',
|
||||
'-Wl,--as-needed',
|
||||
])
|
||||
# This is needed by libc++.
|
||||
@@ -1,238 +0,0 @@
|
||||
description: use icu for UTF8 conversions (eliminates ConvertUTF embedded code copy)
|
||||
bug-debian: http://bugs.debian.org/900596
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/breakpad/breakpad/src/common/string_conversion.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/common/string_conversion.cc
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
-#include "common/convert_UTF.h"
|
||||
+#include <unicode/ustring.h>
|
||||
#include "common/scoped_ptr.h"
|
||||
#include "common/string_conversion.h"
|
||||
#include "common/using_std_string.h"
|
||||
@@ -38,78 +38,24 @@ namespace google_breakpad {
|
||||
|
||||
using std::vector;
|
||||
|
||||
-void UTF8ToUTF16(const char *in, vector<uint16_t> *out) {
|
||||
- size_t source_length = strlen(in);
|
||||
- const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(in);
|
||||
- const UTF8 *source_end_ptr = source_ptr + source_length;
|
||||
- // Erase the contents and zero fill to the expected size
|
||||
- out->clear();
|
||||
- out->insert(out->begin(), source_length, 0);
|
||||
- uint16_t *target_ptr = &(*out)[0];
|
||||
- uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t);
|
||||
- ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr,
|
||||
- &target_ptr, target_end_ptr,
|
||||
- strictConversion);
|
||||
+int UTF8ToUTF16Char(const char *in, int in_length, UChar out[2]) {
|
||||
+ int dest_length = 0;
|
||||
+ UErrorCode result = U_ZERO_ERROR;
|
||||
+ u_strFromUTF8(out, 2, &dest_length, in, in_length, &result);
|
||||
|
||||
- // Resize to be the size of the # of converted characters + NULL
|
||||
- out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0);
|
||||
-}
|
||||
-
|
||||
-int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]) {
|
||||
- const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(in);
|
||||
- const UTF8 *source_end_ptr = source_ptr + 1;
|
||||
- uint16_t *target_ptr = out;
|
||||
- uint16_t *target_end_ptr = target_ptr + 2;
|
||||
- out[0] = out[1] = 0;
|
||||
-
|
||||
- // Process one character at a time
|
||||
- while (1) {
|
||||
- ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr,
|
||||
- &target_ptr, target_end_ptr,
|
||||
- strictConversion);
|
||||
-
|
||||
- if (result == conversionOK)
|
||||
- return static_cast<int>(source_ptr - reinterpret_cast<const UTF8 *>(in));
|
||||
-
|
||||
- // Add another character to the input stream and try again
|
||||
- source_ptr = reinterpret_cast<const UTF8 *>(in);
|
||||
- ++source_end_ptr;
|
||||
-
|
||||
- if (source_end_ptr > reinterpret_cast<const UTF8 *>(in) + in_length)
|
||||
- break;
|
||||
+ if (U_FAILURE(result)) {
|
||||
+ out[0] = out[1] = 0;
|
||||
}
|
||||
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-void UTF32ToUTF16(const wchar_t *in, vector<uint16_t> *out) {
|
||||
- size_t source_length = wcslen(in);
|
||||
- const UTF32 *source_ptr = reinterpret_cast<const UTF32 *>(in);
|
||||
- const UTF32 *source_end_ptr = source_ptr + source_length;
|
||||
- // Erase the contents and zero fill to the expected size
|
||||
- out->clear();
|
||||
- out->insert(out->begin(), source_length, 0);
|
||||
- uint16_t *target_ptr = &(*out)[0];
|
||||
- uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t);
|
||||
- ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr,
|
||||
- &target_ptr, target_end_ptr,
|
||||
- strictConversion);
|
||||
-
|
||||
- // Resize to be the size of the # of converted characters + NULL
|
||||
- out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0);
|
||||
+ return dest_length;
|
||||
}
|
||||
|
||||
-void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]) {
|
||||
- const UTF32 *source_ptr = reinterpret_cast<const UTF32 *>(&in);
|
||||
- const UTF32 *source_end_ptr = source_ptr + 1;
|
||||
- uint16_t *target_ptr = out;
|
||||
- uint16_t *target_end_ptr = target_ptr + 2;
|
||||
- out[0] = out[1] = 0;
|
||||
- ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr,
|
||||
- &target_ptr, target_end_ptr,
|
||||
- strictConversion);
|
||||
+void UTF32ToUTF16Char(wchar_t in, UChar out[2]) {
|
||||
+ int32_t dest_length = 0;
|
||||
+ UErrorCode result = U_ZERO_ERROR;
|
||||
+ u_strFromWCS(out, 2, &dest_length, &in, 1, &result);
|
||||
|
||||
- if (result != conversionOK) {
|
||||
+ if (U_FAILURE(result)) {
|
||||
out[0] = out[1] = 0;
|
||||
}
|
||||
}
|
||||
@@ -118,38 +64,4 @@ static inline uint16_t Swap(uint16_t val
|
||||
return (value >> 8) | static_cast<uint16_t>(value << 8);
|
||||
}
|
||||
|
||||
-string UTF16ToUTF8(const vector<uint16_t> &in, bool swap) {
|
||||
- const UTF16 *source_ptr = &in[0];
|
||||
- scoped_array<uint16_t> source_buffer;
|
||||
-
|
||||
- // If we're to swap, we need to make a local copy and swap each byte pair
|
||||
- if (swap) {
|
||||
- int idx = 0;
|
||||
- source_buffer.reset(new uint16_t[in.size()]);
|
||||
- UTF16 *source_buffer_ptr = source_buffer.get();
|
||||
- for (vector<uint16_t>::const_iterator it = in.begin();
|
||||
- it != in.end(); ++it, ++idx)
|
||||
- source_buffer_ptr[idx] = Swap(*it);
|
||||
-
|
||||
- source_ptr = source_buffer.get();
|
||||
- }
|
||||
-
|
||||
- // The maximum expansion would be 4x the size of the input string.
|
||||
- const UTF16 *source_end_ptr = source_ptr + in.size();
|
||||
- size_t target_capacity = in.size() * 4;
|
||||
- scoped_array<UTF8> target_buffer(new UTF8[target_capacity]);
|
||||
- UTF8 *target_ptr = target_buffer.get();
|
||||
- UTF8 *target_end_ptr = target_ptr + target_capacity;
|
||||
- ConversionResult result = ConvertUTF16toUTF8(&source_ptr, source_end_ptr,
|
||||
- &target_ptr, target_end_ptr,
|
||||
- strictConversion);
|
||||
-
|
||||
- if (result == conversionOK) {
|
||||
- const char *targetPtr = reinterpret_cast<const char *>(target_buffer.get());
|
||||
- return targetPtr;
|
||||
- }
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
} // namespace google_breakpad
|
||||
--- a/third_party/breakpad/breakpad/src/common/string_conversion.h
|
||||
+++ b/third_party/breakpad/breakpad/src/common/string_conversion.h
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+#include <unicode/umachine.h>
|
||||
#include "common/using_std_string.h"
|
||||
#include "google_breakpad/common/breakpad_types.h"
|
||||
|
||||
@@ -42,26 +43,15 @@ namespace google_breakpad {
|
||||
|
||||
using std::vector;
|
||||
|
||||
-// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the
|
||||
-// conversion failed, |out| will be zero length.
|
||||
-void UTF8ToUTF16(const char *in, vector<uint16_t> *out);
|
||||
-
|
||||
// Convert at least one character (up to a maximum of |in_length|) from |in|
|
||||
// to UTF-16 into |out|. Return the number of characters consumed from |in|.
|
||||
// Any unused characters in |out| will be initialized to 0. No memory will
|
||||
// be allocated by this routine.
|
||||
-int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]);
|
||||
-
|
||||
-// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the
|
||||
-// conversion failed, |out| will be zero length.
|
||||
-void UTF32ToUTF16(const wchar_t *in, vector<uint16_t> *out);
|
||||
+int UTF8ToUTF16Char(const char *in, int in_length, UChar out[2]);
|
||||
|
||||
// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be
|
||||
// initialized to 0. No memory will be allocated by this routine.
|
||||
-void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]);
|
||||
-
|
||||
-// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting.
|
||||
-string UTF16ToUTF8(const vector<uint16_t> &in, bool swap);
|
||||
+void UTF32ToUTF16Char(wchar_t in, UChar out[2]);
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
--- a/third_party/breakpad/BUILD.gn
|
||||
+++ b/third_party/breakpad/BUILD.gn
|
||||
@@ -594,8 +594,6 @@ if (is_linux || is_android) {
|
||||
"breakpad/src/client/minidump_file_writer-inl.h",
|
||||
"breakpad/src/client/minidump_file_writer.cc",
|
||||
"breakpad/src/client/minidump_file_writer.h",
|
||||
- "breakpad/src/common/convert_UTF.c",
|
||||
- "breakpad/src/common/convert_UTF.h",
|
||||
"breakpad/src/common/linux/elf_core_dump.cc",
|
||||
"breakpad/src/common/linux/elf_core_dump.h",
|
||||
"breakpad/src/common/linux/elfutils.cc",
|
||||
--- a/third_party/breakpad/breakpad/src/client/minidump_file_writer.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/minidump_file_writer.cc
|
||||
@@ -149,11 +149,11 @@ bool MinidumpFileWriter::CopyStringToMDS
|
||||
unsigned int length,
|
||||
TypedMDRVA<MDString> *mdstring) {
|
||||
bool result = true;
|
||||
- if (sizeof(wchar_t) == sizeof(uint16_t)) {
|
||||
+ if (sizeof(wchar_t) == sizeof(UChar)) {
|
||||
// Shortcut if wchar_t is the same size as MDString's buffer
|
||||
result = mdstring->Copy(str, mdstring->get()->length);
|
||||
} else {
|
||||
- uint16_t out[2];
|
||||
+ UChar out[2];
|
||||
int out_idx = 0;
|
||||
|
||||
// Copy the string character by character
|
||||
@@ -170,7 +170,7 @@ bool MinidumpFileWriter::CopyStringToMDS
|
||||
// zero, but the second one may be zero, depending on the conversion from
|
||||
// UTF-32.
|
||||
int out_count = out[1] ? 2 : 1;
|
||||
- size_t out_size = sizeof(uint16_t) * out_count;
|
||||
+ size_t out_size = sizeof(UChar) * out_count;
|
||||
result = mdstring->CopyIndexAfterObject(out_idx, out, out_size);
|
||||
out_idx += out_count;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ bool MinidumpFileWriter::CopyStringToMDS
|
||||
unsigned int length,
|
||||
TypedMDRVA<MDString> *mdstring) {
|
||||
bool result = true;
|
||||
- uint16_t out[2];
|
||||
+ UChar out[2];
|
||||
int out_idx = 0;
|
||||
|
||||
// Copy the string character by character
|
||||
@@ -197,7 +197,7 @@ bool MinidumpFileWriter::CopyStringToMDS
|
||||
|
||||
// Append the one or two UTF-16 characters
|
||||
int out_count = out[1] ? 2 : 1;
|
||||
- size_t out_size = sizeof(uint16_t) * out_count;
|
||||
+ size_t out_size = sizeof(UChar) * out_count;
|
||||
result = mdstring->CopyIndexAfterObject(out_idx, out, out_size);
|
||||
out_idx += out_count;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
description: use system libevent
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/webrtc/rtc_base/task_queue_libevent.cc
|
||||
+++ b/third_party/webrtc/rtc_base/task_queue_libevent.cc
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
-#include "base/third_party/libevent/event.h"
|
||||
+#include <event.h>
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/criticalsection.h"
|
||||
#include "rtc_base/logging.h"
|
||||
--- a/base/message_loop/message_pump_libevent.cc
|
||||
+++ b/base/message_loop/message_pump_libevent.cc
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
-#include "base/third_party/libevent/event.h"
|
||||
+#include <event.h>
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
--- a/tools/gn/build/gen.py
|
||||
+++ b/tools/gn/build/gen.py
|
||||
@@ -326,6 +326,7 @@ def WriteGNNinja(path, platform, host, o
|
||||
libs.append('-ldl')
|
||||
# Additional system libraries that are used.
|
||||
libs.append('-lnspr4')
|
||||
+ libs.append('-levent')
|
||||
elif platform.is_darwin():
|
||||
min_mac_version_flag = '-mmacosx-version-min=10.9'
|
||||
cflags.append(min_mac_version_flag)
|
||||
@@ -1,79 +0,0 @@
|
||||
description: ffmpeg decoders before version 4.0 require explicit initialization
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
origin: chromium 66 authors
|
||||
|
||||
--- a/media/filters/ffmpeg_audio_decoder.cc
|
||||
+++ b/media/filters/ffmpeg_audio_decoder.cc
|
||||
@@ -80,6 +80,8 @@ void FFmpegAudioDecoder::Initialize(
|
||||
return;
|
||||
}
|
||||
|
||||
+ FFmpegGlue::InitializeFFmpeg();
|
||||
+
|
||||
if (!ConfigureDecoder(config)) {
|
||||
av_sample_format_ = 0;
|
||||
bound_init_cb.Run(false);
|
||||
--- a/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc
|
||||
+++ b/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc
|
||||
@@ -152,6 +152,7 @@ void ConvertCdmKeysInfo(const media::Cdm
|
||||
void INITIALIZE_CDM_MODULE() {
|
||||
DVLOG(1) << __func__;
|
||||
media::InitializeMediaLibrary();
|
||||
+ av_register_all();
|
||||
g_is_cdm_module_initialized = true;
|
||||
}
|
||||
|
||||
--- a/media/filters/ffmpeg_glue.cc
|
||||
+++ b/media/filters/ffmpeg_glue.cc
|
||||
@@ -63,7 +63,13 @@ static int64_t AVIOSeekOperation(void* o
|
||||
return new_offset;
|
||||
}
|
||||
|
||||
+void FFmpegGlue::InitializeFFmpeg() {
|
||||
+ av_register_all();
|
||||
+}
|
||||
+
|
||||
FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
|
||||
+ InitializeFFmpeg();
|
||||
+
|
||||
// Initialize an AVIOContext using our custom read and seek operations. Don't
|
||||
// keep pointers to the buffer since FFmpeg may reallocate it on the fly. It
|
||||
// will be cleaned up
|
||||
--- a/media/filters/ffmpeg_glue.h
|
||||
+++ b/media/filters/ffmpeg_glue.h
|
||||
@@ -59,6 +59,8 @@ class MEDIA_EXPORT FFmpegURLProtocol {
|
||||
|
||||
class MEDIA_EXPORT FFmpegGlue {
|
||||
public:
|
||||
+ static void InitializeFFmpeg();
|
||||
+
|
||||
// See file documentation for usage. |protocol| must outlive FFmpegGlue.
|
||||
explicit FFmpegGlue(FFmpegURLProtocol* protocol);
|
||||
~FFmpegGlue();
|
||||
--- a/media/filters/ffmpeg_video_decoder.cc
|
||||
+++ b/media/filters/ffmpeg_video_decoder.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "media/base/video_util.h"
|
||||
#include "media/ffmpeg/ffmpeg_common.h"
|
||||
#include "media/ffmpeg/ffmpeg_decoding_loop.h"
|
||||
+#include "media/filters/ffmpeg_glue.h"
|
||||
|
||||
namespace media {
|
||||
|
||||
@@ -80,6 +81,7 @@ static void ReleaseVideoBufferImpl(void*
|
||||
|
||||
// static
|
||||
bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
|
||||
+ FFmpegGlue::InitializeFFmpeg();
|
||||
return avcodec_find_decoder(VideoCodecToCodecID(codec)) != nullptr;
|
||||
}
|
||||
|
||||
@@ -224,6 +226,8 @@ void FFmpegVideoDecoder::Initialize(
|
||||
return;
|
||||
}
|
||||
|
||||
+ FFmpegGlue::InitializeFFmpeg();
|
||||
+
|
||||
if (!ConfigureDecoder(config, low_delay)) {
|
||||
bound_init_cb.Run(false);
|
||||
return;
|
||||
@@ -1,13 +0,0 @@
|
||||
description: backwards compatibility for older versions of icu
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -11,7 +11,6 @@ import("//build/config/ui.gni")
|
||||
import("//net/features.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
-import("//third_party/icu/config.gni")
|
||||
import("//third_party/protobuf/proto_library.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
import("//url/features.gni")
|
||||
@@ -1,21 +0,0 @@
|
||||
description: use system jpeg library
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -692,7 +692,6 @@ group("gn_all") {
|
||||
"//third_party/angle:libEGL",
|
||||
"//third_party/angle:libGLESv2",
|
||||
"//third_party/leveldatabase:leveldb_test_targets",
|
||||
- "//third_party/libjpeg_turbo:simd",
|
||||
"//third_party/opus:opus_compare",
|
||||
"//third_party/opus:opus_demo",
|
||||
"//third_party/opus:test_opus_api",
|
||||
@@ -714,7 +713,6 @@ group("gn_all") {
|
||||
if (enable_nacl) {
|
||||
deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ]
|
||||
}
|
||||
- deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
|
||||
}
|
||||
if (is_linux && current_toolchain == host_toolchain) {
|
||||
deps += [ "//v8:v8_shell" ]
|
||||
@@ -1,45 +0,0 @@
|
||||
description: use system jsoncpp
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/jsoncpp/BUILD.gn
|
||||
+++ b/third_party/jsoncpp/BUILD.gn
|
||||
@@ -2,34 +2,12 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
-config("jsoncpp_config") {
|
||||
- include_dirs = [
|
||||
- "overrides/include",
|
||||
- "source/include",
|
||||
- ]
|
||||
-}
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
|
||||
-source_set("jsoncpp") {
|
||||
- sources = [
|
||||
- "overrides/include/json/value.h",
|
||||
- "overrides/src/lib_json/json_reader.cpp",
|
||||
- "overrides/src/lib_json/json_value.cpp",
|
||||
- "source/include/json/assertions.h",
|
||||
- "source/include/json/autolink.h",
|
||||
- "source/include/json/config.h",
|
||||
- "source/include/json/features.h",
|
||||
- "source/include/json/forwards.h",
|
||||
- "source/include/json/json.h",
|
||||
- "source/include/json/reader.h",
|
||||
- "source/include/json/writer.h",
|
||||
- "source/src/lib_json/json_batchallocator.h",
|
||||
- "source/src/lib_json/json_tool.h",
|
||||
- "source/src/lib_json/json_writer.cpp",
|
||||
- ]
|
||||
+pkg_config("jsoncpp_config") {
|
||||
+ packages= [ "jsoncpp" ]
|
||||
+}
|
||||
|
||||
+group("jsoncpp") {
|
||||
public_configs = [ ":jsoncpp_config" ]
|
||||
-
|
||||
- defines = [ "JSON_USE_EXCEPTION=0" ]
|
||||
-
|
||||
- include_dirs = [ "source/src/lib_json" ]
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
description: use system nspr library
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/base/time/pr_time_unittest.cc
|
||||
+++ b/base/time/pr_time_unittest.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
-#include "base/third_party/nspr/prtime.h"
|
||||
+#include <nspr/prtime.h>
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
--- a/base/time/time.cc
|
||||
+++ b/base/time/time.cc
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "base/macros.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
-#include "base/third_party/nspr/prtime.h"
|
||||
+#include <nspr/prtime.h>
|
||||
#include "base/time/time_override.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -81,6 +81,9 @@ config("base_flags") {
|
||||
"-Wglobal-constructors",
|
||||
]
|
||||
}
|
||||
+ ldflags = [
|
||||
+ "-lnspr4",
|
||||
+ ]
|
||||
}
|
||||
|
||||
config("base_implementation") {
|
||||
@@ -829,8 +832,6 @@ jumbo_component("base") {
|
||||
"third_party/dmg_fp/g_fmt.cc",
|
||||
"third_party/icu/icu_utf.cc",
|
||||
"third_party/icu/icu_utf.h",
|
||||
- "third_party/nspr/prtime.cc",
|
||||
- "third_party/nspr/prtime.h",
|
||||
"third_party/superfasthash/superfasthash.c",
|
||||
"thread_annotations.h",
|
||||
"threading/platform_thread.cc",
|
||||
--- a/tools/gn/build/gen.py
|
||||
+++ b/tools/gn/build/gen.py
|
||||
@@ -324,6 +324,8 @@ def WriteGNNinja(path, platform, host, o
|
||||
])
|
||||
# This is needed by libc++.
|
||||
libs.append('-ldl')
|
||||
+ # Additional system libraries that are used.
|
||||
+ libs.append('-lnspr4')
|
||||
elif platform.is_darwin():
|
||||
min_mac_version_flag = '-mmacosx-version-min=10.9'
|
||||
cflags.append(min_mac_version_flag)
|
||||
@@ -1,118 +0,0 @@
|
||||
description: build using system openjpeg
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/pdfium/third_party/BUILD.gn
|
||||
+++ b/third_party/pdfium/third_party/BUILD.gn
|
||||
@@ -394,39 +394,11 @@ config("fx_libopenjpeg_warnings") {
|
||||
}
|
||||
}
|
||||
|
||||
-source_set("fx_libopenjpeg") {
|
||||
- configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
- configs += [
|
||||
- "//build/config/compiler:no_chromium_code",
|
||||
- "//build/config/sanitizers:cfi_icall_generalize_pointers",
|
||||
- ":pdfium_third_party_config",
|
||||
-
|
||||
- # Must be after no_chromium_code for warning flags to be ordered correctly.
|
||||
- ":fx_libopenjpeg_warnings",
|
||||
- ]
|
||||
- sources = [
|
||||
- "libopenjpeg20/bio.c",
|
||||
- "libopenjpeg20/cio.c",
|
||||
- "libopenjpeg20/dwt.c",
|
||||
- "libopenjpeg20/event.c",
|
||||
- "libopenjpeg20/function_list.c",
|
||||
- "libopenjpeg20/image.c",
|
||||
- "libopenjpeg20/invert.c",
|
||||
- "libopenjpeg20/j2k.c",
|
||||
- "libopenjpeg20/jp2.c",
|
||||
- "libopenjpeg20/mct.c",
|
||||
- "libopenjpeg20/mqc.c",
|
||||
- "libopenjpeg20/openjpeg.c",
|
||||
- "libopenjpeg20/opj_clock.c",
|
||||
- "libopenjpeg20/pi.c",
|
||||
- "libopenjpeg20/sparse_array.c",
|
||||
- "libopenjpeg20/sparse_array.h",
|
||||
- "libopenjpeg20/t1.c",
|
||||
- "libopenjpeg20/t2.c",
|
||||
- "libopenjpeg20/tcd.c",
|
||||
- "libopenjpeg20/tgt.c",
|
||||
- "libopenjpeg20/thread.c",
|
||||
- ]
|
||||
+pkg_config("libopenjpeg_from_pkgconfig") {
|
||||
+ packages = [ "libopenjp2" ]
|
||||
+}
|
||||
+group("fx_libopenjpeg") {
|
||||
+ public_configs = [ ":libopenjpeg_from_pkgconfig" ]
|
||||
}
|
||||
|
||||
config("system_libpng_config") {
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/codec_int.h
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/codec_int.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include "core/fxcodec/jbig2/JBig2_Context.h"
|
||||
-#include "third_party/libopenjpeg20/openjpeg.h"
|
||||
+#include <openjpeg-2.3/openjpeg.h>
|
||||
|
||||
class CPDF_ColorSpace;
|
||||
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "core/fxcrt/fx_safe_types.h"
|
||||
#include "third_party/base/ptr_util.h"
|
||||
#include "third_party/base/stl_util.h"
|
||||
-#include "third_party/libopenjpeg20/openjpeg.h"
|
||||
-#include "third_party/libopenjpeg20/opj_malloc.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -513,7 +511,6 @@ bool CJPX_Decoder::Init(pdfium::span<con
|
||||
return false;
|
||||
|
||||
m_Image = pTempImage;
|
||||
- m_Image->pdfium_use_colorspace = !!m_ColorSpace;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -550,7 +547,7 @@ bool CJPX_Decoder::StartDecode() {
|
||||
// TODO(palmer): Using |opj_free| here resolves the crash described in
|
||||
// https://crbug.com/737033, but ultimately we need to harmonize the
|
||||
// memory allocation strategy across OpenJPEG and its PDFium callers.
|
||||
- opj_free(m_Image->icc_profile_buf);
|
||||
+ free(m_Image->icc_profile_buf);
|
||||
m_Image->icc_profile_buf = nullptr;
|
||||
m_Image->icc_profile_len = 0;
|
||||
}
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "core/fxcodec/codec/codec_int.h"
|
||||
#include "core/fxcrt/unowned_ptr.h"
|
||||
#include "third_party/base/span.h"
|
||||
-#include "third_party/libopenjpeg20/openjpeg.h"
|
||||
+#include <openjpeg-2.3/openjpeg.h>
|
||||
|
||||
class CPDF_ColorSpace;
|
||||
|
||||
--- a/third_party/pdfium/BUILD.gn
|
||||
+++ b/third_party/pdfium/BUILD.gn
|
||||
@@ -20,7 +20,6 @@ config("pdfium_common_config") {
|
||||
ldflags = []
|
||||
include_dirs = [ "." ]
|
||||
defines = [
|
||||
- "OPJ_STATIC",
|
||||
"PNG_PREFIX",
|
||||
"PNG_USE_READ_MACROS",
|
||||
]
|
||||
@@ -77,7 +76,6 @@ config("pdfium_core_config") {
|
||||
if (is_linux) {
|
||||
if (current_cpu == "x64") {
|
||||
defines += [ "_FX_CPU_=_FX_X64_" ]
|
||||
- cflags += [ "-fPIC" ]
|
||||
} else if (current_cpu == "x86") {
|
||||
defines += [ "_FX_CPU_=_FX_X86_" ]
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
description: maintain compatibility with vpx 1.7
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/media/base/decode_capabilities.cc
|
||||
+++ b/media/base/decode_capabilities.cc
|
||||
@@ -12,8 +12,8 @@
|
||||
#include "ui/display/display_switches.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_LIBVPX)
|
||||
-#include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"
|
||||
-#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h"
|
||||
+#include <vpx/vp8dx.h>
|
||||
+#include <vpx/vpx_codec.h>
|
||||
#endif
|
||||
|
||||
namespace media {
|
||||
--- a/third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
|
||||
+++ b/third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
|
||||
@@ -17,10 +17,10 @@
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
-#include "vpx/vp8cx.h"
|
||||
-#include "vpx/vp8dx.h"
|
||||
-#include "vpx/vpx_decoder.h"
|
||||
-#include "vpx/vpx_encoder.h"
|
||||
+#include <vpx/vp8cx.h>
|
||||
+#include <vpx/vp8dx.h>
|
||||
+#include <vpx/vpx_decoder.h>
|
||||
+#include <vpx/vpx_encoder.h>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/video/color_space.h"
|
||||
@@ -631,42 +631,12 @@ int VP9EncoderImpl::InitAndSetControlSet
|
||||
inst->VP9().adaptiveQpMode ? 3 : 0);
|
||||
|
||||
vpx_codec_control(encoder_, VP9E_SET_FRAME_PARALLEL_DECODING, 0);
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_GF_TEMPORAL_REF, 0);
|
||||
|
||||
if (is_svc_) {
|
||||
vpx_codec_control(encoder_, VP9E_SET_SVC, 1);
|
||||
vpx_codec_control(encoder_, VP9E_SET_SVC_PARAMETERS, &svc_params_);
|
||||
}
|
||||
|
||||
- if (num_spatial_layers_ > 1) {
|
||||
- switch (inter_layer_pred_) {
|
||||
- case InterLayerPredMode::kOn:
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_INTER_LAYER_PRED, 0);
|
||||
- break;
|
||||
- case InterLayerPredMode::kOff:
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_INTER_LAYER_PRED, 1);
|
||||
- break;
|
||||
- case InterLayerPredMode::kOnKeyPic:
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_INTER_LAYER_PRED, 2);
|
||||
- break;
|
||||
- default:
|
||||
- RTC_NOTREACHED();
|
||||
- }
|
||||
-
|
||||
- // Configure encoder to drop entire superframe whenever it needs to drop
|
||||
- // a layer. This mode is prefered over per-layer dropping which causes
|
||||
- // quality flickering and is not compatible with RTP non-flexible mode.
|
||||
- vpx_svc_frame_drop_t svc_drop_frame;
|
||||
- memset(&svc_drop_frame, 0, sizeof(svc_drop_frame));
|
||||
- svc_drop_frame.framedrop_mode =
|
||||
- full_superframe_drop_ ? FULL_SUPERFRAME_DROP : CONSTRAINED_LAYER_DROP;
|
||||
- svc_drop_frame.max_consec_drop = std::numeric_limits<int>::max();
|
||||
- for (size_t i = 0; i < num_spatial_layers_; ++i) {
|
||||
- svc_drop_frame.framedrop_thresh[i] = config_->rc_dropframe_thresh;
|
||||
- }
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_FRAME_DROP_LAYER, &svc_drop_frame);
|
||||
- }
|
||||
-
|
||||
// Register callback for getting each spatial layer.
|
||||
vpx_codec_priv_output_cx_pkt_cb_pair_t cbp = {
|
||||
VP9EncoderImpl::EncoderOutputCodedPacketCallback,
|
||||
@@ -762,10 +732,6 @@ int VP9EncoderImpl::Encode(const VideoFr
|
||||
}
|
||||
}
|
||||
|
||||
- for (int sl_idx = 0; sl_idx < num_active_spatial_layers_; ++sl_idx) {
|
||||
- layer_id.temporal_layer_id_per_spatial[sl_idx] = layer_id.temporal_layer_id;
|
||||
- }
|
||||
-
|
||||
vpx_codec_control(encoder_, VP9E_SET_SVC_LAYER_ID, &layer_id);
|
||||
|
||||
if (requested_bitrate_allocation_) {
|
||||
@@ -854,20 +820,6 @@ int VP9EncoderImpl::Encode(const VideoFr
|
||||
flags = VPX_EFLAG_FORCE_KF;
|
||||
}
|
||||
|
||||
- if (external_ref_control_) {
|
||||
- vpx_svc_ref_frame_config_t ref_config =
|
||||
- SetReferences(force_key_frame_, layer_id.spatial_layer_id);
|
||||
-
|
||||
- if (VideoCodecMode::kScreensharing == codec_.mode) {
|
||||
- for (uint8_t sl_idx = 0; sl_idx < num_active_spatial_layers_; ++sl_idx) {
|
||||
- ref_config.duration[sl_idx] = static_cast<int64_t>(
|
||||
- 90000 / framerate_controller_[sl_idx].GetTargetRate());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- vpx_codec_control(encoder_, VP9E_SET_SVC_REF_FRAME_CONFIG, &ref_config);
|
||||
- }
|
||||
-
|
||||
first_frame_in_picture_ = true;
|
||||
|
||||
// TODO(ssilkin): Frame duration should be specified per spatial layer
|
||||
@@ -980,10 +932,8 @@ void VP9EncoderImpl::PopulateCodecSpecif
|
||||
vp9_info->num_spatial_layers = num_active_spatial_layers_;
|
||||
|
||||
vp9_info->num_ref_pics = 0;
|
||||
- if (vp9_info->flexible_mode) {
|
||||
+ if (false) {
|
||||
vp9_info->gof_idx = kNoGofIdx;
|
||||
- FillReferenceIndices(pkt, pics_since_key_, vp9_info->inter_layer_predicted,
|
||||
- vp9_info);
|
||||
} else {
|
||||
vp9_info->gof_idx =
|
||||
static_cast<uint8_t>(pics_since_key_ % gof_.num_frames_in_gof);
|
||||
@@ -1011,6 +961,7 @@ void VP9EncoderImpl::PopulateCodecSpecif
|
||||
first_frame_in_picture_ = false;
|
||||
}
|
||||
|
||||
+/*
|
||||
void VP9EncoderImpl::FillReferenceIndices(const vpx_codec_cx_pkt& pkt,
|
||||
const size_t pic_num,
|
||||
const bool inter_layer_predicted,
|
||||
@@ -1243,6 +1194,7 @@ vpx_svc_ref_frame_config_t VP9EncoderImp
|
||||
|
||||
return ref_config;
|
||||
}
|
||||
+*/
|
||||
|
||||
int VP9EncoderImpl::GetEncodedLayerFrame(const vpx_codec_cx_pkt* pkt) {
|
||||
RTC_DCHECK_EQ(pkt->kind, VPX_CODEC_CX_FRAME_PKT);
|
||||
@@ -1288,10 +1240,6 @@ int VP9EncoderImpl::GetEncodedLayerFrame
|
||||
input_image_->timestamp());
|
||||
encoded_image_.SetSpatialIndex(spatial_index);
|
||||
|
||||
- if (is_flexible_mode_) {
|
||||
- UpdateReferenceBuffers(*pkt, pics_since_key_);
|
||||
- }
|
||||
-
|
||||
TRACE_COUNTER1("webrtc", "EncodedFrameSize", encoded_image_._length);
|
||||
encoded_image_.SetTimestamp(input_image_->timestamp());
|
||||
encoded_image_.capture_time_ms_ = input_image_->render_time_ms();
|
||||
@@ -1299,10 +1247,8 @@ int VP9EncoderImpl::GetEncodedLayerFrame
|
||||
encoded_image_.content_type_ = (codec_.mode == VideoCodecMode::kScreensharing)
|
||||
? VideoContentType::SCREENSHARE
|
||||
: VideoContentType::UNSPECIFIED;
|
||||
- encoded_image_._encodedHeight =
|
||||
- pkt->data.frame.height[layer_id.spatial_layer_id];
|
||||
- encoded_image_._encodedWidth =
|
||||
- pkt->data.frame.width[layer_id.spatial_layer_id];
|
||||
+ encoded_image_._encodedHeight = raw_->d_h;
|
||||
+ encoded_image_._encodedWidth = raw_->d_w;
|
||||
encoded_image_.timing_.flags = VideoSendTiming::kInvalid;
|
||||
int qp = -1;
|
||||
vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);
|
||||
@@ -1,24 +0,0 @@
|
||||
description: use system zlib library instead of embedded lzma in courgette
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/courgette/BUILD.gn
|
||||
+++ b/courgette/BUILD.gn
|
||||
@@ -60,7 +60,6 @@ static_library("courgette_lib") {
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
- "//third_party/lzma_sdk",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
--- a/courgette/crc.cc
|
||||
+++ b/courgette/crc.cc
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
+#define COURGETTE_USE_CRC_LIB
|
||||
+
|
||||
#ifdef COURGETTE_USE_CRC_LIB
|
||||
# include "zlib.h"
|
||||
#else
|
||||
@@ -1,104 +0,0 @@
|
||||
description: fix gcc optimization follows but attribute doesn't match warnings
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/s2cellid/src/s2/util/math/vector.h
|
||||
+++ b/third_party/s2cellid/src/s2/util/math/vector.h
|
||||
@@ -185,8 +185,7 @@ class BasicVector {
|
||||
|
||||
// Euclidean norm. For integer T, correct only if Norm2 does not overflow.
|
||||
FloatType Norm() const {
|
||||
- using std::sqrt;
|
||||
- return sqrt(Norm2());
|
||||
+ return std::sqrt(Norm2());
|
||||
}
|
||||
|
||||
// Normalized vector if the norm is nonzero. Not for integer types.
|
||||
@@ -203,8 +202,7 @@ class BasicVector {
|
||||
D Sqrt() const {
|
||||
return Generate(
|
||||
[](const T& x) {
|
||||
- using std::sqrt;
|
||||
- return sqrt(x);
|
||||
+ return std::sqrt(x);
|
||||
},
|
||||
AsD());
|
||||
}
|
||||
@@ -369,9 +367,8 @@ class Vector2 : public util::math::inter
|
||||
T y() const { return c_[1]; }
|
||||
|
||||
bool aequal(const Vector2& vb, FloatType margin) const {
|
||||
- using std::fabs;
|
||||
- return (fabs(c_[0] - vb.c_[0]) < margin) &&
|
||||
- (fabs(c_[1] - vb.c_[1]) < margin);
|
||||
+ return (std::fabs(c_[0] - vb.c_[0]) < margin) &&
|
||||
+ (std::fabs(c_[1] - vb.c_[1]) < margin);
|
||||
}
|
||||
|
||||
void Set(T x, T y) { *this = Vector2(x, y); }
|
||||
@@ -384,8 +381,7 @@ class Vector2 : public util::math::inter
|
||||
|
||||
// return the angle between "this" and v in radians
|
||||
FloatType Angle(const Vector2& v) const {
|
||||
- using std::atan2;
|
||||
- return atan2(CrossProd(v), this->DotProd(v));
|
||||
+ return std::atan2(CrossProd(v), this->DotProd(v));
|
||||
}
|
||||
|
||||
// return a vector orthogonal to the current one
|
||||
@@ -394,8 +390,7 @@ class Vector2 : public util::math::inter
|
||||
|
||||
// TODO(user): unify Fabs/Abs between all Vector classes.
|
||||
Vector2 Fabs() const {
|
||||
- using std::fabs;
|
||||
- return Vector2(fabs(c_[0]), fabs(c_[1]));
|
||||
+ return Vector2(std::fabs(c_[0]), std::fabs(c_[1]));
|
||||
}
|
||||
Vector2 Abs() const {
|
||||
static_assert(std::is_integral<VType>::value, "use Fabs for float_types");
|
||||
@@ -466,8 +461,7 @@ class Vector3 : public util::math::inter
|
||||
|
||||
// return the angle between two vectors in radians
|
||||
FloatType Angle(const Vector3& va) const {
|
||||
- using std::atan2;
|
||||
- return atan2(CrossProd(va).Norm(), this->DotProd(va));
|
||||
+ return std::atan2(CrossProd(va).Norm(), this->DotProd(va));
|
||||
}
|
||||
|
||||
Vector3 Fabs() const { return Abs(); }
|
||||
@@ -532,11 +526,10 @@ class Vector4 : public util::math::inter
|
||||
const T* Data() const { return c_; }
|
||||
|
||||
bool aequal(const Vector4& vb, FloatType margin) const {
|
||||
- using std::fabs;
|
||||
- return (fabs(c_[0] - vb.c_[0]) < margin) &&
|
||||
- (fabs(c_[1] - vb.c_[1]) < margin) &&
|
||||
- (fabs(c_[2] - vb.c_[2]) < margin) &&
|
||||
- (fabs(c_[3] - vb.c_[3]) < margin);
|
||||
+ return (std::fabs(c_[0] - vb.c_[0]) < margin) &&
|
||||
+ (std::fabs(c_[1] - vb.c_[1]) < margin) &&
|
||||
+ (std::fabs(c_[2] - vb.c_[2]) < margin) &&
|
||||
+ (std::fabs(c_[3] - vb.c_[3]) < margin);
|
||||
}
|
||||
|
||||
void x(const T& v) { c_[0] = v; }
|
||||
@@ -551,8 +544,7 @@ class Vector4 : public util::math::inter
|
||||
void Set(T x, T y, T z, T w) { *this = Vector4(x, y, z, w); }
|
||||
|
||||
Vector4 Fabs() const {
|
||||
- using std::fabs;
|
||||
- return Vector4(fabs(c_[0]), fabs(c_[1]), fabs(c_[2]), fabs(c_[3]));
|
||||
+ return Vector4(std::fabs(c_[0]), std::fabs(c_[1]), std::fabs(c_[2]), std::fabs(c_[3]));
|
||||
}
|
||||
|
||||
Vector4 Abs() const {
|
||||
--- a/third_party/s2cellid/src/s2/s1angle.h
|
||||
+++ b/third_party/s2cellid/src/s2/s1angle.h
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef S2_S1ANGLE_H_
|
||||
#define S2_S1ANGLE_H_
|
||||
|
||||
-#include <math.h>
|
||||
+#include <cmath>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
@@ -1,32 +0,0 @@
|
||||
description: fix gcc warnings about enum comparisons
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/ui/views/passwords/password_generation_popup_view_views.cc
|
||||
+++ b/chrome/browser/ui/views/passwords/password_generation_popup_view_views.cc
|
||||
@@ -51,11 +51,11 @@ class PasswordGenerationPopupViewViews::
|
||||
BuildColumnSet(layout);
|
||||
layout->StartRow(views::GridLayout::kFixedSize, 0);
|
||||
|
||||
+ int text_style = STYLE_SECONDARY;
|
||||
+ if (state == PasswordGenerationPopupController::kOfferGeneration)
|
||||
+ text_style = views::style::STYLE_PRIMARY;
|
||||
layout->AddView(autofill::CreateLabelWithColorReadabilityDisabled(
|
||||
- suggestion, ChromeTextContext::CONTEXT_BODY_TEXT_LARGE,
|
||||
- state == PasswordGenerationPopupController::kOfferGeneration
|
||||
- ? views::style::STYLE_PRIMARY
|
||||
- : STYLE_SECONDARY));
|
||||
+ suggestion, ChromeTextContext::CONTEXT_BODY_TEXT_LARGE, text_style));
|
||||
|
||||
DCHECK(!password_label_);
|
||||
password_label_ = autofill::CreateLabelWithColorReadabilityDisabled(
|
||||
--- a/components/viz/common/gl_helper.cc
|
||||
+++ b/components/viz/common/gl_helper.cc
|
||||
@@ -476,7 +476,7 @@ void GLHelper::CopyTextureToImpl::Cancel
|
||||
}
|
||||
|
||||
bool GLHelper::CopyTextureToImpl::IsBGRAReadbackSupported() {
|
||||
- if (bgra_support_ == BGRA_PREFERENCE_UNKNOWN) {
|
||||
+ if (bgra_support_ == BGRA_SUPPORT_UNKNOWN) {
|
||||
bgra_support_ = BGRA_NOT_SUPPORTED;
|
||||
if (auto* extensions = gl_->GetString(GL_EXTENSIONS)) {
|
||||
const std::string extensions_string =
|
||||
@@ -1,14 +0,0 @@
|
||||
description: fix gcc explicit constructor warning
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/device/fido/hid/fido_hid_device.cc
|
||||
+++ b/device/fido/hid/fido_hid_device.cc
|
||||
@@ -40,7 +40,7 @@ void FidoHidDevice::Cancel() {
|
||||
return;
|
||||
|
||||
// Delete any remaining pending requests on this Channel ID.
|
||||
- pending_transactions_ = {};
|
||||
+ pending_transactions_ = base::queue<std::pair<std::vector<uint8_t>, DeviceCallback>>();
|
||||
WriteMessage(
|
||||
FidoHidMessage::Create(channel_id_, FidoHidDeviceCommand::kCancel,
|
||||
std::vector<uint8_t>()),
|
||||
@@ -1,14 +0,0 @@
|
||||
description: fix int-in-bool-context gcc warning
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/webrtc/modules/video_processing/video_denoiser.cc
|
||||
+++ b/third_party/webrtc/modules/video_processing/video_denoiser.cc
|
||||
@@ -187,7 +187,7 @@ void VideoDenoiser::CopySrcOnMOB(const u
|
||||
// artifacts.
|
||||
if (mb_filter_decision_[mb_index] != FILTER_BLOCK ||
|
||||
IsTrailingBlock(moving_edge_, mb_row, mb_col) ||
|
||||
- (x_density_[mb_col] * y_density_[mb_row] &&
|
||||
+ (x_density_[mb_col] * y_density_[mb_row] != 0 &&
|
||||
moving_object_[mb_row * mb_cols_ + mb_col])) {
|
||||
// Copy y source.
|
||||
filter_->CopyMem16x16(mb_src, stride_src, mb_dst, stride_dst);
|
||||
@@ -1,13 +0,0 @@
|
||||
description: crashpad relies on multicharacter integer assignments
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/crashpad/crashpad/BUILD.gn
|
||||
+++ b/third_party/crashpad/crashpad/BUILD.gn
|
||||
@@ -17,6 +17,7 @@ import("build/test.gni")
|
||||
import("util/net/tls.gni")
|
||||
|
||||
config("crashpad_config") {
|
||||
+ cflags = [ "-Wno-multichar" ]
|
||||
include_dirs = [ "." ]
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
description: use stack_buf before possible branching (see gcc bug #83139)
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/base/strings/stringprintf.cc
|
||||
+++ b/base/strings/stringprintf.cc
|
||||
@@ -59,14 +59,14 @@ static void StringAppendVT(StringType* d
|
||||
int result = vsnprintfT(stack_buf, arraysize(stack_buf), format, ap_copy);
|
||||
va_end(ap_copy);
|
||||
|
||||
- if (result >= 0 && result < static_cast<int>(arraysize(stack_buf))) {
|
||||
+ int mem_length = static_cast<int>(arraysize(stack_buf));
|
||||
+ if (result >= 0 && result < mem_length) {
|
||||
// It fit.
|
||||
dst->append(stack_buf, result);
|
||||
return;
|
||||
}
|
||||
|
||||
// Repeatedly increase buffer size until it fits.
|
||||
- int mem_length = arraysize(stack_buf);
|
||||
while (true) {
|
||||
if (result < 0) {
|
||||
#if defined(OS_WIN)
|
||||
@@ -1,25 +0,0 @@
|
||||
description: cast enums to int for use as printf arguments
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/ui/gfx/ipc/buffer_types/gfx_param_traits.cc
|
||||
+++ b/ui/gfx/ipc/buffer_types/gfx_param_traits.cc
|
||||
@@ -30,7 +30,7 @@ bool ParamTraits<gfx::BufferUsageAndForm
|
||||
void ParamTraits<gfx::BufferUsageAndFormat>::Log(
|
||||
const gfx::BufferUsageAndFormat& p,
|
||||
std::string* l) {
|
||||
- l->append(base::StringPrintf("(%d, %d)", p.usage, p.format));
|
||||
+ l->append(base::StringPrintf("(%d, %d)", (int)p.usage, (int)p.format));
|
||||
}
|
||||
|
||||
} // namespace IPC
|
||||
--- a/content/browser/web_package/signed_exchange_handler.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_handler.cc
|
||||
@@ -541,7 +541,7 @@ void SignedExchangeHandler::OnVerifyCert
|
||||
error_message = base::StringPrintf(
|
||||
"CT verification failed. result: %s, policy compliance: %d",
|
||||
net::ErrorToShortString(error_code).c_str(),
|
||||
- ct_result.policy_compliance);
|
||||
+ (int)ct_result.policy_compliance);
|
||||
result = SignedExchangeLoadResult::kCTVerificationError;
|
||||
} else {
|
||||
error_message =
|
||||
@@ -1,13 +0,0 @@
|
||||
description: fix typo in unused-local-typedefs flag
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/build/config/linux/atk/BUILD.gn
|
||||
+++ b/build/config/linux/atk/BUILD.gn
|
||||
@@ -48,6 +48,6 @@ config("atk") {
|
||||
|
||||
if (is_clang) {
|
||||
# glib uses the pre-c++11 typedef-as-static_assert hack.
|
||||
- cflags += [ "-Wno-unused-local-typedef" ]
|
||||
+ cflags += [ "-Wno-unused-local-typedefs" ]
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
description: changes required to support ffmpeg 3.2 in stretch
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/media/ffmpeg/ffmpeg_common.cc
|
||||
+++ b/media/ffmpeg/ffmpeg_common.cc
|
||||
@@ -189,8 +189,6 @@ static VideoCodec CodecIDToVideoCodec(AV
|
||||
return kCodecVP8;
|
||||
case AV_CODEC_ID_VP9:
|
||||
return kCodecVP9;
|
||||
- case AV_CODEC_ID_AV1:
|
||||
- return kCodecAV1;
|
||||
default:
|
||||
DVLOG(1) << "Unknown video CodecID: " << codec_id;
|
||||
}
|
||||
@@ -213,8 +211,6 @@ AVCodecID VideoCodecToCodecID(VideoCodec
|
||||
return AV_CODEC_ID_VP8;
|
||||
case kCodecVP9:
|
||||
return AV_CODEC_ID_VP9;
|
||||
- case kCodecAV1:
|
||||
- return AV_CODEC_ID_AV1;
|
||||
default:
|
||||
DVLOG(1) << "Unknown VideoCodec: " << video_codec;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
description: backwards compatibility for older versions of icu
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/blink/renderer/platform/graphics/logging_canvas.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/logging_canvas.cc
|
||||
@@ -513,8 +513,12 @@ String StringForUTF32LEText(const void*
|
||||
utf16 = icu::UnicodeString::fromUTF32(reinterpret_cast<const UChar32*>(text),
|
||||
static_cast<int32_t>(byte_length));
|
||||
#endif
|
||||
+#if U_ICU_VERSION_MAJOR_NUM >= 59
|
||||
return String(icu::toUCharPtr(utf16.getBuffer()),
|
||||
static_cast<unsigned>(utf16.length()));
|
||||
+#else
|
||||
+ return String(utf16.getBuffer(),static_cast<unsigned>(utf16.length()));
|
||||
+#endif
|
||||
}
|
||||
|
||||
String StringForText(const void* text,
|
||||
--- a/components/url_formatter/idn_spoof_checker.cc
|
||||
+++ b/components/url_formatter/idn_spoof_checker.cc
|
||||
@@ -415,8 +415,8 @@ Skeletons IDNSpoofChecker::GetSkeletons(
|
||||
if ((u04cf_pos = host.indexOf(0x4CF)) != -1) {
|
||||
icu::UnicodeString host_alt(host);
|
||||
size_t length = host_alt.length();
|
||||
- char16_t* buffer = host_alt.getBuffer(-1);
|
||||
- for (char16_t* uc = buffer + u04cf_pos; uc < buffer + length; ++uc) {
|
||||
+ UChar* buffer = host_alt.getBuffer(-1);
|
||||
+ for (UChar* uc = buffer + u04cf_pos; uc < buffer + length; ++uc) {
|
||||
if (*uc == 0x4CF)
|
||||
*uc = 0x6C; // Lowercase L
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
description: maintain compatibility with openjpeg 2.1
|
||||
author: chromium 57 authors
|
||||
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/ccodec_jpxmodule.cpp
|
||||
@@ -41,20 +41,20 @@ opj_stream_t* fx_opj_stream_create_memor
|
||||
}
|
||||
|
||||
bool alloc_rgb(int** out_r, int** out_g, int** out_b, size_t size) {
|
||||
- int* r = static_cast<int*>(opj_image_data_alloc(size));
|
||||
+ int* r = FX_Alloc(int, size);
|
||||
if (!r)
|
||||
return false;
|
||||
|
||||
- int* g = static_cast<int*>(opj_image_data_alloc(size));
|
||||
+ int* g = FX_Alloc(int, size);
|
||||
if (!g) {
|
||||
- opj_image_data_free(r);
|
||||
+ FX_Free(r);
|
||||
return false;
|
||||
}
|
||||
|
||||
- int* b = static_cast<int*>(opj_image_data_alloc(size));
|
||||
+ int* b = FX_Alloc(int, size);
|
||||
if (!b) {
|
||||
- opj_image_data_free(r);
|
||||
- opj_image_data_free(g);
|
||||
+ FX_Free(r);
|
||||
+ FX_Free(g);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -115,9 +115,9 @@ void sycc444_to_rgb(opj_image_t* img) {
|
||||
for (size_t i = 0; i < max_size.ValueOrDie(); ++i) {
|
||||
sycc_to_rgb(offset, upb, *y++, *cb++, *cr++, r++, g++, b++);
|
||||
}
|
||||
- opj_image_data_free(img->comps[0].data);
|
||||
- opj_image_data_free(img->comps[1].data);
|
||||
- opj_image_data_free(img->comps[2].data);
|
||||
+ FX_Free(img->comps[0].data);
|
||||
+ FX_Free(img->comps[1].data);
|
||||
+ FX_Free(img->comps[2].data);
|
||||
img->comps[0].data = d0;
|
||||
img->comps[1].data = d1;
|
||||
img->comps[2].data = d2;
|
||||
@@ -183,9 +183,9 @@ void sycc422_to_rgb(opj_image_t* img) {
|
||||
sycc_to_rgb(offset, upb, *y++, *cb++, *cr++, r++, g++, b++);
|
||||
}
|
||||
}
|
||||
- opj_image_data_free(img->comps[0].data);
|
||||
- opj_image_data_free(img->comps[1].data);
|
||||
- opj_image_data_free(img->comps[2].data);
|
||||
+ FX_Free(img->comps[0].data);
|
||||
+ FX_Free(img->comps[1].data);
|
||||
+ FX_Free(img->comps[2].data);
|
||||
img->comps[0].data = d0;
|
||||
img->comps[1].data = d1;
|
||||
img->comps[2].data = d2;
|
||||
@@ -439,9 +439,9 @@ void sycc420_to_rgb(opj_image_t* img) {
|
||||
}
|
||||
}
|
||||
|
||||
- opj_image_data_free(img->comps[0].data);
|
||||
- opj_image_data_free(img->comps[1].data);
|
||||
- opj_image_data_free(img->comps[2].data);
|
||||
+ FX_Free(img->comps[0].data);
|
||||
+ FX_Free(img->comps[1].data);
|
||||
+ FX_Free(img->comps[2].data);
|
||||
img->comps[0].data = d0;
|
||||
img->comps[1].data = d1;
|
||||
img->comps[2].data = d2;
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "core/fxcodec/codec/codec_int.h"
|
||||
#include "core/fxcrt/unowned_ptr.h"
|
||||
#include "third_party/base/span.h"
|
||||
-#include <openjpeg-2.3/openjpeg.h>
|
||||
+#include <openjpeg-2.1/openjpeg.h>
|
||||
|
||||
class CPDF_ColorSpace;
|
||||
|
||||
--- a/third_party/pdfium/core/fxcodec/codec/codec_int.h
|
||||
+++ b/third_party/pdfium/core/fxcodec/codec/codec_int.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include "core/fxcodec/jbig2/JBig2_Context.h"
|
||||
-#include <openjpeg-2.3/openjpeg.h>
|
||||
+#include <openjpeg-2.1/openjpeg.h>
|
||||
|
||||
class CPDF_ColorSpace;
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
description: maintain compatibility with vpx 1.6
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
|
||||
+++ b/third_party/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
|
||||
@@ -250,9 +250,7 @@ int LibvpxVp8Decoder::Decode(const Encod
|
||||
|
||||
img = vpx_codec_get_frame(decoder_, &iter);
|
||||
int qp;
|
||||
- vpx_codec_err_t vpx_ret =
|
||||
- vpx_codec_control(decoder_, VPXD_GET_LAST_QUANTIZER, &qp);
|
||||
- RTC_DCHECK_EQ(vpx_ret, VPX_CODEC_OK);
|
||||
+ qp = 0;
|
||||
ret = ReturnFrame(img, input_image.Timestamp(), input_image.ntp_time_ms_, qp);
|
||||
if (ret != 0) {
|
||||
// Reset to avoid requesting key frames too often.
|
||||
@@ -306,7 +304,9 @@ int LibvpxVp8Decoder::ReturnFrame(const
|
||||
|
||||
VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0);
|
||||
decoded_image.set_ntp_time_ms(ntp_time_ms);
|
||||
- decode_complete_callback_->Decoded(decoded_image, absl::nullopt, qp);
|
||||
+ int ret = decode_complete_callback_->Decoded(decoded_image);
|
||||
+ if (ret != 0)
|
||||
+ return ret;
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
--- a/media/base/decode_capabilities.cc
|
||||
+++ b/media/base/decode_capabilities.cc
|
||||
@@ -101,7 +101,7 @@ bool IsColorSpaceSupported(const media::
|
||||
}
|
||||
|
||||
bool IsVp9ProfileSupported(VideoCodecProfile profile) {
|
||||
-#if BUILDFLAG(ENABLE_LIBVPX)
|
||||
+#if 0
|
||||
// High bit depth capabilities may be toggled via LibVPX config flags.
|
||||
static bool vpx_supports_high_bit_depth =
|
||||
(vpx_codec_get_caps(vpx_codec_vp9_dx()) & VPX_CODEC_CAP_HIGHBITDEPTH) !=
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/third_party/skia/src/ports/SkFontHost_FreeType.cpp
|
||||
+++ b/third_party/skia/src/ports/SkFontHost_FreeType.cpp
|
||||
@@ -121,8 +121,8 @@ public:
|
||||
: fGetVarDesignCoordinates(nullptr)
|
||||
, fGetVarAxisFlags(nullptr)
|
||||
, fLibrary(nullptr)
|
||||
- , fIsLCDSupported(false)
|
||||
- , fLCDExtra(0)
|
||||
+ , fIsLCDSupported(true)
|
||||
+ , fLCDExtra(2)
|
||||
{
|
||||
if (FT_New_Library(&gFTMemory, &fLibrary)) {
|
||||
return;
|
||||
@@ -1,139 +0,0 @@
|
||||
--- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
|
||||
+++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
|
||||
@@ -136,11 +136,11 @@ class PendingStartElementNSCallback fina
|
||||
attribute_count_(attribute_count),
|
||||
defaulted_count_(defaulted_count) {
|
||||
namespaces_ = static_cast<xmlChar**>(
|
||||
- xmlMalloc(sizeof(xmlChar*) * namespace_count * 2));
|
||||
+ malloc(sizeof(xmlChar*) * namespace_count * 2));
|
||||
for (int i = 0; i < namespace_count * 2; ++i)
|
||||
namespaces_[i] = xmlStrdup(namespaces[i]);
|
||||
attributes_ = static_cast<xmlChar**>(
|
||||
- xmlMalloc(sizeof(xmlChar*) * attribute_count * 5));
|
||||
+ malloc(sizeof(xmlChar*) * attribute_count * 5));
|
||||
for (int i = 0; i < attribute_count; ++i) {
|
||||
// Each attribute has 5 elements in the array:
|
||||
// name, prefix, uri, value and an end pointer.
|
||||
@@ -155,12 +155,12 @@ class PendingStartElementNSCallback fina
|
||||
|
||||
~PendingStartElementNSCallback() override {
|
||||
for (int i = 0; i < namespace_count_ * 2; ++i)
|
||||
- xmlFree(namespaces_[i]);
|
||||
- xmlFree(namespaces_);
|
||||
+ free(namespaces_[i]);
|
||||
+ free(namespaces_);
|
||||
for (int i = 0; i < attribute_count_; ++i)
|
||||
for (int j = 0; j < 4; ++j)
|
||||
- xmlFree(attributes_[i * 5 + j]);
|
||||
- xmlFree(attributes_);
|
||||
+ free(attributes_[i * 5 + j]);
|
||||
+ free(attributes_);
|
||||
}
|
||||
|
||||
void Call(XMLDocumentParser* parser) override {
|
||||
@@ -202,7 +202,7 @@ class PendingCharactersCallback final
|
||||
PendingCharactersCallback(const xmlChar* chars, int length)
|
||||
: chars_(xmlStrndup(chars, length)), length_(length) {}
|
||||
|
||||
- ~PendingCharactersCallback() override { xmlFree(chars_); }
|
||||
+ ~PendingCharactersCallback() override { free(chars_); }
|
||||
|
||||
void Call(XMLDocumentParser* parser) override {
|
||||
parser->Characters(chars_, length_);
|
||||
@@ -278,7 +278,7 @@ class PendingErrorCallback final : publi
|
||||
line_number_(line_number),
|
||||
column_number_(column_number) {}
|
||||
|
||||
- ~PendingErrorCallback() override { xmlFree(message_); }
|
||||
+ ~PendingErrorCallback() override { free(message_); }
|
||||
|
||||
void Call(XMLDocumentParser* parser) override {
|
||||
parser->HandleError(type_, reinterpret_cast<char*>(message_),
|
||||
--- a/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc
|
||||
+++ b/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc
|
||||
@@ -189,7 +189,7 @@ void XSLStyleSheet::LoadChildSheets() {
|
||||
xmlChar* uri_ref =
|
||||
xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE);
|
||||
LoadChildSheet(String::FromUTF8((const char*)uri_ref));
|
||||
- xmlFree(uri_ref);
|
||||
+ free(uri_ref);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ void XSLStyleSheet::LoadChildSheets() {
|
||||
xmlChar* uri_ref =
|
||||
xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE);
|
||||
LoadChildSheet(String::FromUTF8((const char*)uri_ref));
|
||||
- xmlFree(uri_ref);
|
||||
+ free(uri_ref);
|
||||
}
|
||||
curr = curr->next;
|
||||
}
|
||||
@@ -292,8 +292,8 @@ xmlDocPtr XSLStyleSheet::LocateStyleshee
|
||||
xmlChar* child_uri =
|
||||
xmlBuildURI((const xmlChar*)import_href.data(), base);
|
||||
bool equal_ur_is = xmlStrEqual(uri, child_uri);
|
||||
- xmlFree(base);
|
||||
- xmlFree(child_uri);
|
||||
+ free(base);
|
||||
+ free(child_uri);
|
||||
if (equal_ur_is) {
|
||||
child->MarkAsProcessed();
|
||||
return child->GetDocument();
|
||||
--- a/third_party/blink/renderer/core/xml/xslt_extensions.cc
|
||||
+++ b/third_party/blink/renderer/core/xml/xslt_extensions.cc
|
||||
@@ -69,7 +69,7 @@ static void ExsltNodeSetFunction(xmlXPat
|
||||
CHECK(ret);
|
||||
|
||||
if (strval)
|
||||
- xmlFree(strval);
|
||||
+ free(strval);
|
||||
|
||||
valuePush(ctxt, ret);
|
||||
}
|
||||
--- a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
|
||||
+++ b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
|
||||
@@ -104,7 +104,7 @@ static xmlDocPtr DocLoaderFunc(const xml
|
||||
xmlChar* base = xmlNodeGetBase(context->document->doc, context->node);
|
||||
KURL url(KURL(reinterpret_cast<const char*>(base)),
|
||||
reinterpret_cast<const char*>(uri));
|
||||
- xmlFree(base);
|
||||
+ free(base);
|
||||
|
||||
ResourceLoaderOptions fetch_options;
|
||||
fetch_options.initiator_info.name = fetch_initiator_type_names::kXml;
|
||||
--- a/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc
|
||||
+++ b/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc
|
||||
@@ -273,18 +273,18 @@ void XsltUnicodeSortFunction(xsltTransfo
|
||||
comp = static_cast<xsltStylePreComp*>(sorts[j]->psvi);
|
||||
if (tempstype[j] == 1) {
|
||||
// The data-type needs to be recomputed each time.
|
||||
- xmlFree(const_cast<xmlChar*>(comp->stype));
|
||||
+ free(const_cast<xmlChar*>(comp->stype));
|
||||
comp->stype = nullptr;
|
||||
}
|
||||
if (temporder[j] == 1) {
|
||||
// The order needs to be recomputed each time.
|
||||
- xmlFree(const_cast<xmlChar*>(comp->order));
|
||||
+ free(const_cast<xmlChar*>(comp->order));
|
||||
comp->order = nullptr;
|
||||
}
|
||||
if (results_tab[j]) {
|
||||
for (int i = 0; i < len; ++i)
|
||||
xmlXPathFreeObject(results_tab[j][i]);
|
||||
- xmlFree(results_tab[j]);
|
||||
+ free(results_tab[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
--- a/third_party/libxml/chromium/libxml_utils.cc
|
||||
+++ b/third_party/libxml/chromium/libxml_utils.cc
|
||||
@@ -23,7 +23,7 @@ std::string XmlStringToStdString(const x
|
||||
// Same as XmlStringToStdString but also frees |xmlstring|.
|
||||
std::string XmlStringToStdStringWithDelete(xmlChar* xmlstring) {
|
||||
std::string result = XmlStringToStdString(xmlstring);
|
||||
- xmlFree(xmlstring);
|
||||
+ free(xmlstring);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Fix build for OpenSUSE users using system direct memory access.
|
||||
# Imported from OpenSUSE patches at https://build.opensuse.org/package/show/network:chromium/chromium
|
||||
|
||||
--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
+++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
@@ -17,9 +17,6 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
-#include <linux/dma-buf.h>
|
||||
-#else
|
||||
#include <linux/types.h>
|
||||
|
||||
struct dma_buf_sync {
|
||||
@@ -34,7 +31,6 @@ struct dma_buf_sync {
|
||||
|
||||
#define DMA_BUF_BASE 'b'
|
||||
#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
|
||||
-#endif
|
||||
|
||||
namespace gfx {
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Fix crash when namespace sandbox is enabled in the kernel
|
||||
# Details: https://bugs.chromium.org/p/chromium/issues/detail?id=776359
|
||||
|
||||
--- a/sandbox/linux/services/namespace_sandbox.cc
|
||||
+++ b/sandbox/linux/services/namespace_sandbox.cc
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/process/process.h"
|
||||
-#include "build/build_config.h"
|
||||
#include "sandbox/linux/services/credentials.h"
|
||||
#include "sandbox/linux/services/namespace_utils.h"
|
||||
#include "sandbox/linux/services/syscall_wrappers.h"
|
||||
@@ -85,53 +84,6 @@ void TerminationSignalHandler(int sig) {
|
||||
_exit(NamespaceSandbox::SignalExitCode(sig));
|
||||
}
|
||||
|
||||
-#if defined(LIBC_GLIBC)
|
||||
-// The first few fields of glibc's struct pthread. The full
|
||||
-// definition is in:
|
||||
-// https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/descr.h;hb=95a73392580761abc62fc9b1386d232cd55878e9#l121
|
||||
-struct glibc_pthread {
|
||||
- union {
|
||||
-#if defined(ARCH_CPU_X86_64)
|
||||
- // On x86_64, sizeof(tcbhead_t) > sizeof(void*)*24.
|
||||
- // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/nptl/tls.h;hb=95a73392580761abc62fc9b1386d232cd55878e9#l65
|
||||
- // For all other architectures, sizeof(tcbhead_t) <= sizeof(void*)*24.
|
||||
- // https://sourceware.org/git/?p=glibc.git&a=search&h=HEAD&st=grep&s=%7D+tcbhead_t
|
||||
- char header[704];
|
||||
-#endif
|
||||
- void* padding[24];
|
||||
- } header;
|
||||
- void* list[2];
|
||||
- pid_t tid;
|
||||
-};
|
||||
-
|
||||
-pid_t GetGlibcCachedTid() {
|
||||
- pthread_mutex_t lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
||||
- CHECK_EQ(0, pthread_mutex_lock(&lock));
|
||||
- pid_t tid = lock.__data.__owner;
|
||||
- CHECK_EQ(0, pthread_mutex_unlock(&lock));
|
||||
- CHECK_EQ(0, pthread_mutex_destroy(&lock));
|
||||
- return tid;
|
||||
-}
|
||||
-
|
||||
-void MaybeUpdateGlibcTidCache() {
|
||||
- // After the below CL, glibc does not does not reset the cached
|
||||
- // TID/PID on clone(), but pthread depends on it being up-to-date.
|
||||
- // This CL was introduced in glibc 2.25, and backported to 2.24 on
|
||||
- // at least Debian and Fedora. This is a workaround that updates
|
||||
- // the cache manually.
|
||||
- // https://sourceware.org/git/?p=glibc.git;a=commit;h=c579f48edba88380635ab98cb612030e3ed8691e
|
||||
- pid_t real_tid = sys_gettid();
|
||||
- pid_t cached_tid = GetGlibcCachedTid();
|
||||
- if (cached_tid != real_tid) {
|
||||
- pid_t* cached_tid_location =
|
||||
- &reinterpret_cast<struct glibc_pthread*>(pthread_self())->tid;
|
||||
- CHECK_EQ(cached_tid, *cached_tid_location);
|
||||
- *cached_tid_location = real_tid;
|
||||
- CHECK_EQ(real_tid, GetGlibcCachedTid());
|
||||
- }
|
||||
-}
|
||||
-#endif // defined(LIBC_GLIBC)
|
||||
-
|
||||
} // namespace
|
||||
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
@@ -225,9 +177,6 @@ pid_t NamespaceSandbox::ForkInNewPidName
|
||||
// Since we just forked, we are single-threaded, so this should be safe.
|
||||
CHECK(Credentials::DropAllCapabilitiesOnCurrentThread());
|
||||
}
|
||||
-#if defined(LIBC_GLIBC)
|
||||
- MaybeUpdateGlibcTidCache();
|
||||
-#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
description: search for master_preferences in /etc/chromium
|
||||
|
||||
--- a/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
+++ b/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
@@ -20,8 +20,7 @@ bool IsOrganicFirstRun() {
|
||||
base::FilePath MasterPrefsPath() {
|
||||
// The standard location of the master prefs is next to the chrome binary.
|
||||
base::FilePath master_prefs;
|
||||
- if (!PathService::Get(base::DIR_EXE, &master_prefs))
|
||||
- return base::FilePath();
|
||||
+ master_prefs = base::FilePath("/etc/chromium");
|
||||
return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
--- a/ui/gfx/native_pixmap_handle.cc
|
||||
+++ b/ui/gfx/native_pixmap_handle.cc
|
||||
@@ -12,6 +12,9 @@
|
||||
namespace gfx {
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
+#ifndef DRM_FORMAT_MOD_INVALID
|
||||
+#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1)
|
||||
+#endif
|
||||
static_assert(NativePixmapPlane::kNoModifier == DRM_FORMAT_MOD_INVALID,
|
||||
"gfx::NativePixmapPlane::kNoModifier should be an alias for"
|
||||
"DRM_FORMAT_MOD_INVALID");
|
||||
@@ -1,18 +0,0 @@
|
||||
Description: do not use -w flag when calling ninja, which requires ninja >= 1.6.0
|
||||
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||
|
||||
--- a/tools/gn/bootstrap/bootstrap.py
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py
|
||||
@@ -81,10 +81,10 @@ def main(argv):
|
||||
os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
|
||||
if options.jobs:
|
||||
subprocess.check_call(
|
||||
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
|
||||
+ ['ninja', '-C', gn_build_dir, 'gn', '-j'+str(options.jobs)])
|
||||
else:
|
||||
subprocess.check_call(
|
||||
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
|
||||
+ ['ninja', '-C', gn_build_dir, 'gn'])
|
||||
shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)
|
||||
|
||||
if not options.skip_generate_buildfiles:
|
||||
@@ -1,15 +0,0 @@
|
||||
Description: Relax ninja version requirement to match version in xenial
|
||||
Origin: https://chromium.googlesource.com/chromium/src/tools/gn/+/ebe34f81141db077aa69427fd2a7e1c8495a2cf2
|
||||
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||
|
||||
--- a/tools/gn/tools/gn/ninja_build_writer.cc
|
||||
+++ b/tools/gn/tools/gn/ninja_build_writer.cc
|
||||
@@ -278,7 +278,7 @@ bool NinjaBuildWriter::RunAndWriteFile(c
|
||||
}
|
||||
|
||||
void NinjaBuildWriter::WriteNinjaRules() {
|
||||
- out_ << "ninja_required_version = 1.7.2\n\n";
|
||||
+ out_ << "ninja_required_version = 1.5.1\n\n";
|
||||
out_ << "rule gn\n";
|
||||
out_ << " command = " << GetSelfInvocationCommand(build_settings_) << "\n";
|
||||
out_ << " description = Regenerating ninja files\n\n";
|
||||
@@ -1,16 +0,0 @@
|
||||
# Fix compatibility with VA-API library (libva) version 1
|
||||
# Chromium seems to use version 2 or newer
|
||||
|
||||
--- a/media/gpu/vaapi/vaapi_jpeg_decode_accelerator.cc
|
||||
+++ b/media/gpu/vaapi/vaapi_jpeg_decode_accelerator.cc
|
||||
@@ -36,6 +36,10 @@ enum VAJDADecoderFailure {
|
||||
VAJDA_DECODER_FAILURES_MAX,
|
||||
};
|
||||
|
||||
+#ifndef VA_FOURCC_I420
|
||||
+#define VA_FOURCC_I420 VA_FOURCC('I', '4', '2', '0')
|
||||
+#endif
|
||||
+
|
||||
static void ReportToUMA(VAJDADecoderFailure failure) {
|
||||
UMA_HISTOGRAM_ENUMERATION("Media.VAJDA.DecoderFailure", failure,
|
||||
VAJDA_DECODER_FAILURES_MAX + 1);
|
||||
@@ -1,13 +0,0 @@
|
||||
# Fix namespace of nullptr_t for libstdc++
|
||||
|
||||
--- a/content/public/test/browser_test_utils.h
|
||||
+++ b/content/public/test/browser_test_utils.h
|
||||
@@ -631,7 +631,7 @@ bool operator>(const T& a, const EvalJsR
|
||||
return b.error.empty() && (JsLiteralHelper<T>::Convert(a) > b.value);
|
||||
}
|
||||
|
||||
-inline bool operator==(nullptr_t a, const EvalJsResult& b) {
|
||||
+inline bool operator==(std::nullptr_t a, const EvalJsResult& b) {
|
||||
return b.error.empty() && (base::Value() == b.value);
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
description: manpage updates/fixes
|
||||
author: Daniel Echeverry <epsilon77@gmail.com>
|
||||
forwarded: http://code.google.com/p/chromium/issues/detail?id=73591
|
||||
# This patch also includes ungoogled-chromium-specific information.
|
||||
|
||||
--- a/chrome/app/resources/manpage.1.in
|
||||
+++ b/chrome/app/resources/manpage.1.in
|
||||
@@ -5,11 +5,17 @@
|
||||
.SH NAME
|
||||
@@PACKAGE@@ \- the web browser from Google
|
||||
|
||||
+This is a build of ungoogled\-chromium
|
||||
+
|
||||
.SH SYNOPSIS
|
||||
.B @@PACKAGE@@
|
||||
[\fIOPTION\fR] [\fIPATH\fR|\fIURL\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
+ungoogled\-chromium is a set of modifications to @@MENUNAME@@ for removing Google integration and enhancing privacy, control, and transparency. See ungoogled\-chromium's page and README for more details:
|
||||
+.IP
|
||||
+<https://github.com/Eloston/ungoogled\-chromium>
|
||||
+.PP
|
||||
See the Google Chrome help center for help on using the browser.
|
||||
.IP
|
||||
<https://support.google.com/chrome/>
|
||||
@@ -17,9 +23,28 @@ See the Google Chrome help center for he
|
||||
This manpage only describes invocation, environment, and arguments.
|
||||
|
||||
.SH OPTIONS
|
||||
+ungoogled\-chromium introduces a few new command-line flags. Please consult its README for more details.
|
||||
+.PP
|
||||
@@MENUNAME@@ has hundreds of undocumented command-line flags that are added
|
||||
and removed at the whim of the developers. Here, we document relatively
|
||||
stable flags.
|
||||
+
|
||||
+.TP
|
||||
+\fB\-h \fRor\fB \-\-help\fR
|
||||
+Show help output.
|
||||
+
|
||||
+.TP
|
||||
+\fB\-g \fRor\fB \-\-debug\fR
|
||||
+Start a debugging session within /usr/bin/gdb.
|
||||
+
|
||||
+.TP
|
||||
+\fB\-\-temp-profile\fR
|
||||
+Use a throw-away/temporary profile for this session. This creates an entirely new user profile temporarily. It is not the same as incognito mode.
|
||||
+
|
||||
+.TP
|
||||
+\fB\-\-enable-remote-extensions\fR
|
||||
+Allow installation and updates of remote extensions.
|
||||
+
|
||||
.TP
|
||||
\fB\-\-user\-data\-dir\fR=\fIDIR\fR
|
||||
Specifies the directory that user data (your "profile") is kept in.
|
||||
@@ -114,6 +139,7 @@ as
|
||||
See the GTK documentation for more:
|
||||
.IP
|
||||
<http://library.gnome.org/devel/gtk/stable/gtk-running.html>
|
||||
+.IP
|
||||
<http://library.gnome.org/devel/gtk/stable/gtk-x11.html>
|
||||
|
||||
.SH ENVIRONMENT
|
||||
@@ -159,12 +185,29 @@ Default directory for cache data. (Why?
|
||||
<http://standards.freedesktop.org/basedir-spec/latest/> .)
|
||||
|
||||
.SH BUGS
|
||||
-Bug tracker:
|
||||
+ungoogled\-chromium bug tracker:
|
||||
+.IP
|
||||
+https://github.com/Eloston/ungoogled\-chromium/issues
|
||||
+.PP
|
||||
+Please submit bug reports to ungoogled\-chromium first, unless you are certain
|
||||
+that it is not specific to ungoogled\-chromium.
|
||||
+.PP
|
||||
+Debian bug tracker:
|
||||
+.IP
|
||||
+http://bugs.debian.org/chromium-browser
|
||||
+.PP
|
||||
+Upstream bug tracker:
|
||||
.IP
|
||||
http://code.google.com/p/chromium/issues/list
|
||||
.PP
|
||||
Be sure to do your search within "All Issues" before reporting bugs,
|
||||
and be sure to pick the "Defect on Linux" template when filing a new one.
|
||||
+.PP
|
||||
+This build derives from Debian's Chromium. If your bug is specific to Debian,
|
||||
+please submit it only to the Debian bug tracker.
|
||||
+.IP
|
||||
+http://www.debian.org/Bugs/Reporting
|
||||
|
||||
.SH AUTHOR
|
||||
The Chromium team \- <http://www.chromium.org>
|
||||
+ungoogled-chromium \- <https://github.com/Eloston/ungoogled-chromium>
|
||||
@@ -1,13 +0,0 @@
|
||||
# Allow linking against system libraries when using the GN flag `is_official_build=true`
|
||||
|
||||
--- a/tools/generate_shim_headers/generate_shim_headers.py
|
||||
+++ b/tools/generate_shim_headers/generate_shim_headers.py
|
||||
@@ -18,7 +18,7 @@ import sys
|
||||
|
||||
|
||||
SHIM_TEMPLATE = """
|
||||
-#if defined(OFFICIAL_BUILD)
|
||||
+#if defined(GOOGLE_CHROME_BUILD)
|
||||
#error shim headers must not be used in official builds!
|
||||
#endif
|
||||
"""
|
||||
@@ -1,92 +0,0 @@
|
||||
# Disables crashpad_handler process
|
||||
|
||||
--- a/third_party/crashpad/crashpad/client/crashpad_client_mac.cc
|
||||
+++ b/third_party/crashpad/crashpad/client/crashpad_client_mac.cc
|
||||
@@ -123,61 +123,7 @@ class HandlerStarter final : public Noti
|
||||
const std::map<std::string, std::string>& annotations,
|
||||
const std::vector<std::string>& arguments,
|
||||
bool restartable) {
|
||||
- base::mac::ScopedMachReceiveRight receive_right(
|
||||
- NewMachPort(MACH_PORT_RIGHT_RECEIVE));
|
||||
- if (!receive_right.is_valid()) {
|
||||
- return base::mac::ScopedMachSendRight();
|
||||
- }
|
||||
-
|
||||
- mach_port_t port;
|
||||
- mach_msg_type_name_t right_type;
|
||||
- kern_return_t kr = mach_port_extract_right(mach_task_self(),
|
||||
- receive_right.get(),
|
||||
- MACH_MSG_TYPE_MAKE_SEND,
|
||||
- &port,
|
||||
- &right_type);
|
||||
- if (kr != KERN_SUCCESS) {
|
||||
- MACH_LOG(ERROR, kr) << "mach_port_extract_right";
|
||||
- return base::mac::ScopedMachSendRight();
|
||||
- }
|
||||
- base::mac::ScopedMachSendRight send_right(port);
|
||||
- DCHECK_EQ(port, receive_right.get());
|
||||
- DCHECK_EQ(right_type,
|
||||
- implicit_cast<mach_msg_type_name_t>(MACH_MSG_TYPE_PORT_SEND));
|
||||
-
|
||||
- std::unique_ptr<HandlerStarter> handler_restarter;
|
||||
- if (restartable) {
|
||||
- handler_restarter.reset(new HandlerStarter());
|
||||
- if (!handler_restarter->notify_port_.is_valid()) {
|
||||
- // This is an error that NewMachPort() would have logged. Proceed anyway
|
||||
- // without the ability to restart.
|
||||
- handler_restarter.reset();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (!CommonStart(handler,
|
||||
- database,
|
||||
- metrics_dir,
|
||||
- url,
|
||||
- annotations,
|
||||
- arguments,
|
||||
- std::move(receive_right),
|
||||
- handler_restarter.get(),
|
||||
- false)) {
|
||||
- return base::mac::ScopedMachSendRight();
|
||||
- }
|
||||
-
|
||||
- if (handler_restarter &&
|
||||
- handler_restarter->StartRestartThread(
|
||||
- handler, database, metrics_dir, url, annotations, arguments)) {
|
||||
- // The thread owns the object now.
|
||||
- ignore_result(handler_restarter.release());
|
||||
- }
|
||||
-
|
||||
- // If StartRestartThread() failed, proceed without the ability to restart.
|
||||
- // handler_restarter will be released when this function returns.
|
||||
-
|
||||
- return send_right;
|
||||
+ return base::mac::ScopedMachSendRight();
|
||||
}
|
||||
|
||||
// NotifyServer::DefaultInterface:
|
||||
@@ -446,23 +392,7 @@ bool CrashpadClient::StartHandler(
|
||||
const std::vector<std::string>& arguments,
|
||||
bool restartable,
|
||||
bool asynchronous_start) {
|
||||
- // The “restartable” behavior can only be selected on OS X 10.10 and later. In
|
||||
- // previous OS versions, if the initial client were to crash while attempting
|
||||
- // to restart the handler, it would become an unkillable process.
|
||||
- base::mac::ScopedMachSendRight exception_port(
|
||||
- HandlerStarter::InitialStart(handler,
|
||||
- database,
|
||||
- metrics_dir,
|
||||
- url,
|
||||
- annotations,
|
||||
- arguments,
|
||||
- restartable && MacOSXMinorVersion() >= 10));
|
||||
- if (!exception_port.is_valid()) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- SetHandlerMachPort(std::move(exception_port));
|
||||
- return true;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool CrashpadClient::SetHandlerMachService(const std::string& service_name) {
|
||||
@@ -1,13 +0,0 @@
|
||||
# Disable symbol order verification on macOS since building libc++.a adds extra symbols for some reason
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1282,7 +1282,7 @@ if (is_win) {
|
||||
assert(_framework_binary_path != "",
|
||||
"Ignore configuration-dependent unused variable warning")
|
||||
|
||||
- if (!is_asan && !is_component_build) {
|
||||
+ if (false) {
|
||||
action("verify_chrome_framework_order") {
|
||||
script = "//chrome/tools/build/mac/run_verify_order.py"
|
||||
stamp_file = "$target_out_dir/run_$target_name.stamp"
|
||||
@@ -1,20 +0,0 @@
|
||||
# Fix safebrowsing build on macOS ("disk_image_type_sniffer_mac" is set only if safe_browsing_mode == 1)
|
||||
|
||||
--- a/chrome/common/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/common/safe_browsing/BUILD.gn
|
||||
@@ -87,11 +87,11 @@ source_set("safe_browsing") {
|
||||
":file_type_policies",
|
||||
]
|
||||
|
||||
- if (is_mac) {
|
||||
- deps += [ ":disk_image_type_sniffer_mac" ]
|
||||
- }
|
||||
-
|
||||
if (safe_browsing_mode == 1) {
|
||||
+ if (is_mac) {
|
||||
+ deps += [ ":disk_image_type_sniffer_mac" ]
|
||||
+ }
|
||||
+
|
||||
sources = [
|
||||
"binary_feature_extractor.cc",
|
||||
"binary_feature_extractor.h",
|
||||
@@ -1,64 +0,0 @@
|
||||
# Fix GN safe_browsing on macOS
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -1734,7 +1734,6 @@ jumbo_split_static_library("browser") {
|
||||
"//chrome/browser/profiling_host",
|
||||
"//chrome/browser/push_messaging:budget_proto",
|
||||
"//chrome/browser/resource_coordinator:mojo_bindings",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/ssl:proto",
|
||||
"//chrome/browser/ui",
|
||||
"//chrome/browser/ui/webui/bluetooth_internals",
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -775,7 +775,6 @@ jumbo_static_library("extensions") {
|
||||
"//chrome/browser/media/router",
|
||||
"//chrome/browser/media/router/discovery",
|
||||
"//chrome/browser/resource_coordinator:mojo_bindings",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/web_applications/components",
|
||||
"//chrome/browser/web_applications/extensions",
|
||||
"//chrome/common",
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -384,7 +384,6 @@ jumbo_split_static_library("ui") {
|
||||
"//chrome/browser/engagement:mojo_bindings",
|
||||
"//chrome/browser/media:mojo_bindings",
|
||||
"//chrome/browser/profiling_host",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/ssl:proto",
|
||||
"//chrome/browser/ui/webui/app_management:mojo_bindings",
|
||||
"//chrome/browser/ui/webui/bluetooth_internals",
|
||||
--- a/chrome/browser/ui/webui/settings/change_password_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/change_password_handler.cc
|
||||
@@ -52,19 +52,19 @@ void ChangePasswordHandler::HandleInitia
|
||||
}
|
||||
|
||||
void ChangePasswordHandler::HandleChangePassword(const base::ListValue* args) {
|
||||
- service_->OnUserAction(web_ui()->GetWebContents(),
|
||||
- safe_browsing::LoginReputationClientRequest::
|
||||
- PasswordReuseEvent::SIGN_IN_PASSWORD,
|
||||
- safe_browsing::WarningUIType::CHROME_SETTINGS,
|
||||
- safe_browsing::WarningAction::CHANGE_PASSWORD);
|
||||
+// service_->OnUserAction(web_ui()->GetWebContents(),
|
||||
+// safe_browsing::LoginReputationClientRequest::
|
||||
+// PasswordReuseEvent::SIGN_IN_PASSWORD,
|
||||
+// safe_browsing::WarningUIType::CHROME_SETTINGS,
|
||||
+// safe_browsing::WarningAction::CHANGE_PASSWORD);
|
||||
}
|
||||
|
||||
void ChangePasswordHandler::UpdateChangePasswordCardVisibility() {
|
||||
- FireWebUIListener(
|
||||
- "change-password-visibility",
|
||||
- base::Value(service_->IsWarningEnabled() &&
|
||||
- safe_browsing::ChromePasswordProtectionService::
|
||||
- ShouldShowChangePasswordSettingUI(profile_)));
|
||||
+// FireWebUIListener(
|
||||
+// "change-password-visibility",
|
||||
+// base::Value(service_->IsWarningEnabled() &&
|
||||
+// safe_browsing::ChromePasswordProtectionService::
|
||||
+// ShouldShowChangePasswordSettingUI(profile_)));
|
||||
}
|
||||
|
||||
} // namespace settings
|
||||
@@ -1,13 +0,0 @@
|
||||
# Fix compiling on macOS 10.11
|
||||
|
||||
--- a/base/files/memory_mapped_file_posix.cc
|
||||
+++ b/base/files/memory_mapped_file_posix.cc
|
||||
@@ -116,7 +116,7 @@ bool MemoryMappedFile::MapFileRegionToMe
|
||||
// available via fcntl.
|
||||
// See also: https://openradar.appspot.com/32720223
|
||||
fstore_t params = {F_ALLOCATEALL, F_PEOFPOSMODE, region.offset,
|
||||
- region.size, 0};
|
||||
+ (off_t)region.size, 0};
|
||||
if (fcntl(file_.GetPlatformFile(), F_PREALLOCATE, ¶ms) != 0) {
|
||||
DPLOG(ERROR) << "F_PREALLOCATE";
|
||||
// This can fail because the filesystem doesn't support it so don't
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/base/mac/sdk_forward_declarations.h
|
||||
+++ b/base/mac/sdk_forward_declarations.h
|
||||
@@ -285,7 +285,7 @@ typedef void (^VNRequestCompletionHandle
|
||||
@end
|
||||
|
||||
// VNImageRequestHandler forward declarations.
|
||||
-typedef NSString* VNImageOption NS_STRING_ENUM;
|
||||
+typedef NSString* VNImageOption;
|
||||
|
||||
@interface VNImageRequestHandler : NSObject
|
||||
- (instancetype)initWithCIImage:(CIImage*)image
|
||||
@@ -1,32 +0,0 @@
|
||||
# Fix compiling on macOS
|
||||
|
||||
--- a/tools/gn/tools/gn/visibility.h
|
||||
+++ b/tools/gn/tools/gn/visibility.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
+#include "base/values.h"
|
||||
#include "tools/gn/label_pattern.h"
|
||||
#include "tools/gn/source_dir.h"
|
||||
|
||||
@@ -49,7 +50,7 @@ class Visibility {
|
||||
std::string Describe(int indent, bool include_brackets) const;
|
||||
|
||||
// Returns value representation of this visibility
|
||||
- std::unique_ptr<base::Value> AsValue() const;
|
||||
+ std::unique_ptr<base::ListValue> AsValue() const;
|
||||
|
||||
// Helper function to check visibility between the given two items. If
|
||||
// to is invisible to from, returns false and sets the error.
|
||||
--- a/tools/gn/tools/gn/visibility.cc
|
||||
+++ b/tools/gn/tools/gn/visibility.cc
|
||||
@@ -78,7 +78,7 @@ std::string Visibility::Describe(int ind
|
||||
return result;
|
||||
}
|
||||
|
||||
-std::unique_ptr<base::Value> Visibility::AsValue() const {
|
||||
+std::unique_ptr<base::ListValue> Visibility::AsValue() const {
|
||||
auto res = std::make_unique<base::ListValue>();
|
||||
for (const auto& pattern : patterns_)
|
||||
res->AppendString(pattern.Describe());
|
||||
@@ -1,20 +0,0 @@
|
||||
# Removes the -fcomplete-member-pointers CFLAG, which was introduced in
|
||||
# LLVM r333498 (i.e. after LLVM 6, the current stable at the time of writing)
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -743,14 +743,6 @@ config("compiler") {
|
||||
ldflags += [ "-Wl,--no-rosegment" ]
|
||||
}
|
||||
|
||||
- # This flag enforces that member pointer base types are complete. It helps
|
||||
- # prevent us from running into problems in the Microsoft C++ ABI (see
|
||||
- # https://crbug.com/847724).
|
||||
- if (is_clang && !is_nacl && target_os != "chromeos" && !use_xcode_clang &&
|
||||
- (is_win || use_custom_libcxx)) {
|
||||
- cflags += [ "-fcomplete-member-pointers" ]
|
||||
- }
|
||||
-
|
||||
# Pass the same C/C++ flags to the objective C/C++ compiler.
|
||||
cflags_objc += cflags_c
|
||||
cflags_objcc += cflags_cc
|
||||
@@ -1,37 +0,0 @@
|
||||
# Disable encryption of cookies, passwords, settings...
|
||||
# WARNING! Use ONLY if your hard drive is encrypted or if you know what you are doing.
|
||||
# See https://github.com/Eloston/ungoogled-chromium/issues/444
|
||||
|
||||
--- a/components/os_crypt/os_crypt_win.cc
|
||||
+++ b/components/os_crypt/os_crypt_win.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
+#include "base/command_line.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "crypto/wincrypt_shim.h"
|
||||
|
||||
@@ -26,6 +27,10 @@ bool OSCrypt::DecryptString16(const std::string& ciphertext,
|
||||
|
||||
bool OSCrypt::EncryptString(const std::string& plaintext,
|
||||
std::string* ciphertext) {
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-encryption")) {
|
||||
+ *ciphertext = plaintext;
|
||||
+ return true;
|
||||
+ }
|
||||
DATA_BLOB input;
|
||||
input.pbData = const_cast<BYTE*>(
|
||||
reinterpret_cast<const BYTE*>(plaintext.data()));
|
||||
@@ -49,6 +54,11 @@ bool OSCrypt::EncryptString(const std::string& plaintext,
|
||||
|
||||
bool OSCrypt::DecryptString(const std::string& ciphertext,
|
||||
std::string* plaintext) {
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-encryption")) {
|
||||
+ *plaintext = ciphertext;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
DATA_BLOB input;
|
||||
input.pbData = const_cast<BYTE*>(
|
||||
reinterpret_cast<const BYTE*>(ciphertext.data()));
|
||||
@@ -1,52 +0,0 @@
|
||||
# Disable machine ID generation on Windows.
|
||||
# See https://github.com/Eloston/ungoogled-chromium/issues/444
|
||||
|
||||
--- a/services/preferences/tracked/device_id_win.cc
|
||||
+++ b/services/preferences/tracked/device_id_win.cc
|
||||
@@ -10,11 +10,15 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
+#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
|
||||
MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) {
|
||||
DCHECK(machine_id);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) {
|
||||
+ return MachineIdStatus::NOT_IMPLEMENTED;
|
||||
+ }
|
||||
|
||||
wchar_t computer_name[MAX_COMPUTERNAME_LENGTH + 1] = {};
|
||||
DWORD computer_name_size = arraysize(computer_name);
|
||||
--- a/components/metrics/machine_id_provider_win.cc
|
||||
+++ b/components/metrics/machine_id_provider_win.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <winioctl.h>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/threading/scoped_blocking_call.h"
|
||||
@@ -18,6 +19,9 @@ namespace metrics {
|
||||
|
||||
// static
|
||||
bool MachineIdProvider::HasId() {
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) {
|
||||
+ return false;
|
||||
+ }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +29,10 @@ bool MachineIdProvider::HasId() {
|
||||
// is running from.
|
||||
// static
|
||||
std::string MachineIdProvider::GetMachineId() {
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) {
|
||||
+ return std::string();
|
||||
+ }
|
||||
+
|
||||
base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
|
||||
|
||||
// Use the program's path to get the drive used for the machine id. This means
|
||||
@@ -1,50 +0,0 @@
|
||||
# Disable use of orderfiles which are difficult to generate and normally require downloading from Google storage
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -430,22 +430,6 @@ if (is_win) {
|
||||
"//content/public/app:both",
|
||||
]
|
||||
}
|
||||
-
|
||||
- if (is_clang && is_official_build) {
|
||||
- orderfile = "build/chrome.$target_cpu.orderfile"
|
||||
- rebased_orderfile = rebase_path(orderfile, root_build_dir)
|
||||
- inputs = [
|
||||
- orderfile,
|
||||
- ]
|
||||
- ldflags += [
|
||||
- "/order:@$rebased_orderfile",
|
||||
-
|
||||
- # Ignore warnings about missing functions or functions not in their
|
||||
- # own section.
|
||||
- "/ignore:4037",
|
||||
- "/ignore:4065",
|
||||
- ]
|
||||
- }
|
||||
}
|
||||
|
||||
if (is_multi_dll_chrome) {
|
||||
@@ -492,22 +476,6 @@ if (is_win) {
|
||||
"/DELAYLOAD:wininet.dll",
|
||||
]
|
||||
|
||||
- if (is_clang && is_official_build) {
|
||||
- orderfile = "build/chrome_child.$target_cpu.orderfile"
|
||||
- rebased_orderfile = rebase_path(orderfile, root_build_dir)
|
||||
- inputs = [
|
||||
- orderfile,
|
||||
- ]
|
||||
- ldflags += [
|
||||
- "/order:@$rebased_orderfile",
|
||||
-
|
||||
- # Ignore warnings about missing functions or functions not in their
|
||||
- # own section.
|
||||
- "/ignore:4037",
|
||||
- "/ignore:4065",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
if (symbol_level == 2) {
|
||||
# Incremental linking doesn't work on this target in debug mode with
|
||||
# full symbols, but does work in other cases, including minimal
|
||||
@@ -1,49 +0,0 @@
|
||||
# Disable use of rc.py, which requires Google's rc.exe executable
|
||||
# This patch uses Microsoft's rc.exe to generate the resource files, and does not do any verifiation
|
||||
|
||||
--- a/build/toolchain/win/tool_wrapper.py
|
||||
+++ b/build/toolchain/win/tool_wrapper.py
|
||||
@@ -195,26 +195,8 @@ class WinTool(object):
|
||||
# 1. Run our rc.py.
|
||||
# Also pass /showIncludes to track dependencies of .rc files.
|
||||
args = list(args)
|
||||
- rcpy_args = args[:]
|
||||
- rcpy_args[0:1] = [sys.executable, os.path.join(BASE_DIR, 'rc', 'rc.py')]
|
||||
- rcpy_res_output = rcpy_args[-2]
|
||||
- assert rcpy_res_output.startswith('/fo')
|
||||
- assert rcpy_res_output.endswith('.res')
|
||||
- rc_res_output = rcpy_res_output + '_ms_rc'
|
||||
- args[-2] = rc_res_output
|
||||
- rcpy_args.append('/showIncludes')
|
||||
- rc_exe_exit_code = subprocess.call(rcpy_args, env=env)
|
||||
- if rc_exe_exit_code == 0:
|
||||
- # Since tool("rc") can't have deps, add deps on this script and on rc.py
|
||||
- # and its deps here, so that rc edges become dirty if rc.py changes.
|
||||
- print 'Note: including file: ../../build/toolchain/win/tool_wrapper.py'
|
||||
- print 'Note: including file: ../../build/toolchain/win/rc/rc.py'
|
||||
- print 'Note: including file: ../../build/toolchain/win/rc/linux64/rc.sha1'
|
||||
- print 'Note: including file: ../../build/toolchain/win/rc/mac/rc.sha1'
|
||||
- print 'Note: including file: ../../build/toolchain/win/rc/win/rc.exe.sha1'
|
||||
-
|
||||
# 2. Run Microsoft rc.exe.
|
||||
- if sys.platform == 'win32' and rc_exe_exit_code == 0:
|
||||
+ if sys.platform == 'win32':
|
||||
popen = subprocess.Popen(args, shell=True, env=env,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
out, _ = popen.communicate()
|
||||
@@ -227,12 +209,9 @@ class WinTool(object):
|
||||
and line):
|
||||
print line
|
||||
rc_exe_exit_code = popen.returncode
|
||||
- # Assert Microsoft rc.exe and rc.py produced identical .res files.
|
||||
- if rc_exe_exit_code == 0:
|
||||
- import filecmp
|
||||
- # Strip "/fo" prefix.
|
||||
- assert filecmp.cmp(rc_res_output[3:], rcpy_res_output[3:])
|
||||
- return rc_exe_exit_code
|
||||
+ return rc_exe_exit_code
|
||||
+ else:
|
||||
+ raise RuntimeError('Must run on Windows.')
|
||||
|
||||
def ExecActionWrapper(self, arch, rspfile, *dirname):
|
||||
"""Runs an action command line from a response file using the environment
|
||||
@@ -1,90 +0,0 @@
|
||||
# Disable reordering imports
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -49,35 +49,6 @@ if (enable_resource_whitelist_generation
|
||||
chrome_resource_whitelist = "$target_gen_dir/chrome_resource_whitelist.txt"
|
||||
}
|
||||
|
||||
-if (is_win) {
|
||||
- action("reorder_imports") {
|
||||
- script = "//build/win/reorder-imports.py"
|
||||
-
|
||||
- # See comment in chrome_dll.gypi in the hardlink_to_output
|
||||
- # target for why this cannot be 'initial' like the DLL.
|
||||
- inputs = [
|
||||
- "$root_out_dir/initialexe/chrome.exe",
|
||||
- ]
|
||||
- outputs = [
|
||||
- "$root_out_dir/chrome.exe",
|
||||
- ]
|
||||
- if (symbol_level != 0) {
|
||||
- outputs += [ "$root_out_dir/chrome.exe.pdb" ]
|
||||
- }
|
||||
- args = [
|
||||
- "-i",
|
||||
- rebase_path("$root_out_dir/initialexe", root_build_dir),
|
||||
- "-o",
|
||||
- rebase_path("$root_out_dir", root_build_dir),
|
||||
- "-a",
|
||||
- current_cpu,
|
||||
- ]
|
||||
- deps = [
|
||||
- ":chrome_initial",
|
||||
- ]
|
||||
- }
|
||||
-}
|
||||
-
|
||||
# This target exists above chrome and it's main components in the dependency
|
||||
# tree as a central place to put assert_no_deps annotations. Since this depends
|
||||
# on Chrome and the main DLLs it uses, it will transitively assert that those
|
||||
@@ -112,9 +83,6 @@ if (!is_android && !is_mac) {
|
||||
data_deps = [
|
||||
":chrome_initial",
|
||||
]
|
||||
- if (is_win) {
|
||||
- public_deps += [ ":reorder_imports" ]
|
||||
- }
|
||||
if (use_aura && (is_win || is_linux)) {
|
||||
data_deps += [ "//chrome/app:service_manifests" ]
|
||||
}
|
||||
@@ -341,11 +309,7 @@ if (!is_android && !is_mac) {
|
||||
}
|
||||
|
||||
chrome_binary("chrome_initial") {
|
||||
- if (is_win) {
|
||||
- output_name = "initialexe/chrome"
|
||||
- } else {
|
||||
- output_name = "chrome"
|
||||
- }
|
||||
+ output_name = "chrome"
|
||||
|
||||
sources = []
|
||||
if (!is_win && use_aura) {
|
||||
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
|
||||
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
|
||||
@@ -32,10 +32,6 @@ group("telemetry_chrome_test") {
|
||||
data_deps += [ "//chrome" ]
|
||||
}
|
||||
|
||||
- if (is_win) {
|
||||
- data_deps += [ "//chrome:reorder_imports" ]
|
||||
- }
|
||||
-
|
||||
if (is_linux) {
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
--- a/chrome/test/chromedriver/BUILD.gn
|
||||
+++ b/chrome/test/chromedriver/BUILD.gn
|
||||
@@ -357,11 +357,6 @@ python_library("chromedriver_py_tests")
|
||||
if (is_component_build && is_mac) {
|
||||
data_deps += [ "//chrome:chrome_framework" ]
|
||||
}
|
||||
-
|
||||
- if (is_win) {
|
||||
- # On Windows, the following target produces the final chrome.exe
|
||||
- data_deps += [ "//chrome:reorder_imports" ]
|
||||
- }
|
||||
}
|
||||
|
||||
python_library("chromedriver_replay_unittests") {
|
||||
@@ -1,55 +0,0 @@
|
||||
# Disable verification of certain binary outputs against third_party/win_build_output.
|
||||
# The referenced binaries are pruned during binary pruning
|
||||
|
||||
--- a/build/toolchain/win/midl.py
|
||||
+++ b/build/toolchain/win/midl.py
|
||||
@@ -211,23 +211,6 @@ def main(arch, outdir, dynamic_guid, tlb
|
||||
|
||||
for f in os.listdir(tmp_dir):
|
||||
ZapTimestamp(os.path.join(tmp_dir, f))
|
||||
-
|
||||
- # Now compare the output in tmp_dir to the copied-over outputs.
|
||||
- diff = filecmp.dircmp(tmp_dir, outdir)
|
||||
- if diff.diff_files:
|
||||
- print 'midl.exe output different from files in %s, see %s' \
|
||||
- % (outdir, tmp_dir)
|
||||
- for f in diff.diff_files:
|
||||
- if f.endswith('.tlb'): continue
|
||||
- fromfile = os.path.join(outdir, f)
|
||||
- tofile = os.path.join(tmp_dir, f)
|
||||
- print ''.join(difflib.unified_diff(open(fromfile, 'U').readlines(),
|
||||
- open(tofile, 'U').readlines(),
|
||||
- fromfile, tofile))
|
||||
- delete_tmp_dir = False
|
||||
- print 'To rebaseline:'
|
||||
- print ' copy /y %s\* %s' % (tmp_dir, source)
|
||||
- sys.exit(1)
|
||||
return 0
|
||||
finally:
|
||||
if os.path.exists(tmp_dir) and delete_tmp_dir:
|
||||
--- a/build/win/message_compiler.py
|
||||
+++ b/build/win/message_compiler.py
|
||||
@@ -117,23 +117,6 @@ def main():
|
||||
header_contents += sorted(define_block, key=lambda s: s.split()[-1])
|
||||
with open(header_file, 'wb') as f:
|
||||
f.write(''.join(header_contents))
|
||||
-
|
||||
- # mc.exe invocation and post-processing are complete, now compare the output
|
||||
- # in tmp_dir to the checked-in outputs.
|
||||
- diff = filecmp.dircmp(tmp_dir, source)
|
||||
- if diff.diff_files or set(diff.left_list) != set(diff.right_list):
|
||||
- print 'mc.exe output different from files in %s, see %s' % (source,
|
||||
- tmp_dir)
|
||||
- diff.report()
|
||||
- for f in diff.diff_files:
|
||||
- if f.endswith('.bin'): continue
|
||||
- fromfile = os.path.join(source, f)
|
||||
- tofile = os.path.join(tmp_dir, f)
|
||||
- print ''.join(difflib.unified_diff(open(fromfile, 'U').readlines(),
|
||||
- open(tofile, 'U').readlines(),
|
||||
- fromfile, tofile))
|
||||
- delete_tmp_dir = False
|
||||
- sys.exit(1)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print e.output
|
||||
sys.exit(e.returncode)
|
||||
@@ -1,46 +0,0 @@
|
||||
# Fix building GN on Windows
|
||||
# Author: shiromichi on GitHub
|
||||
|
||||
--- a/tools/gn/bootstrap/bootstrap.py
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py
|
||||
@@ -62,7 +62,7 @@ def main(argv):
|
||||
else:
|
||||
build_rel = os.path.join('out', 'Release')
|
||||
out_dir = os.path.join(SRC_ROOT, build_rel)
|
||||
- gn_path = options.output or os.path.join(out_dir, 'gn')
|
||||
+ gn_path = options.output or os.path.join(out_dir, 'gn.exe')
|
||||
gn_build_dir = os.path.join(out_dir, 'gn_build')
|
||||
|
||||
cmd = [
|
||||
@@ -81,11 +81,11 @@ def main(argv):
|
||||
os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
|
||||
if options.jobs:
|
||||
subprocess.check_call(
|
||||
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
|
||||
+ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
|
||||
else:
|
||||
subprocess.check_call(
|
||||
- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
|
||||
- shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)
|
||||
+ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err'])
|
||||
+ shutil.copy2(os.path.join(gn_build_dir, 'gn.exe'), gn_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
--- a/tools/gn/build/build_win.ninja.template
|
||||
+++ b/tools/gn/build/build_win.ninja.template
|
||||
@@ -1,12 +1,12 @@
|
||||
rule cc
|
||||
- command = ninja -t msvc -- $cc /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
|
||||
+ command = ninja -t msvc -- $cc /utf-8 /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
|
||||
description = CC ${out}
|
||||
rspfile = ${out}.rsp
|
||||
rspfile_content = ${defines} ${includes} ${cflags} ${cflags_c}
|
||||
deps = msvc
|
||||
|
||||
rule cxx
|
||||
- command = ninja -t msvc -- $cxx /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
|
||||
+ command = ninja -t msvc -- $cxx /utf-8 /nologo /showIncludes /FC @${out}.rsp /c ${in} /Fo${out}
|
||||
description = CXX ${out}
|
||||
rspfile = ${out}.rsp
|
||||
rspfile_content = ${defines} ${includes} ${cflags} ${cflags_cc}
|
||||
@@ -1,357 +0,0 @@
|
||||
# Fix building without Safe Browsing on Windows
|
||||
# This also removes other unnecessary services that depend on Safe Browsing, such as Chrome Cleaner
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -307,8 +307,6 @@ jumbo_split_static_library("browser") {
|
||||
"component_updater/subresource_filter_component_installer.h",
|
||||
"component_updater/supervised_user_whitelist_installer.cc",
|
||||
"component_updater/supervised_user_whitelist_installer.h",
|
||||
- "component_updater/sw_reporter_installer_win.cc",
|
||||
- "component_updater/sw_reporter_installer_win.h",
|
||||
"conflicts/enumerate_input_method_editors_win.cc",
|
||||
"conflicts/enumerate_input_method_editors_win.h",
|
||||
"conflicts/enumerate_shell_extensions_win.cc",
|
||||
@@ -1706,11 +1704,11 @@ jumbo_split_static_library("browser") {
|
||||
"//chrome/browser/profiling_host",
|
||||
"//chrome/browser/push_messaging:budget_proto",
|
||||
"//chrome/browser/resource_coordinator:mojo_bindings",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/ssl:proto",
|
||||
"//chrome/browser/ui",
|
||||
"//chrome/browser/ui/webui/bluetooth_internals",
|
||||
"//chrome/common/net",
|
||||
+ "//chrome/common/safe_browsing",
|
||||
"//chrome/installer/util:with_no_strings",
|
||||
"//components/about_handler",
|
||||
"//components/app_modal",
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -239,7 +239,6 @@
|
||||
#include "base/trace_event/trace_event_etw_export_win.h"
|
||||
#include "base/win/win_util.h"
|
||||
#include "chrome/browser/chrome_browser_main_win.h"
|
||||
-#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
#include "chrome/browser/component_updater/third_party_module_list_component_installer_win.h"
|
||||
#endif // defined(GOOGLE_CHROME_BUILD)
|
||||
@@ -601,7 +600,6 @@ void RegisterComponentsForUpdate(PrefService* profile_prefs) {
|
||||
// on chromium build bots, it is always registered here and
|
||||
// RegisterSwReporterComponent() has support for running only in official
|
||||
// builds or tests.
|
||||
- RegisterSwReporterComponent(cus);
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
RegisterThirdPartyModuleListComponent(cus);
|
||||
#endif // defined(GOOGLE_CHROME_BUILD)
|
||||
--- a/chrome/browser/chrome_browser_main_win.cc
|
||||
+++ b/chrome/browser/chrome_browser_main_win.cc
|
||||
@@ -43,9 +43,6 @@
|
||||
#include "chrome/browser/memory/swap_thrashing_monitor.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "chrome/browser/profiles/profile_shortcut_manager.h"
|
||||
-#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
|
||||
-#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config.h"
|
||||
-#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_util_win.h"
|
||||
#include "chrome/browser/ui/simple_message_box.h"
|
||||
#include "chrome/browser/ui/uninstall_browser_prompt.h"
|
||||
#include "chrome/browser/win/browser_util.h"
|
||||
@@ -397,16 +394,6 @@ void ShowCloseBrowserFirstMessageBox() {
|
||||
l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP));
|
||||
}
|
||||
|
||||
-void MaybePostSettingsResetPrompt() {
|
||||
- if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) {
|
||||
- content::BrowserThread::PostAfterStartupTask(
|
||||
- FROM_HERE,
|
||||
- content::BrowserThread::GetTaskRunnerForThread(
|
||||
- content::BrowserThread::UI),
|
||||
- base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay));
|
||||
- }
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
int DoUninstallTasks(bool chrome_still_running) {
|
||||
@@ -555,23 +542,6 @@ void ChromeBrowserMainPartsWin::PostBrowserStart() {
|
||||
|
||||
InitializeChromeElf();
|
||||
|
||||
- // Reset settings for the current profile if it's tagged to be reset after a
|
||||
- // complete run of the Chrome Cleanup tool. If post-cleanup settings reset is
|
||||
- // enabled, we delay checks for settings reset prompt until the scheduled
|
||||
- // reset is finished.
|
||||
- if (safe_browsing::PostCleanupSettingsResetter::IsEnabled()) {
|
||||
- // Using last opened profiles, because we want to find reset the profile
|
||||
- // that was open in the last Chrome run, which may not be open yet in
|
||||
- // the current run.
|
||||
- safe_browsing::PostCleanupSettingsResetter().ResetTaggedProfiles(
|
||||
- g_browser_process->profile_manager()->GetLastOpenedProfiles(),
|
||||
- base::BindOnce(&MaybePostSettingsResetPrompt),
|
||||
- std::make_unique<
|
||||
- safe_browsing::PostCleanupSettingsResetter::Delegate>());
|
||||
- } else {
|
||||
- MaybePostSettingsResetPrompt();
|
||||
- }
|
||||
-
|
||||
// Record UMA data about whether the fault-tolerant heap is enabled.
|
||||
// Use a delayed task to minimize the impact on startup time.
|
||||
content::BrowserThread::PostDelayedTask(
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -808,7 +808,6 @@ jumbo_static_library("extensions") {
|
||||
"//chrome/browser/media/router",
|
||||
"//chrome/browser/media/router/discovery",
|
||||
"//chrome/browser/resource_coordinator:mojo_bindings",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/web_applications/components",
|
||||
"//chrome/browser/web_applications/extensions",
|
||||
"//chrome/common",
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -109,7 +109,6 @@
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
|
||||
#include "components/rappor/rappor_service_impl.h"
|
||||
-#include "components/safe_browsing/common/safe_browsing_prefs.h"
|
||||
#include "components/search_engines/template_url_prepopulate_data.h"
|
||||
#include "components/sessions/core/session_id_generator.h"
|
||||
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
|
||||
@@ -301,14 +300,11 @@
|
||||
#if defined(OS_WIN)
|
||||
#include "chrome/browser/apps/platform_apps/app_launch_for_metro_restart_win.h"
|
||||
#include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
|
||||
-#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
#include "chrome/browser/conflicts/incompatible_applications_updater_win.h"
|
||||
#include "chrome/browser/conflicts/module_database_win.h"
|
||||
#include "chrome/browser/conflicts/third_party_conflicts_manager_win.h"
|
||||
#endif // defined(GOOGLE_CHROME_BUILD)
|
||||
-#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
|
||||
-#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
|
||||
#include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h"
|
||||
#endif
|
||||
|
||||
@@ -504,7 +500,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
app_metro_launch::RegisterPrefs(registry);
|
||||
- component_updater::RegisterPrefsForSwReporter(registry);
|
||||
desktop_ios_promotion::RegisterLocalPrefs(registry);
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry);
|
||||
@@ -571,7 +566,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
|
||||
PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
|
||||
RegisterBrowserUserPrefs(registry);
|
||||
- safe_browsing::RegisterProfilePrefs(registry);
|
||||
secure_origin_whitelist::RegisterProfilePrefs(registry);
|
||||
SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(registry);
|
||||
SessionStartupPref::RegisterProfilePrefs(registry);
|
||||
@@ -712,12 +706,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
browser_switcher::prefs::RegisterProfilePrefs(registry);
|
||||
- component_updater::RegisterProfilePrefsForSwReporter(registry);
|
||||
desktop_ios_promotion::RegisterProfilePrefs(registry);
|
||||
NetworkProfileBubble::RegisterProfilePrefs(registry);
|
||||
- safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs(
|
||||
- registry);
|
||||
- safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
|
||||
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
|
||||
@@ -177,14 +177,6 @@ void OffTheRecordProfileIOData::Handle::LazyInitialize() const {
|
||||
// Set initialized_ to true at the beginning in case any of the objects
|
||||
// below try to get the ResourceContext pointer.
|
||||
initialized_ = true;
|
||||
- io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled,
|
||||
- profile_->GetPrefs());
|
||||
- io_data_->safe_browsing_enabled()->MoveToThread(
|
||||
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
- io_data_->safe_browsing_whitelist_domains()->Init(
|
||||
- prefs::kSafeBrowsingWhitelistDomains, profile_->GetPrefs());
|
||||
- io_data_->safe_browsing_whitelist_domains()->MoveToThread(
|
||||
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
io_data_->always_open_pdf_externally()->Init(
|
||||
prefs::kPluginsAlwaysOpenPdfExternally, profile_->GetPrefs());
|
||||
--- a/chrome/browser/profiles/profile_impl_io_data.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
||||
@@ -378,14 +378,6 @@ void ProfileImplIOData::Handle::LazyInitialize() const {
|
||||
// below try to get the ResourceContext pointer.
|
||||
initialized_ = true;
|
||||
PrefService* pref_service = profile_->GetPrefs();
|
||||
- io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled,
|
||||
- pref_service);
|
||||
- io_data_->safe_browsing_enabled()->MoveToThread(
|
||||
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
- io_data_->safe_browsing_whitelist_domains()->Init(
|
||||
- prefs::kSafeBrowsingWhitelistDomains, pref_service);
|
||||
- io_data_->safe_browsing_whitelist_domains()->MoveToThread(
|
||||
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
io_data_->always_open_pdf_externally()->Init(
|
||||
prefs::kPluginsAlwaysOpenPdfExternally, pref_service);
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -841,7 +841,6 @@ jumbo_split_static_library("ui") {
|
||||
"//chrome/browser/engagement:mojo_bindings",
|
||||
"//chrome/browser/media:mojo_bindings",
|
||||
"//chrome/browser/profiling_host",
|
||||
- "//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/ssl:proto",
|
||||
"//chrome/browser/ui/webui/bluetooth_internals",
|
||||
"//chrome/browser/ui/webui/interventions_internals:mojo_bindings",
|
||||
@@ -2567,10 +2566,6 @@ jumbo_split_static_library("ui") {
|
||||
"network_profile_bubble.h",
|
||||
"startup/default_browser_prompt_win.cc",
|
||||
"views/certificate_viewer_win.cc",
|
||||
- "views/chrome_cleaner_dialog_win.cc",
|
||||
- "views/chrome_cleaner_dialog_win.h",
|
||||
- "views/chrome_cleaner_reboot_dialog_win.cc",
|
||||
- "views/chrome_cleaner_reboot_dialog_win.h",
|
||||
"views/color_chooser_dialog.cc",
|
||||
"views/color_chooser_dialog.h",
|
||||
"views/color_chooser_win.cc",
|
||||
--- a/chrome/browser/ui/browser_dialogs.h
|
||||
+++ b/chrome/browser/ui/browser_dialogs.h
|
||||
@@ -50,9 +50,6 @@ class PaymentRequestDialog;
|
||||
}
|
||||
|
||||
namespace safe_browsing {
|
||||
-class ChromeCleanerController;
|
||||
-class ChromeCleanerDialogController;
|
||||
-class ChromeCleanerRebootDialogController;
|
||||
class SettingsResetPromptController;
|
||||
}
|
||||
|
||||
@@ -294,21 +291,6 @@ void ShowSettingsResetPrompt(
|
||||
Browser* browser,
|
||||
safe_browsing::SettingsResetPromptController* controller);
|
||||
|
||||
-// Shows the Chrome Cleanup dialog asking the user if they want to clean their
|
||||
-// system from unwanted software. This is called when unwanted software has been
|
||||
-// detected on the system.
|
||||
-void ShowChromeCleanerPrompt(
|
||||
- Browser* browser,
|
||||
- safe_browsing::ChromeCleanerDialogController* dialog_controller,
|
||||
- safe_browsing::ChromeCleanerController* cleaner_controller);
|
||||
-
|
||||
-// Shows the Chrome Cleanup reboot dialog asking the user if they want to
|
||||
-// restart their computer once a cleanup has finished. This is called when the
|
||||
-// Chrome Cleanup ends in a reboot required state.
|
||||
-void ShowChromeCleanerRebootPrompt(
|
||||
- Browser* browser,
|
||||
- safe_browsing::ChromeCleanerRebootDialogController* dialog_controller);
|
||||
-
|
||||
#endif // OS_WIN
|
||||
|
||||
} // namespace chrome
|
||||
--- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
|
||||
@@ -275,8 +275,6 @@ void ChromeCleanupHandler::HandleStartCleanup(const base::ListValue* args) {
|
||||
// The state is propagated to all open tabs and should be consistent.
|
||||
DCHECK_EQ(controller_->logs_enabled(), allow_logs_upload);
|
||||
|
||||
- safe_browsing::RecordCleanupStartedHistogram(
|
||||
- safe_browsing::CLEANUP_STARTED_FROM_PROMPT_IN_SETTINGS);
|
||||
base::RecordAction(
|
||||
base::UserMetricsAction("SoftwareReporter.CleanupWebui_StartCleanup"));
|
||||
|
||||
--- a/chrome/browser/ui/webui/settings/md_settings_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
|
||||
@@ -54,9 +54,6 @@
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
-#include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h"
|
||||
-#include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h"
|
||||
-#include "chrome/browser/ui/webui/settings/chrome_cleanup_handler.h"
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
#include "chrome/browser/conflicts/incompatible_applications_updater_win.h"
|
||||
#include "chrome/browser/conflicts/token_util_win.h"
|
||||
@@ -257,7 +254,6 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui)
|
||||
content::WebUIDataSource::Create(chrome::kChromeUISettingsHost);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
- AddSettingsPageUIHandler(std::make_unique<ChromeCleanupHandler>(profile));
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
html_source->AddResourcePath("partner-logo.svg", IDR_CHROME_CLEANUP_PARTNER);
|
||||
--- a/chrome/common/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/common/safe_browsing/BUILD.gn
|
||||
@@ -95,44 +95,8 @@ source_set("safe_browsing") {
|
||||
deps = [
|
||||
":file_type_policies",
|
||||
]
|
||||
-
|
||||
- if (safe_browsing_mode == 1) {
|
||||
- sources = [
|
||||
- "binary_feature_extractor.cc",
|
||||
- "binary_feature_extractor.h",
|
||||
- "binary_feature_extractor_mac.cc",
|
||||
- "binary_feature_extractor_win.cc",
|
||||
- "ipc_protobuf_message_macros.h",
|
||||
- "ipc_protobuf_message_null_macros.h",
|
||||
- "mach_o_image_reader_mac.cc",
|
||||
- "mach_o_image_reader_mac.h",
|
||||
- "pe_image_reader_win.cc",
|
||||
- "pe_image_reader_win.h",
|
||||
- "protobuf_message_log_macros.h",
|
||||
- "protobuf_message_read_macros.h",
|
||||
- "protobuf_message_write_macros.h",
|
||||
- "zip_analyzer.cc",
|
||||
- "zip_analyzer.h",
|
||||
- ]
|
||||
- if (is_posix) {
|
||||
- sources += [ "binary_feature_extractor_posix.cc" ]
|
||||
- }
|
||||
-
|
||||
- deps += [
|
||||
- ":archive_analyzer_results",
|
||||
- ":download_protection_util",
|
||||
- ":rar_analyzer",
|
||||
- "//components/safe_browsing:features",
|
||||
- ]
|
||||
-
|
||||
- public_deps = [
|
||||
- ":proto",
|
||||
- "//base:i18n",
|
||||
- "//chrome/common:mojo_bindings",
|
||||
- "//components/safe_browsing:csd_proto",
|
||||
- "//crypto",
|
||||
- "//ipc",
|
||||
- "//third_party/zlib/google:zip",
|
||||
- ]
|
||||
- }
|
||||
+ sources = [
|
||||
+ "pe_image_reader_win.cc",
|
||||
+ "pe_image_reader_win.h",
|
||||
+ ]
|
||||
}
|
||||
--- a/chrome/renderer/url_loader_throttle_provider_impl.cc
|
||||
+++ b/chrome/renderer/url_loader_throttle_provider_impl.cc
|
||||
@@ -110,8 +110,7 @@ URLLoaderThrottleProviderImpl::URLLoaderThrottleProviderImpl(
|
||||
chrome_content_renderer_client_(chrome_content_renderer_client) {
|
||||
DETACH_FROM_THREAD(thread_checker_);
|
||||
|
||||
- if (base::FeatureList::IsEnabled(network::features::kNetworkService) ||
|
||||
- base::FeatureList::IsEnabled(safe_browsing::kCheckByURLLoaderThrottle)) {
|
||||
+ if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
content::RenderThread::Get()->GetConnector()->BindInterface(
|
||||
content::mojom::kBrowserServiceName,
|
||||
mojo::MakeRequest(&safe_browsing_info_));
|
||||
@@ -158,10 +157,7 @@ URLLoaderThrottleProviderImpl::CreateThrottles(
|
||||
DCHECK(!is_frame_resource ||
|
||||
type_ == content::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
- if ((network_service_enabled ||
|
||||
- base::FeatureList::IsEnabled(
|
||||
- safe_browsing::kCheckByURLLoaderThrottle)) &&
|
||||
- !is_frame_resource) {
|
||||
+ if (network_service_enabled && !is_frame_resource) {
|
||||
if (safe_browsing_info_)
|
||||
safe_browsing_.Bind(std::move(safe_browsing_info_));
|
||||
throttles.push_back(
|
||||
@@ -1,24 +0,0 @@
|
||||
# STATUS_SUCCESS conflicts with sandbox/win/src/nt_internals.h
|
||||
|
||||
--- a/extensions/browser/api/feedback_private/feedback_private_api.cc
|
||||
+++ b/extensions/browser/api/feedback_private/feedback_private_api.cc
|
||||
@@ -370,7 +370,7 @@ void FeedbackPrivateSendFeedbackFunction::OnCompleted(
|
||||
bool success) {
|
||||
Respond(TwoArguments(
|
||||
std::make_unique<base::Value>(feedback_private::ToString(
|
||||
- success ? feedback_private::STATUS_SUCCESS
|
||||
+ success ? feedback_private::STATUS_SUCCESS1
|
||||
: feedback_private::STATUS_DELAYED)),
|
||||
std::make_unique<base::Value>(feedback_private::ToString(type))));
|
||||
if (!success) {
|
||||
--- a/extensions/common/api/feedback_private.idl
|
||||
+++ b/extensions/common/api/feedback_private.idl
|
||||
@@ -91,7 +91,7 @@ namespace feedbackPrivate {
|
||||
};
|
||||
|
||||
// Status of the sending of a feedback report.
|
||||
- enum Status {success, delayed};
|
||||
+ enum Status {success1, delayed};
|
||||
|
||||
// The type of the landing page shown to the user when the feedback report is
|
||||
// successfully sent.
|
||||
@@ -1,12 +0,0 @@
|
||||
# <alogrithm> functions are used in this file, but the include is missing.
|
||||
|
||||
--- a/media/formats/mp2t/es_parser_adts.cc
|
||||
+++ b/media/formats/mp2t/es_parser_adts.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
+#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
Reference in New Issue
Block a user