Skip to content

Commit

Permalink
Revert "Add Chromium-Untrusted Support"
Browse files Browse the repository at this point in the history
023ac52

Signed-off-by: Brandon T <[email protected]>
  • Loading branch information
Brandon-T committed Dec 18, 2024
1 parent 1ab521c commit 167db02
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 @@ -35,9 +35,6 @@ class BraveWebClient : public ChromeWebClient {
void PostBrowserURLRewriterCreation(
web::BrowserURLRewriter* rewriter) override;

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

private:
std::string user_agent_;
};
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 @@ -44,14 +44,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 @@ -75,8 +71,3 @@ bool WillHandleBraveURLRedirect(GURL* url, web::BrowserState* browser_state) {
rewriter->AddURLRewriter(&WillHandleBraveURLRedirect);
ChromeWebClient::PostBrowserURLRewriterCreation(rewriter);
}

void BraveWebClient::GetAdditionalWebUISchemes(
std::vector<std::string>* additional_schemes) {
ChromeWebClient::GetAdditionalWebUISchemes(additional_schemes);
}
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 167db02

Please sign in to comment.