Browse Source

Add add-flag-to-hide-crashed-bubble.patch

Fixes #419
Eloston 5 years ago
parent
commit
4a0af9e309

+ 1 - 0
config_bundles/common/patch_order.list

@@ -116,6 +116,7 @@ ungoogled-chromium/disable-webgl-renderer-info.patch
 ungoogled-chromium/add-flag-to-show-avatar-button.patch
 ungoogled-chromium/no-such-option-no-sysroot.patch
 ungoogled-chromium/add-suggestions-url-field.patch
+ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch
 
 bromite/fingerprinting-flags-client-rects-and-measuretext.patch
 bromite/flag-max-connections-per-host.patch

+ 2 - 1
docs/flags.md

@@ -2,7 +2,7 @@
 
 This is an exhaustive list of command-line switches and `chrome://flags` introduced by ungoogled-chromium:
 
-* `--disable-beforeunload` - (Not in `chrome://flags`) Disables JavaScript dialog boxes triggered by `beforeunload`
+* `--disable-beforeunload` (Not in `chrome://flags`) - Disables JavaScript dialog boxes triggered by `beforeunload`
 * `--disable-encryption` (Windows only, not in `chrome://flags`) - Disable encryption of cookies, passwords, and settings which uses a generated machine-specific encryption key. This is used to enable portable user data directories.
 * `--disable-machine-id` (Windows only, not in `chrome://flags`) - Disables use of a generated machine-specific ID to lock the user data directory to that machine. This is used to enable portable user data directories.
 * `--disable-search-engine-collection` - Disable automatic search engine scraping from webpages.
@@ -14,3 +14,4 @@ This is an exhaustive list of command-line switches and `chrome://flags` introdu
 * `--max-connections-per-host` (from Bromite) - Configure the maximum allowed connections per host.
 * `--set-ipv6-probe-false` - (Not in `chrome://flags`) Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible.
 * `--show-avatar-button` - Sets visibility of the avatar button. The flag requires one of the values: `always`, `incognito-and-guest` (only show Incognito or Guest modes), or `never`.
+* `--hide-crashed-bubble` (Not in `chrome://flags`) - Hides the bubble box with the message "Restore Pages? Chromium didn't shut down correctly." that shows on startup after the browser did not exit cleanly.

+ 15 - 0
patches/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch

@@ -0,0 +1,15 @@
+# Add flag --hide-crashed-bubble to hide the bubble box:
+# "Restore Pages? Chromium didn't shut down correctly."
+
+--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
++++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+@@ -767,7 +767,8 @@ void StartupBrowserCreatorImpl::AddInfoB
+   if (!browser || !profile_ || browser->tab_strip_model()->count() == 0)
+     return;
+ 
+-  if (HasPendingUncleanExit(browser->profile())) {
++  if (HasPendingUncleanExit(browser->profile()) &&
++      !command_line.HasSwitch("hide-crashed-bubble")) {
+     SessionCrashedBubble::Show(browser);
+   }
+