Remove clear-http-auth-cache-menu-item.patch

Using the menu item causes the entire browser to segfault. It can be
re-added once it has been updated.

See #761
This commit is contained in:
Eloston
2019-05-12 21:25:40 +00:00
parent 43ec829d19
commit 395876db02
3 changed files with 0 additions and 154 deletions
-1
View File
@@ -62,7 +62,6 @@ Contents of this section:
* Use HTTPS by default when a URL scheme is not provided (e.g. Omnibox, bookmarks, command-line)
* Add *Suggestions URL* text field in the search engine editor (`chrome://settings/searchEngines`) for customizing search engine suggestions.
* Add menu item under "More tools" to clear the HTTP authentication cache on-demand
* Add more URL schemes allowed to save page schemes.
* Add Omnibox search provider "No Search" to allow disabling of searching
* Add a custom cross-platform build configuration and packaging wrapper for Chromium. It currently supports many Linux distributions, macOS, and Windows. (See [docs/design.md](docs/design.md) for details on the system.)
@@ -1,152 +0,0 @@
# Adds a menu item under "More tools" to clear the HTTP authentication cache on demand
--- a/chrome/app/chrome_command_ids.h
+++ b/chrome/app/chrome_command_ids.h
@@ -150,6 +150,7 @@
#define IDC_MANAGE_EXTENSIONS 40022
#define IDC_DEV_TOOLS_INSPECT 40023
#define IDC_UPGRADE_DIALOG 40024
+#define IDC_CLEAR_HTTP_AUTH_CACHE 40026
#define IDC_PROFILING_ENABLED 40028
#define IDC_BOOKMARKS_MENU 40029
#define IDC_SHOW_SIGNIN 40030
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1130,6 +1130,9 @@ are declared in tools/grit/grit_rule.gni
<message name="IDS_CLEAR_BROWSING_DATA" desc="The text label for the menu item for clearing of browsing data">
&amp;Clear browsing data...
</message>
+ <message name="IDS_CLEAR_HTTP_AUTH_CACHE" desc="The text label for the menu item for clearing the HTTP authentication cache">
+ Clear &amp;HTTP auth cache
+ </message>
<message name="IDS_SHOW_DOWNLOADS" desc="The show downloads menu in the app menu">
&amp;Downloads
</message>
@@ -1168,6 +1171,9 @@ are declared in tools/grit/grit_rule.gni
<message name="IDS_CLEAR_BROWSING_DATA" desc="In Title Case: The text label for the menu item for clearing of browsing data">
&amp;Clear Browsing Data...
</message>
+ <message name="IDS_CLEAR_HTTP_AUTH_CACHE" desc="In Title Case: The text label for the menu item for clearing the HTTP authentication cache">
+ Clear &amp;HTTP Auth Cache
+ </message>
<message name="IDS_SHOW_DOWNLOADS" desc="In Title Case: The show downloads menu in the app menu">
&amp;Downloads
</message>
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -212,6 +212,7 @@ void ToolsMenuModel::Build(Browser* brow
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringId(IDC_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA);
+ AddItemWithStringId(IDC_CLEAR_HTTP_AUTH_CACHE, IDS_CLEAR_HTTP_AUTH_CACHE);
AddItemWithStringId(IDC_MANAGE_EXTENSIONS, IDS_SHOW_EXTENSIONS);
if (chrome::CanOpenTaskManager())
AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
@@ -481,6 +482,13 @@ void AppMenuModel::LogMenuMetrics(int co
}
LogMenuAction(MENU_ACTION_CLEAR_BROWSING_DATA);
break;
+ case IDC_CLEAR_HTTP_AUTH_CACHE:
+ if (!uma_action_recorded_) {
+ UMA_HISTOGRAM_MEDIUM_TIMES("WrenchMenu.TimeToAction.ClearHttpAuthCache",
+ delta);
+ }
+ LogMenuAction(MENU_ACTION_CLEAR_HTTP_AUTH_CACHE);
+ break;
case IDC_VIEW_SOURCE:
if (!uma_action_recorded_)
UMA_HISTOGRAM_MEDIUM_TIMES("WrenchMenu.TimeToAction.ViewSource", delta);
--- a/chrome/browser/ui/toolbar/app_menu_model.h
+++ b/chrome/browser/ui/toolbar/app_menu_model.h
@@ -77,6 +77,7 @@ enum AppMenuAction {
MENU_ACTION_OPEN_IN_CHROME = 48,
MENU_ACTION_SITE_SETTINGS = 49,
MENU_ACTION_APP_INFO = 50,
+ MENU_ACTION_CLEAR_HTTP_AUTH_CACHE = 51,
LIMIT_MENU_ACTION
};
--- a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
+++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
@@ -229,6 +229,7 @@ GlobalMenuBarCommand tools_menu[] = {
{IDS_TASK_MANAGER, IDC_TASK_MANAGER},
{IDS_CLEAR_BROWSING_DATA, IDC_CLEAR_BROWSING_DATA},
+ {IDS_CLEAR_HTTP_AUTH_CACHE, IDC_CLEAR_HTTP_AUTH_CACHE},
{MENU_SEPARATOR, MENU_SEPARATOR},
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -66,6 +66,9 @@
#include "extensions/browser/extension_system.h"
#include "printing/buildflags/buildflags.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "net/url_request/url_request_context.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "net/http/http_transaction_factory.h"
#if defined(OS_MACOSX)
#include "chrome/browser/ui/browser_commands_mac.h"
@@ -658,6 +661,9 @@ bool BrowserCommandController::ExecuteCo
case IDC_CLEAR_BROWSING_DATA:
ShowClearBrowsingDataDialog(browser_);
break;
+ case IDC_CLEAR_HTTP_AUTH_CACHE:
+ profile()->GetRequestContext()->GetURLRequestContext()->http_transaction_factory()->GetSession()->http_auth_cache()->Clear();
+ break;
case IDC_IMPORT_SETTINGS:
ShowImportDialog(browser_);
break;
@@ -926,6 +932,7 @@ void BrowserCommandController::InitComma
!profile()->IsOffTheRecord());
command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA,
!guest_session);
+ command_updater_.UpdateCommandEnabled(IDC_CLEAR_HTTP_AUTH_CACHE, true);
#if defined(OS_CHROMEOS)
command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true);
#else
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -149004,6 +149004,7 @@ uploading your change for review.
<suffix name="Cast"/>
<suffix name="ChromeOSRestart"/>
<suffix name="ClearBrowsingData"/>
+ <suffix name="ClearHttpAuthCache"/>
<suffix name="Copy"/>
<suffix name="CopyUrl"/>
<suffix name="CreateHostedApp"/>
--- a/net/http/http_auth_cache.cc
+++ b/net/http/http_auth_cache.cc
@@ -249,6 +249,10 @@ bool HttpAuthCache::Remove(const GURL& o
return false;
}
+void HttpAuthCache::Clear() {
+ entries_.clear();
+}
+
void HttpAuthCache::ClearEntriesAddedSince(base::Time begin_time) {
if (begin_time.is_null()) {
ClearAllEntries();
--- a/net/http/http_auth_cache.h
+++ b/net/http/http_auth_cache.h
@@ -177,6 +177,8 @@ class NET_EXPORT HttpAuthCache {
HttpAuth::Scheme scheme,
const AuthCredentials& credentials);
+ void Clear();
+
// Clears cache entries added since |begin_time| or all entries if
// |begin_time| is null.
void ClearEntriesAddedSince(base::Time begin_time);
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -58640,6 +58640,7 @@ Full version information for the fingerp
<int value="48" label="Open in Chrome"/>
<int value="49" label="Site Settings"/>
<int value="50" label="App Info"/>
+ <int value="51" label="Clear HTTP auth cache"/>
</enum>
<enum name="XFrameOptions">
-1
View File
@@ -63,7 +63,6 @@ extra/iridium-browser/updater-disable-auto-update.patch
extra/iridium-browser/Remove-EV-certificates.patch
extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch
extra/ungoogled-chromium/add-third-party-ungoogled.patch
extra/ungoogled-chromium/clear-http-auth-cache-menu-item.patch
extra/ungoogled-chromium/disable-formatting-in-omnibox.patch
extra/ungoogled-chromium/popups-to-tabs.patch
extra/ungoogled-chromium/add-ipv6-probing-option.patch