Skip to content

Commit 77e2a7e

Browse files
author
Niklas Baumgardner
committed
Bug 1883143 - Initial profiles setup. r=jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D203299
1 parent 69ebdb9 commit 77e2a7e

File tree

11 files changed

+72
-0
lines changed

11 files changed

+72
-0
lines changed

browser/app/profile/firefox.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3025,5 +3025,8 @@ pref("browser.mailto.prompt.os", true);
30253025

30263026
pref("browser.backup.enabled", false);
30273027

3028+
// Pref to enable the new profiles
3029+
pref("browser.profiles.enabled", false);
3030+
30283031
pref("startup.homepage_override_url_nimbus", "");
30293032
pref("startup.homepage_override_nimbus_maxVersion", "");

browser/base/content/browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ var gInitialPages = [
717717
"about:welcome",
718718
"about:welcomeback",
719719
"chrome://browser/content/blanktab.html",
720+
"about:profilemanager",
720721
];
721722

722723
function isInitialPage(url) {

browser/components/BrowserGlue.sys.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,17 @@ let JSWINDOWACTORS = {
674674
allFrames: true,
675675
},
676676

677+
Profiles: {
678+
parent: {
679+
esModuleURI: "resource:///actors/ProfilesParent.sys.mjs",
680+
},
681+
child: {
682+
esModuleURI: "resource:///actors/ProfilesChild.sys.mjs",
683+
},
684+
matches: ["about:profilemanager"],
685+
enablePreference: "browser.profiles.enabled",
686+
},
687+
677688
Prompt: {
678689
parent: {
679690
esModuleURI: "resource:///actors/PromptParent.sys.mjs",

browser/components/about/AboutRedirector.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ static const RedirEntry kRedirMap[] = {
163163
{"ion", "chrome://browser/content/ion.html",
164164
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT |
165165
nsIAboutModule::IS_SECURE_CHROME_UI},
166+
{"profilemanager", "chrome://browser/content/profiles/profiles.html",
167+
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
168+
nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
169+
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS},
166170
};
167171

168172
static nsAutoCString GetAboutModuleName(nsIURI* aURI) {

browser/components/about/components.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pages = [
2525
'preferences',
2626
'privatebrowsing',
2727
'protections',
28+
'profilemanager',
2829
'profiling',
2930
'reader',
3031
'restartrequired',

browser/components/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ DIRS += [
5151
"pocket",
5252
"preferences",
5353
"privatebrowsing",
54+
"profiles",
5455
"prompts",
5556
"protections",
5657
"protocolhandler",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
export class ProfilesChild extends JSWindowActorParent {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
export class ProfilesParent extends JSWindowActorParent {}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- This Source Code Form is subject to the terms of the Mozilla Public
2+
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
4+
<!DOCTYPE html>
5+
<html
6+
xmlns="http://www.w3.org/1999/xhtml"
7+
role="document"
8+
class="system-font-size"
9+
>
10+
<head>
11+
<meta charset="utf-8" />
12+
<meta
13+
http-equiv="Content-Security-Policy"
14+
content="default-src resource: chrome:; object-src 'none'; img-src chrome:;"
15+
/>
16+
</head>
17+
<body>
18+
<h1>Hello world - New Profiles</h1>
19+
</body>
20+
</html>

browser/components/profiles/jar.mn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
browser.jar:
6+
content/browser/profiles/profiles.html (content/profiles.html)

browser/components/profiles/moz.build

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2+
# vim: set filetype=python:
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
JAR_MANIFESTS += ["jar.mn"]
8+
9+
FINAL_TARGET_FILES.actors += [
10+
"ProfilesChild.sys.mjs",
11+
"ProfilesParent.sys.mjs",
12+
]
13+
14+
with Files("**"):
15+
BUG_COMPONENT = ("Firefox", "Profiles")

0 commit comments

Comments
 (0)