Closed
Bug 317840
Opened 20 years ago
Closed 19 years ago
Delete History Items
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugs, Assigned: brettw)
Details
Attachments
(2 files)
|
19.49 KB,
patch
|
bryner
:
review+
|
Details | Diff | Splinter Review |
|
3.02 KB,
patch
|
bugs
:
review+
|
Details | Diff | Splinter Review |
Ability to delete individual history items and clear all history.
| Assignee | ||
Comment 1•20 years ago
|
||
Use removePage/removePagesFromHost on the nsIBrowserHistory interface that the history component implements. This should work, but its not hooked up to UI yet.
| Assignee | ||
Comment 2•19 years ago
|
||
This patch fixes history deleting from the history service. Before, we could delete bookmarked items, and the observer calling was weird.
This also removes some unused constants.
The UI is still unhookedup.
Attachment #205768 -
Flags: review?(bryner)
Comment 3•19 years ago
|
||
Comment on attachment 205768 [details] [diff] [review]
Backend patch
>--- nsNavHistory.cpp 13 Dec 2005 01:10:13 -0000 1.33
>+++ nsNavHistory.cpp 13 Dec 2005 23:33:13 -0000
>+ if (aCompress) {
>+ rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("VACUUM moz_history"));
>+ NS_ENSURE_SUCCESS(rv, rv);
>+ rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("VACUUM moz_historyvisit"));
>+ NS_ENSURE_SUCCESS(rv, rv);
>+ rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("VACUUM moz_anno"));
>+ NS_ENSURE_SUCCESS(rv, rv);
>+ rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("VACUUM moz_favicon"));
>+ NS_ENSURE_SUCCESS(rv, rv);
>+ }
Fix closing brace indentation.
>+ nsNavBookmarks* bookmarksService = nsNavBookmarks::GetBookmarksService();
>+ NS_ENSURE_TRUE(bookmarksService, NS_ERROR_FAILURE);
>+ PRBool bookmarked = PR_FALSE;
>+ rv = bookmarksService->IsBookmarked(aURI, &bookmarked);
>+ NS_ENSURE_SUCCESS(rv, rv);
>+
>+ if (! bookmarked) {
>+ // Only delete everything else if the page is not bookmarked. Note that we
>+ // do NOT delete favicons. Any unreferenced favicons will be deleted next
>+ // time the browser is shut down.
>+
>+ // FIXME: delete annotations
>+
>+ // delete main history entries
>+ nsNavBookmarks *bookmarks = nsNavBookmarks::GetBookmarksService();
>+ NS_ENSURE_TRUE(bookmarks, NS_ERROR_UNEXPECTED);
>+ PRBool bookmarked;
>+ bookmarks->IsBookmarked(aURI, &bookmarked);
>+ if (!bookmarked) {
It looks like you're duplicating this IsBookmarked check for no reason.
>@@ -2013,7 +2022,16 @@
> gTldTypes = nsnull;
> }
> gPrefService->SavePrefFile(nsnull);
>- VacuumDB();
>+
>+ // compute how long ago to expire from
>+ PRInt64 secsPerDay; LL_I2L(secsPerDay, 24*60*60);
>+ PRInt64 usecsPerSec; LL_I2L(usecsPerSec, 1000000);
>+ PRInt64 usecsPerDay; LL_MUL(usecsPerDay, secsPerDay, usecsPerSec);
>+ PRInt64 expireDaysAgo; LL_I2L(expireDaysAgo, mExpireDays);
>+ PRInt64 expireUsecsAgo; LL_MUL(expireUsecsAgo, expireDaysAgo, usecsPerDay);
It's no longer necessary to use LL_ macros for dealing with PRInt64's; just make them const and this will be more readable and generate better code too.
r=me with those fixes.
Attachment #205768 -
Flags: review?(bryner) → review+
| Assignee | ||
Comment 4•19 years ago
|
||
Backend patch on trunk, need UI.
| Assignee | ||
Comment 5•19 years ago
|
||
Attachment #205842 -
Flags: review?(bugs)
| Reporter | ||
Comment 6•19 years ago
|
||
Attachment #205842 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 7•19 years ago
|
||
UI is on trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 8•16 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•