Skip to content

Commit

Permalink
Revert "Add Chromium-Untrusted Support"
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Jan 8, 2025
1 parent 5049491 commit a5b8533
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 445 deletions.

This file was deleted.

3 changes: 0 additions & 3 deletions ios/browser/brave_web_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ class BraveWebClient : public ChromeWebClient {
void PostBrowserURLRewriterCreation(
web::BrowserURLRewriter* rewriter) override;

void GetAdditionalWebUISchemes(
std::vector<std::string>* additional_schemes) override;

bool IsWebUIMessageAllowedForFrame(WKFrameInfo* frame,
const GURL& origin,
NSString** prompt,
Expand Down
11 changes: 1 addition & 10 deletions ios/browser/brave_web_client.mm
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@

schemes->standard_schemes.push_back(kBraveUIScheme);
schemes->secure_schemes.push_back(kBraveUIScheme);

schemes->standard_schemes.push_back(kChromeUIUntrustedScheme);
schemes->secure_schemes.push_back(kChromeUIUntrustedScheme);
}

bool BraveWebClient::IsAppSpecificURL(const GURL& url) const {
return ChromeWebClient::IsAppSpecificURL(url) ||
url.SchemeIs(kBraveUIScheme) || url.SchemeIs(kChromeUIUntrustedScheme);
return ChromeWebClient::IsAppSpecificURL(url) || url.SchemeIs(kBraveUIScheme);
}

bool WillHandleBraveURLRedirect(GURL* url, web::BrowserState* browser_state) {
Expand All @@ -82,11 +78,6 @@ bool WillHandleBraveURLRedirect(GURL* url, web::BrowserState* browser_state) {
ChromeWebClient::PostBrowserURLRewriterCreation(rewriter);
}

void BraveWebClient::GetAdditionalWebUISchemes(
std::vector<std::string>* additional_schemes) {
ChromeWebClient::GetAdditionalWebUISchemes(additional_schemes);
}

bool BraveWebClient::IsWebUIMessageAllowedForFrame(WKFrameInfo* frame,
const GURL& origin,
NSString** prompt,
Expand Down
2 changes: 0 additions & 2 deletions ios/browser/ui/webui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ source_set("webui") {
sources = [
"brave_web_ui_controller_factory.h",
"brave_web_ui_controller_factory.mm",
"brave_webui_data_source.h",
"brave_webui_data_source.mm",
"brave_webui_source.h",
"brave_webui_source.mm",
]
Expand Down
5 changes: 1 addition & 4 deletions ios/browser/ui/webui/brave_web_ui_controller_factory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
// a tab, based on its URL. Returns nullptr if the URL doesn't have WebUIIOS
// associated with it.
WebUIIOSFactoryFunction GetWebUIIOSFactoryFunction(const GURL& url) {
const char kChromeUIUntrustedScheme[] = "chrome-untrusted";

// This will get called a lot to check all URLs, so do a quick check of other
// schemes to filter out most URLs.
if (!url.SchemeIs(kBraveUIScheme) && !url.SchemeIs(kChromeUIScheme) &&
!url.SchemeIs(kChromeUIUntrustedScheme)) {
if (!url.SchemeIs(kBraveUIScheme) && !url.SchemeIs(kChromeUIScheme)) {
return nullptr;
}

Expand Down
93 changes: 0 additions & 93 deletions ios/browser/ui/webui/brave_webui_data_source.h

This file was deleted.

Loading

0 comments on commit a5b8533

Please sign in to comment.