зеркало из https://github.com/mozilla/gecko-dev.git
Bug 482334 - Entering "always on" mode of Private Browsing should not show last session; r=zeniko ui-r=mconnor
This commit is contained in:
Родитель
e8549e29b0
Коммит
0575b2e1f1
|
@ -43,7 +43,8 @@
|
||||||
# * Overview
|
# * Overview
|
||||||
# * This service reads user's session file at startup, and makes a determination
|
# * This service reads user's session file at startup, and makes a determination
|
||||||
# * as to whether the session should be restored. It will restore the session
|
# * as to whether the session should be restored. It will restore the session
|
||||||
# * under the circumstances described below.
|
# * under the circumstances described below. If the auto-start Private Browsing
|
||||||
|
# * mode is active, however, the session is never restored.
|
||||||
# *
|
# *
|
||||||
# * Crash Detection
|
# * Crash Detection
|
||||||
# * The session file stores a session.state property, that
|
# * The session file stores a session.state property, that
|
||||||
|
@ -95,6 +96,12 @@ SessionStartup.prototype = {
|
||||||
* Initialize the component
|
* Initialize the component
|
||||||
*/
|
*/
|
||||||
init: function sss_init() {
|
init: function sss_init() {
|
||||||
|
// do not need to initialize anything in auto-started private browsing sessions
|
||||||
|
let pbs = Cc["@mozilla.org/privatebrowsing;1"].
|
||||||
|
getService(Ci.nsIPrivateBrowsingService);
|
||||||
|
if (pbs.autoStarted)
|
||||||
|
return;
|
||||||
|
|
||||||
let prefBranch = Cc["@mozilla.org/preferences-service;1"].
|
let prefBranch = Cc["@mozilla.org/preferences-service;1"].
|
||||||
getService(Ci.nsIPrefService).getBranch("browser.");
|
getService(Ci.nsIPrefService).getBranch("browser.");
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче