Closed Bug 630341 Opened 13 years ago Closed 13 years ago

clear private data doesn't clear "tabs from last time"

Categories

(Firefox for Android Graveyard :: General, defect, P2)

defect

Tracking

(fennec2.0+)

VERIFIED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: vlad, Assigned: mfinkle)

Details

Attachments

(1 file)

Any tabs present in the "last time" list aren't cleared if you hit clear private data.  The STR are a bit weird:

- open slashdot.org
- hit home to suspend fennec, kill fennec (using white killer or similar)
- restart fennec, the old tab is opened as part of session restore
- close tab  -- it's now listed in "undo close tab", no other tabs are open and you're looking at the home screen, which has the tab in "tabs from last time"
- hit clear private data
- hit home to suspend fennec and kill fennec
- restart fennec

at that point, the tab still shows up in "tabs from last time" even though everything else is cleared.
"tabs from last time" is not considered private data. we load the data from the session store json file.
ok, but the tab was closed already even -- why is it even appearing in tabs from last time?
(regardless, that's unexpected that your set of tabs is not considered "private data"!)
Vlad asked to comment on desktop sessionstore... FWIW that clears closed tabs & windows when we get browser:purge-session-history.
OS: Windows 7 → All
Hardware: x86 → All
tracking-fennec: --- → ?
Priority: -- → P2
tracking-fennec: ? → 2.0+
Assignee: nobody → mark.finkle
Attached patch patchSplinter Review
Using the desktop session store as a guide I added support for browser:purge-session-history as follows:
1. Always clear the sessionstore.js and .bak files when we get the notification
2. If we are shutting down, we are done
3. Drop any data about closed tabs, Fennec doesn't track windows since there is only one
4. re-save the state after step #3

Since we do #4, we will remember any tabs still open when the "Clear" private data button is pressed. If Fennec supported "Clear private data on shutdown" we would not.
Attachment #512913 - Flags: review?(mbrubeck)
Comment on attachment 512913 [details] [diff] [review]
patch

>+        for (let ix in this._windows)
>+          this._windows[ix].closedTabs = [];

Nit: I prefer "for (let [ix, win] in Iterator(this._windows))" because it is less fragile against people monkeying with prototypes.  (I know the above pattern is used elsewhere in the file; you don't have to fix it everywhere.)
Attachment #512913 - Flags: review?(mbrubeck) → review+
changed to use Iterator and pushed:
http://hg.mozilla.org/mobile-browser/rev/ac63b2800409
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
build id: Mozilla /5.0 (Android;Linux armv7l;rv:2.0b13pre)
Gecko/20110304 Firefox/4.0b13pre Fennec /4.0b6pre

The sites are not cleared instantly: 
- after clean data go to url bar
- in the awesome list the tabs from last time are still there
- tab other category: Bookmarks /History/Desktop and return to all pages or type some text 

-> the tabs from last time are not present anymore.

is this the expected ? 

I guess they should be deleted almost instantly without tapping something else
(In reply to comment #8)
> The sites are not cleared instantly: 
> - after clean data go to url bar
> - in the awesome list the tabs from last time are still there
> - tab other category: Bookmarks /History/Desktop and return to all pages or
> type some text 
> -> the tabs from last time are not present anymore.

This is bug 567121.
VERIFIED FIXED on:
Build ID: Mozilla /5.0 (Android;Linux armv7l;rv:2.0b13pre) Gecko/20110316
Firefox/4.0b13pre Fennec /4.0b6pre
Device: HTC Desire

The tabs are cleared even if you don't press "Clear" button from preferences:
-open more then two tabs
-quit Fennec with all tabs opened using Quit Fennec add-on 
-open Fennec (you will see the tabs from last time)
-quit Fennec again and reopen it

-> no tabs from last time present 

is this the expected result?
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: