Closed Bug 799784 Opened 12 years ago Closed 12 years ago

Replace usages of nsIPrivateBrowsingService.autoStarted with PrivateBrowsingUtils.permanentPrivateBrowsing

Categories

(Firefox :: Private Browsing, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 19

People

(Reporter: ehsan.akhgari, Assigned: andreshm)

References

Details

(Whiteboard: [appcoast])

Attachments

(1 file, 1 obsolete file)

This should be fairly straightforward with the API added in bug 799780.  Here's the list of current places where this is used:

http://mxr.mozilla.org/mozilla-central/search?string=autoStarted

Note that not all of those places need to be modified, we're basically trying to modify the consumers of the API.
Whiteboard: [appcoast]
Assignee: nobody → andres
Attached patch Patch v1 (obsolete) — Splinter Review
Just changed the consumers. I kept the nsPrivateBrowsingService::autoStarted value and tests related, is this going to be removed in another bug?
Attachment #674738 - Flags: review?(ehsan)
(In reply to Andres Hernandez [:andreshm] from comment #1)
> Created attachment 674738 [details] [diff] [review]
> Patch v1
> 
> Just changed the consumers. I kept the nsPrivateBrowsingService::autoStarted
> value and tests related, is this going to be removed in another bug?

No, we're planning to just not build nsPrivateBrowsingService at all in per-window PB bugs.  That should implicitly take care of that!
Comment on attachment 674738 [details] [diff] [review]
Patch v1

Review of attachment 674738 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great overall!  I just have a couple of nits.

::: browser/components/preferences/in-content/security.js
@@ +89,5 @@
>    {
>      var pref = document.getElementById("signon.rememberSignons");
>      var excepts = document.getElementById("passwordExceptions");
>  
> +    Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");

Nit: please move this to the top of the file (same as in the other copy of security.js.

::: browser/components/sessionstore/src/nsSessionStartup.js
@@ +39,5 @@
>  Cu.import("resource://gre/modules/Services.jsm");
>  Cu.import("resource://gre/modules/TelemetryStopwatch.jsm");
>  
> +XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
> +  "resource://gre/modules/PrivateBrowsingUtils.jsm");

Nit: please just use Cu.import, as this is going to be used in the initialization anyway.
Attachment #674738 - Flags: review?(ehsan) → review+
Status: NEW → ASSIGNED
Attached patch Patch v2Splinter Review
Attachment #674738 - Attachment is obsolete: true
Attachment #674805 - Flags: review?(ehsan)
Comment on attachment 674805 [details] [diff] [review]
Patch v2

Review of attachment 674805 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great, thanks!
Attachment #674805 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/c90c5809e56e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: