Closed Bug 235915 Opened 21 years ago Closed 20 years ago

RemovePage method is no longer part of nsIBrowserHistory interface

Categories

(Firefox :: Bookmarks & History, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox0.9

People

(Reporter: son.le0, Assigned: benjamin)

Details

(Whiteboard: fixed0.9,fixed-aviary1.0)

Attachments

(1 file)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040226 Firefox/0.8.0+

The checkin for bug 224829 deleted the RemovePage method from the
nsIBrowserHistory interface and broke extensions that rely on this method (eg.
LinkVisitor).

The aim of this bug is to reverse the parts of the 224829 checkin that removed
the method declaration and add it back into the nsIBrowserHistory interface.

Reproducible: Always
Steps to Reproduce:
who's gonna make a patch? I can very simply make a patch to move
nsGlobalHistory::RemovePage back into the ffox nsIBrowserHistory interface. If
someone wants to make it use nsIURI instead of strings, go ahead.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'll review the patch and then we can leave this open - after your stuff has
landed I can try to make another patch to make it use nsIURI.. 

can we un-fork this interface in preparation for freezing?
I don't think we should freeze nsIBrowserHistory, and I don't think we need to
unfork it.
Attachment #142671 - Flags: review?(firefox)
hmm... its not that it would be part of an embedded application, but instead
part of nsGlobalHistory, frozen so that privacy extensions to mozilla/firefox
can actually take advantage of the interface without breaking all the time...
there are a few methods that would obviously move into a non-frozen interface,
such as lastPageVisited, maybe count, and maybe markPagesAsTyped...



The patch looks nice and simple. Alex, can you do a quick review?
I'm not sure these blocking flags do any good, but...
Flags: blocking0.9?
will do, sonia.
:-)
Using djeter's Win32 2004-04-16 trunk build with patch applied
(http://forums.mozillazine.org/viewtopic.php?t=69620) and updated LinkVisitor
code (1 line changed) works like a charm.
(In reply to comment #9)
> Using djeter's Win32 2004-04-16 trunk build with patch applied
> (http://forums.mozillazine.org/viewtopic.php?t=69620) and updated LinkVisitor
> code (1 line changed) works like a charm.

I tried djeter's win32 2004-04-16 but nsIBrowserHistory.removePage did not
return expected result. I entered these in Venkman:

var bh = Components.classes["@mozilla.org/browser/global-history;2"];
bh = bh.getService(Components.interfaces.nsIBrowserHistory);

var gh = Components.classes['@mozilla.org/browser/global-history;2'];
gh = gh.getService(Components.interfaces.nsIGlobalHistory2);

var uf = Components.classes["@mozilla.org/docshell/urifixup;1"];
uf = uf.getService(Components.interfaces.nsIURIFixup);

var uri1 = uf.createFixupURI('http://www.abcd1234.com/', 0);

gh.isVisited(uri1); // false, okay

gh.addURI(uri1, false, true);

gh.isVisited(uri1); // true, okay

bh.removePage(uri1); // remove the newly added page

gh.isVisited(uri1); // returns true, should be false

Please advise, thanks.
(In reply to comment #10)

> I tried djeter's win32 2004-04-16 but nsIBrowserHistory.removePage did not
> return expected result. I entered these in Venkman:
>
> bh.removePage(uri1); // remove the newly added page

The confusion is here. The removePage() function is declared as 

void removePage(in string aURI);

and takes a string url and not aURI as the parameter name suggests. When I
changed the function call to bh.removePage(uri1.spec), it works as expected.
We should get this. Adding blocking flag and targeting. 
Flags: blocking0.9? → blocking0.9+
Target Milestone: --- → Firefox0.9
(In reply to comment #11)
> The confusion is here. The removePage() function is declared as 
> void removePage(in string aURI);

Sorry, my mistake.
I tried it and now it is working :)
Thanks.
Comment on attachment 142671 [details] [diff] [review]
Put removePage() back into ffox nsIBrowserHistory

looks good, r=mconnor@myrealbox.com, please get this in on the branch
Attachment #142671 - Flags: review?(firefox) → review+
Whiteboard: checkin0.9
Assignee: firefox → bsmedberg
checked in branch and trunk, 2004-05-05 16:43
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: checkin0.9 → fixed0.9
Whiteboard: fixed0.9 → fixed0.9,fixed-aviary1.0
Component: History → Bookmarks & History
QA Contact: mozilla → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: