Closed
Bug 458849
Opened 17 years ago
Closed 17 years ago
transition download visits saved when "Keep my history..." is unchecked.
Categories
(Firefox :: Bookmarks & History, defect, P2)
Firefox
Bookmarks & History
Tracking
()
VERIFIED
FIXED
Firefox 3.6a1
People
(Reporter: tiramisu_eater, Assigned: mak)
References
Details
(Keywords: privacy, verified1.9.1)
Attachments
(1 file, 2 obsolete files)
|
7.20 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
In the Privacy pane of preferences, I uncheck "Keep my history for at least ... days" (where ... is anything, e.g., 0). In the same pane, I clear private data, including history. I then visit the URL of a file such as a PDF file. "Show All History" then shows that the URL has been saved to History.
Reproducible: Always
Steps to Reproduce:
1. Open Preferences.
2. Select the Privacy pane.
3. Uncheck the box "Keep my history for at least ... days".
4. Click "Clear Now" (making sure that all history items are selected to be cleared)
5. Select "Show All History" under the History menu - history is empty.
6. Close the History window.
7. Visit http://www-math.mit.edu/~poonen/slides/cantrell3.pdf (or any other PDF file online)
8. Select "Show All History" under the History menu.
Actual Results:
cantrell3.pdf shows up in the History window.
Expected Results:
History should still be empty, since "Keep my history..." was unchecked.
Unchecking "Keep my history" should mean that no history is saved.
Setting the number of days for history to be saved to 0 should have the same effect.
same problem when we limit the duration of the registration period. history is saved over this period...
| Assignee | ||
Comment 2•17 years ago
|
||
(In reply to comment #1)
> same problem when we limit the duration of the registration period. history is
> saved over this period...
how do you limit? notice the pref says "for AT LEAST X days", so we will really save for more that those days. to limit on an exact number of days you should set the config browser.history_expire_days to the same number of days.
(In reply to comment #2)
> (In reply to comment #1)
> > same problem when we limit the duration of the registration period. history is
> > saved over this period...
>
> how do you limit? notice the pref says "for AT LEAST X days", so we will really
> save for more that those days. to limit on an exact number of days you should
> set the config browser.history_expire_days to the same number of days.
hmmm, this is not an good configuration, if I choose to save at least 3 days, these 3 days history have to be saved and the 4th days history must be delete !!
This should be :
If this option is checked => History is saved
the period backup history limits backup duration of history.
That's what I thinking...
| Assignee | ||
Comment 4•17 years ago
|
||
(In reply to comment #3)
> hmmm, this is not an good configuration, if I choose to save at least 3 days,
> these 3 days history have to be saved and the 4th days history must be delete
> !!
what you want is "for AT LAST X days", take a look at bug 425219, since that could change actual implementation.
| Assignee | ||
Comment 5•17 years ago
|
||
reproducible with original STRs, i see that the visit has been saved
| Assignee | ||
Updated•17 years ago
|
Summary: History saved even when "Keep my history..." is unchecked. → transition download visits saved when "Keep my history..." is unchecked.
Comment 6•17 years ago
|
||
This happens because nsIDownloadHistory::addDownload (implemented by nsNavHistory) doesn't check if we can add to history, which just calls AddVisit, which also doesn't check.
We just need to check in nsNavHistory::AddDownload, and this is totally testable.
Flags: in-testsuite?
| Assignee | ||
Comment 7•17 years ago
|
||
thanks Shawn. should we move the bug to download manager then?
| Assignee | ||
Comment 8•17 years ago
|
||
ops nevermind, sorry i misread your comment!
Updated•17 years ago
|
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Priority: -- → P2
Version: unspecified → Trunk
Updated•17 years ago
|
Target Milestone: --- → Firefox 3.1
| Assignee | ||
Comment 9•17 years ago
|
||
tests for disabled history and private browsing, throws in case (since from what i see in the idl addDownload throws if it can't add)
| Assignee | ||
Updated•17 years ago
|
OS: Mac OS X → All
Hardware: Macintosh → All
| Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review shawn]
Comment 10•17 years ago
|
||
Comment on attachment 353135 [details] [diff] [review]
patch
>+++ b/toolkit/components/places/src/nsNavHistory.cpp
>+ // don't add when history is disabled
>+ if (IsHistoryDisabled())
>+ return NS_ERROR_NOT_AVAILABLE;
It's not right to throw because the history implementation is available. We just aren't writing to history.
>+var tests = [
>+ test_dh,
>+ test_dh_privateBrowsing,
>+ test_dh_disabledHistory
nit: comma after last test
Attachment #353135 -
Flags: review?(sdwilsh) → review-
| Assignee | ||
Comment 11•17 years ago
|
||
Boris, Shawn suggested to ask you for confirmation on the correct behaviour here, i think NS_ERROR_NOT_AVAILABLE should be returned also when the service cannot add the download (so there't not a service available that CAN add it), so a third party implementer is aware it has not been added. Shawn thinks that nsIDownloadHistory should throw only if the service is not available at all, while if it won't add the download it should silently fail.
What do you think is the correct behaviour to follow in these cases?
Comment 12•17 years ago
|
||
The API documentation says that this should only happen if history is not available. In this case it really is available, but decides not to save the data.
Ideally, the API would return whether the history saved the data or not, but that's a separate issue...
I think it's worth being consistent with the other IsHistoryDisabled() checks here and using NS_OK. (And in practice, none of our callers of this method check rv so it doesn't matter much.)
| Assignee | ||
Comment 13•17 years ago
|
||
fixed comments
Attachment #353135 -
Attachment is obsolete: true
Attachment #353468 -
Flags: review?(sdwilsh)
Comment 14•17 years ago
|
||
Comment on attachment 353468 [details] [diff] [review]
patch v1.1
r=sdwilsh
Attachment #353468 -
Flags: review?(sdwilsh) → review+
Updated•17 years ago
|
Whiteboard: [needs review shawn] → [has review]
| Assignee | ||
Comment 15•17 years ago
|
||
i forgot to remove the check for exception in the test, this fixes that and is ready for push.
Attachment #353468 -
Attachment is obsolete: true
| Assignee | ||
Comment 16•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [has review]
Target Milestone: Firefox 3.1 → Firefox 3.2a1
| Assignee | ||
Updated•17 years ago
|
Flags: in-testsuite? → in-testsuite+
| Assignee | ||
Comment 17•17 years ago
|
||
Keywords: fixed1.9.1
Updated•17 years ago
|
Comment 18•17 years ago
|
||
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090203 Shiretoko/3.1b3pre
Status: RESOLVED → VERIFIED
Comment 19•16 years ago
|
||
verified FIXED on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 ID:20090305133223
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•