Disable menu File > Import when in Private Browsing mode, because it doesn't work for cookies and history

RESOLVED FIXED in Firefox 3.6a1

Status

()

RESOLVED FIXED
10 years ago
7 years ago

People

(Reporter: marcia, Assigned: Ehsan)

Tracking

({verified1.9.1})

Trunk
Firefox 3.6a1
verified1.9.1
Points:
---
Bug Flags:
blocking-firefox3.5 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Seen while testing  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081113 Minefield/3.1b2pre.

STR
1. Enter PB mode.
2. File | Import
3. Import from Safari - check all radio buttons

Expected: I would be able to import all data even in PB mode
Actual: Nothing imports

When I tested this the other day the import did work, so perhaps something changed between now and then.  Also, when performing the same STR on Windows Vista, FF takes an awful long time to complete the import process. I will file a separate bug on that issue.
I just tried this (with today's Minefield nightly) and had no problems.

Do you still see this, Marcia?

I tested on OS X 10.5.5.
(Reporter)

Comment 2

10 years ago
A cursory test using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081120 Minefield/3.1b2pre reveals the following:

*Bookmarks are imported
*Saved form history is not (Bug 363488)
*Browsing History is not
*Cookies are not
*Preferences - I am uncertain as to what preferences would come over so that is an open issue.

Updating bug summary to reflect the latest issues I see.
Summary: Cannot import any data while in Private Browsing mode → Cannot import History and Cookies from Safari while in Private Browsing mode
(Reporter)

Updated

10 years ago
Version: 3.0 Branch → Trunk
(Assignee)

Comment 3

10 years ago
I think the reason is that the usual Places API for adding history entries is disabled in PB mode, and the cookies DB is also using an in-memory DB which will expire at the end of the private session.

Before we jump at a fix, do we really want to allow imports from within the PB mode at all?  I think we should disable the File -> Import menu entry.  Another place which can invoke this UI is when importing bookmarks from the Library.  I guess we can leave that enabled since adding bookmarks using the Places API does work in PB mode.

mconnor/Alex/Beltzner, what do you think?
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
I'm fine with disabling the menu items to import bookmarks.  In general this seems like an odd thing to want to be able to do while in private browsing mode.
(Assignee)

Updated

10 years ago
OS: Mac OS X → All
Hardware: PC → All
(Assignee)

Comment 5

10 years ago
Created attachment 350465 [details] [diff] [review]
Patch (v1)

Simple patch, with a unit test.
Attachment #350465 - Flags: review?(mconnor)
(Assignee)

Comment 6

10 years ago
Mass moving of all Firefox::General private browsing bugs to Firefox::Private Browsing.
Component: General → Private Browsing
(Assignee)

Updated

10 years ago
QA Contact: general → private.browsing
(Assignee)

Comment 7

10 years ago
Created attachment 357556 [details] [diff] [review]
Patch (v1.1)

Unbitrotted patch.
Attachment #350465 - Attachment is obsolete: true
Attachment #357556 - Flags: review?(gavin.sharp)
Attachment #350465 - Flags: review?(mconnor)
(Assignee)

Comment 8

10 years ago
Comment on attachment 357556 [details] [diff] [review]
Patch (v1.1)

mconnor: this patch should not be too difficult to review, could you please take a look at it?
Attachment #357556 - Flags: review?(gavin.sharp) → review?(mconnor)
(Assignee)

Updated

10 years ago
Whiteboard: [has patch][needs review mconnor]
Attachment #357556 - Flags: review?(mconnor) → review+
Comment on attachment 357556 [details] [diff] [review]
Patch (v1.1)

Sigh... I'm not sure how I ended up missing this review request...
http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/places.js#365 also triggers the import window (although possibly only for bookmarks). It might need similar treatment?
Whiteboard: [has patch][needs review mconnor] → [has patch]
Ideally, I guess we would have a consolidated way to opening migration.xul that fails if private browsing is enabled.

Updated

10 years ago
Flags: blocking-firefox3.1+
Whiteboard: [has patch] → [has patch][has reviews]
(Assignee)

Comment 12

10 years ago
(In reply to comment #10)
> http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/places.js#365
> also triggers the import window (although possibly only for bookmarks). It
> might need similar treatment?

I don't think so, because bookmarks can actually be stored inside the private browsing mode.
(Assignee)

Comment 13

10 years ago
http://hg.mozilla.org/mozilla-central/rev/59e2945cce3c
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [has patch][has reviews]
Target Milestone: --- → Firefox 3.2a1
I backed this out on suspicion of causing semi-random mochichrome orange (which did indeed clear up).  Please reland on its own at some point, or at least not with the other two patches it landed with.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 16

10 years ago
Relanded on trunk: <http://hg.mozilla.org/mozilla-central/rev/44e28804fd03>
Status: REOPENED → RESOLVED
Last Resolved: 10 years ago10 years ago
Resolution: --- → FIXED
(Reporter)

Comment 17

10 years ago
Verified fixed on the 1.9.1 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090220 Shiretoko/3.1b3pre. The "Import" option is greyed out in the File menu and in the Bookmarks organizer during PB.

Verified fixed on the trunk using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090220 Minefield/3.2a1pre.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1

Comment 18

10 years ago
Based on discussion w/ Marcia on #testday reopening since the Import HTML in Organise Bookmarks was not, in fact, disabled along with the File Import and leads to the same dialog.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
First, really should have filed a new bug instead of reopening an old bug.  Second, this is fine, and was brought up in comment 10 by gavin.  Since we actually save bookmarks in Private Browsing mode, this is fine and there's no need to disable this case.
Status: REOPENED → RESOLVED
Last Resolved: 10 years ago10 years ago
Resolution: --- → FIXED

Comment 20

10 years ago
Sorry, missed comment #10 - this came up in discussion of a testcase referencing that menu item and after reading comment #17.

Bookmarks organiser option doesn't matter then. Fine.  Although is certainly not that useful and possibly a bit confusing.

Anyway, since I do try to rarely get in trouble with bug statuses, and did discuss it with others, for future reference, if it seems the patch did not actually disable the item it was supposed to disable, why wouldn't the bug be reopened?
(In reply to comment #20)
> Anyway, since I do try to rarely get in trouble with bug statuses, and did
> discuss it with others, for future reference, if it seems the patch did not
> actually disable the item it was supposed to disable, why wouldn't the bug be
> reopened?

It did disable the item it meant to disable, as far as I can tell. The File->Import menu item is disabled when private browsing mode is enabled (testing the latest Windows branch nightly). Are you saying you're not seeing that?
(Assignee)

Comment 22

10 years ago
(In reply to comment #21)
> (In reply to comment #20)
> > Anyway, since I do try to rarely get in trouble with bug statuses, and did
> > discuss it with others, for future reference, if it seems the patch did not
> > actually disable the item it was supposed to disable, why wouldn't the bug be
> > reopened?
> 
> It did disable the item it meant to disable, as far as I can tell. The
> File->Import menu item is disabled when private browsing mode is enabled
> (testing the latest Windows branch nightly).

And in fact we have an automated test which makes sure that's the case all the time.

Comment 23

7 years ago
Tweaking summary to match the outcome.
Summary: Cannot import History and Cookies from Safari while in Private Browsing mode → Disable menu File > Import when in Private Browsing mode, because it doesn't work for cookies and history
You need to log in before you can comment on or make changes to this bug.