Commit dba06fad authored by henry's avatar henry
Browse files

fixup! TB 7494: Create local home page for TBB.

TB 43886: Move about:tor redirector to browser/components/about/ and
change the home page to about:tor.
parent a4abc77c
Loading
Loading
Loading
Loading
+14 −1
Changes for browser/components/about/AboutRedirector.cpp: 14 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -26,7 +26,18 @@
#define ABOUT_WELCOME_CHROME_URL \
  "chrome://browser/content/aboutwelcome/aboutwelcome.html"
#define ABOUT_HOME_URL "about:home"
#define BASE_BROWSER_HOME_PAGE_URL "chrome://browser/content/blanktab.html"
// NOTE: We return "about:tor" rather than the "chrome:" path
// "chrome://browser/content/abouttor/aboutTor.html"
// The result is that the channel created in NewChannel in will have its
// resultPrincipalURI set to "about:tor".
// What this means in practice is that the loaded document's documentURI and
// currentURI will be "about:tor" rather than "about:newtab", "about:home",
// "about:welcome" or "about:privatebrowsing".
// The disadvantage of this is that we often need to add "about:tor" to places
// where "about:newtab" or other URIs appear.
// The advantage is that we maintain more control against changes in
// mozilla-central.
#define BASE_BROWSER_HOME_PAGE_URL "about:tor"

namespace mozilla {
namespace browser {
@@ -179,6 +190,8 @@ static const RedirEntry kRedirMap[] = {
         nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
         nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS},
#endif
    {"tor", "chrome://browser/content/abouttor/aboutTor.html",
     BASE_BROWSER_HOME_PAGE_FLAGS},
    // The correct URI must be obtained by GetManualChromeURI
    {"manual", "about:blank",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+1 −0
Changes for browser/components/about/components.conf: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ pages = [
    'sessionrestore',
    'settings',
    'tabcrashed',
    'tor',
    'unloads',
    'welcome',
    'welcomeback',
+1 −5
Changes for docshell/base/nsAboutRedirector.cpp: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -232,11 +232,7 @@ static const RedirEntry kRedirMap[] = {
         nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
         nsIAboutModule::URI_MUST_LOAD_IN_CHILD},
    {"crashgpu", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
    {"crashextensions", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
    {"tor", "chrome://browser/content/abouttor/aboutTor.html",
     nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
         nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
         nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI}};
    {"crashextensions", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT}};
static const int kRedirTotal = std::size(kRedirMap);

NS_IMETHODIMP
+0 −1
Changes for docshell/build/components.conf: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ about_pages = [
    'support',
    'torconnect',
    'translations',
    'tor',
    # Removed 'url-classifier'. tor-browser#42831.
]