mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Merge branch 'master' into fragmentation
This commit is contained in:
+15
-7
@@ -38,15 +38,23 @@ class _UrlRetrieveReportHook: #pylint: disable=too-few-public-methods
|
||||
self._last_percentage = None
|
||||
|
||||
def __call__(self, block_count, block_size, total_size):
|
||||
downloaded_estimate = block_count * block_size
|
||||
percentage = round(downloaded_estimate / total_size, ndigits=3)
|
||||
if percentage == self._last_percentage:
|
||||
return # Do not needlessly update the console
|
||||
self._last_percentage = percentage
|
||||
print('\r' + ' ' * self._max_len_printed, end='')
|
||||
if total_size > 0:
|
||||
# Use total_blocks to handle case total_size < block_size
|
||||
# total_blocks is ceiling of total_size / block_size
|
||||
# Ceiling division from: https://stackoverflow.com/a/17511341
|
||||
total_blocks = -(-total_size // block_size)
|
||||
if total_blocks > 0:
|
||||
# Do not needlessly update the console. Since the console is
|
||||
# updated synchronously, we don't want updating the console to
|
||||
# bottleneck downloading. Thus, only refresh the output when the
|
||||
# displayed value should change.
|
||||
percentage = round(block_count / total_blocks, ndigits=3)
|
||||
if percentage == self._last_percentage:
|
||||
return
|
||||
self._last_percentage = percentage
|
||||
print('\r' + ' ' * self._max_len_printed, end='')
|
||||
status_line = 'Progress: {:.1%} of {:,d} B'.format(percentage, total_size)
|
||||
else:
|
||||
downloaded_estimate = block_count * block_size
|
||||
status_line = 'Progress: {:,d} B of unknown size'.format(downloaded_estimate)
|
||||
self._max_len_printed = len(status_line)
|
||||
print('\r' + status_line, end='')
|
||||
|
||||
@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -399,7 +399,7 @@ config("compiler") {
|
||||
@@ -397,7 +397,7 @@ config("compiler") {
|
||||
if (!using_sanitizer && !is_safestack) {
|
||||
ldflags += [
|
||||
"-Wl,-z,defs",
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
description: add missing variable declaration
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -76,6 +76,8 @@ declare_args() {
|
||||
msvs_xtree_patched = false
|
||||
}
|
||||
|
||||
+ optimize_for_size = true
|
||||
+
|
||||
# Enable fatal linker warnings. Building Chromium with certain versions
|
||||
# of binutils can cause linker warning.
|
||||
# See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359
|
||||
@@ -28,7 +28,6 @@ debian_buster/fixes/mojo.patch
|
||||
debian_buster/fixes/sizet.patch
|
||||
debian_buster/fixes/alignof.patch
|
||||
debian_buster/fixes/polymer.patch
|
||||
debian_buster/fixes/optimize.patch
|
||||
debian_buster/fixes/ps-print.patch
|
||||
debian_buster/fixes/as-needed.patch
|
||||
debian_buster/fixes/constexpr.patch
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
--- a/components/url_formatter/url_fixer.cc
|
||||
+++ b/components/url_formatter/url_fixer.cc
|
||||
@@ -436,9 +436,9 @@
|
||||
@@ -436,9 +436,9 @@ std::string SegmentURLInternal(std::stri
|
||||
(*text)[semicolon] = ';';
|
||||
}
|
||||
if (!found_scheme) {
|
||||
@@ -19,10 +19,10 @@
|
||||
+ scheme = url::kHttpsScheme;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
--- a/components/omnibox/browser/autocomplete_input.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_input.cc
|
||||
@@ -233,7 +233,7 @@
|
||||
@@ -233,7 +233,7 @@ metrics::OmniboxInputType AutocompleteIn
|
||||
// We don't know about this scheme. It might be that the user typed a
|
||||
// URL of the form "username:password@foo.com".
|
||||
const base::string16 http_scheme_prefix =
|
||||
@@ -31,7 +31,7 @@
|
||||
url::kStandardSchemeSeparator);
|
||||
url::Parsed http_parts;
|
||||
base::string16 http_scheme;
|
||||
@@ -241,7 +241,7 @@
|
||||
@@ -241,7 +241,7 @@ metrics::OmniboxInputType AutocompleteIn
|
||||
metrics::OmniboxInputType http_type =
|
||||
Parse(http_scheme_prefix + text, desired_tld, scheme_classifier,
|
||||
&http_parts, &http_scheme, &http_canonicalized_url);
|
||||
@@ -40,7 +40,7 @@
|
||||
base::UTF16ToUTF8(http_scheme));
|
||||
|
||||
if ((http_type == metrics::OmniboxInputType::URL) &&
|
||||
@@ -570,7 +570,7 @@
|
||||
@@ -570,7 +570,7 @@ bool AutocompleteInput::HasHTTPScheme(co
|
||||
} else if (url::FindAndCompareScheme(utf8_input, kViewSourceScheme, &scheme)) {
|
||||
utf8_input.erase(0, scheme.end() + 1);
|
||||
}
|
||||
@@ -51,7 +51,7 @@
|
||||
void AutocompleteInput::UpdateText(const base::string16& text,
|
||||
--- a/components/omnibox/browser/autocomplete_provider.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_provider.cc
|
||||
@@ -188,11 +188,11 @@
|
||||
@@ -188,11 +188,11 @@ size_t AutocompleteProvider::TrimHttpPre
|
||||
if (!AutocompleteInput::HasHTTPScheme(*url))
|
||||
return 0;
|
||||
size_t scheme_pos =
|
||||
@@ -67,7 +67,7 @@
|
||||
++prefix_end;
|
||||
--- a/chrome/browser/resources/md_bookmarks/edit_dialog.js
|
||||
+++ b/chrome/browser/resources/md_bookmarks/edit_dialog.js
|
||||
@@ -93,7 +93,7 @@
|
||||
@@ -93,7 +93,7 @@ Polymer({
|
||||
|
||||
/**
|
||||
* Validates the value of the URL field, returning true if it is a valid URL.
|
||||
@@ -76,7 +76,7 @@
|
||||
* @return {boolean}
|
||||
* @private
|
||||
*/
|
||||
@@ -104,7 +104,7 @@
|
||||
@@ -104,7 +104,7 @@ Polymer({
|
||||
if (urlInput.validate())
|
||||
return true;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/common/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/common/safe_browsing/BUILD.gn
|
||||
@@ -73,11 +73,11 @@
|
||||
@@ -73,11 +73,11 @@ source_set("safe_browsing") {
|
||||
":file_type_policies",
|
||||
]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -1499,7 +1499,7 @@ config("default_warnings") {
|
||||
@@ -1497,7 +1497,7 @@ config("default_warnings") {
|
||||
# recognize.
|
||||
cflags += [
|
||||
# TODO(thakis): https://crbug.com/753973
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -730,14 +730,6 @@ config("compiler") {
|
||||
@@ -728,14 +728,6 @@ config("compiler") {
|
||||
ldflags += [ "-Wl,--no-rosegment" ]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user