[PATCH] storage: set privatemode in initialization

11 views
Skip to first unread message

Anthony Martin

unread,
Oct 4, 2011, 7:41:58 AM10/4/11
to dactyl-...@googlegroups.com
# HG changeset patch
# User Anthony Martin <al...@pbrane.org>
# Date 1317728469 25200
# Node ID 658c0d4b56d2f1965e61050f657579a046057ce3
# Parent 8e30639025d7df01aeacc0fd029c6bb354f75d86
storage: set privatemode in initialization

When Firefox is set to start in private mode
the "private-browsing" observer in Sanitizer
never receives an "enter" event which means
storage.privateMode will never be set.

Explicitly check for this case in Storage.init.

diff -r 8e30639025d7 -r 658c0d4b56d2 common/modules/storage.jsm
--- a/common/modules/storage.jsm Tue Oct 04 07:02:51 2011 -0400
+++ b/common/modules/storage.jsm Tue Oct 04 04:41:09 2011 -0700
@@ -160,6 +160,9 @@
alwaysReload: {},

init: function () {
+ if (services.has("privateBrowsing") && services.privateBrowsing.privateBrowsingEnabled)
+ this._privateMode = true;
+
this.cleanup();

if (services.bootstrap && !services.bootstrap.session)

Kris Maglione

unread,
Oct 4, 2011, 5:26:24 PM10/4/11
to dactyl-...@googlegroups.com
I'll need to think about this first. The other private browsing
observers also need to be called at some point, probably as soon
as they're registered if PBM is already enabled, and I should be
able to refactor options so that they don't need one.

--
Kris Maglione

Science is interesting, and if you don't agree you can fuck off.
--Nigel Calder, former editor of New Scientist

Anthony Martin

unread,
Oct 4, 2011, 7:19:42 PM10/4/11
to dactyl-...@googlegroups.com
Kris Maglione <magli...@gmail.com> once said:
> I'll need to think about this first. The other private browsing
> observers also need to be called at some point, probably as soon as
> they're registered if PBM is already enabled, and I should be able
> to refactor options so that they don't need one.

That sounds like a better idea.

Thanks,
Anthony

Reply all
Reply to author
Forward
0 new messages