Firefox/Projects/Asynchronous Add Visit: Difference between revisions
Jump to navigation
Jump to search
Comrade693 (talk | contribs) (→Goals) |
(→Status) |
||
| (11 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__Implement a way to add visits to Places with. This will replace what nsIGloablHistory2:: | __NOTOC__Implement a way to add visits to Places with. This will replace what nsIGloablHistory2::addURI and nsIGlobalHistory3::addDocumentRedirect does now. | ||
Project Lead: | Current API design looks something like this (added to IHistory): | ||
<pre> | |||
enum VisitFlags { | |||
/** | |||
* Whether the URI was loaded in a top-level window. | |||
*/ | |||
TOP_LEVEL = 0 << 1, | |||
/** | |||
* Whether the URI was loaded as part of a permanent redirect. | |||
*/ | |||
REDIRECT_PERMANENT = 0 << 2, | |||
/** | |||
* Whether the URI was loaded as part of a temporary redirect. | |||
*/ | |||
REDIRECT_TEMPORARY = 0 << 3, | |||
}; | |||
/** | |||
* @param aURI | |||
* The URI of the page being visited. | |||
* @param aReferrer | |||
* The URI of the referring page. | |||
* @param aFlags | |||
* The VisitFlags describing this visit. | |||
* @param aRedirectedFrom [optional] | |||
* The URI this URI was redirected from, or NULL if not a re-direct. | |||
*/ | |||
NS_IMETHOD VisitURI( | |||
nsIURI* aURI, | |||
nsIURI* aReferrer, | |||
PRUint32 aFlags, | |||
nsIURI* aRedirectedFrom = NULL | |||
) = 0; | |||
</pre> | |||
Project Lead: Ben Stover (stechz) | |||
== Status == | == Status == | ||
* <onlyinclude> | * <onlyinclude>IN FLIGHT. See {{bug|556400}} for more details for now!</onlyinclude> | ||
* Problem is a bit big and frecency updates has been split off into {{bug|556631}} | |||
== Goals == | == Goals == | ||
| Line 11: | Line 48: | ||
== Non-Goals == | == Non-Goals == | ||
* Replace nsINavHistoryService::AddVisit with this new API | |||
== Timeline / Milestones == | == Timeline / Milestones == | ||
== Requirements == | == Requirements == | ||
* No synchronous I/O is to be done with the new API | |||
* Implement this on IHistory | |||
* IHistory should dispatch NS_LINK_VISITED_EVENT_TOPIC instead of docshell | |||
* VisitURI should add the referrer if we do not have it in the database | |||
== Dependencies == | == Dependencies == | ||
| Line 21: | Line 63: | ||
== Related Projects == | == Related Projects == | ||
* [[Firefox/Goals/2010Q1/IO_Reduction|I/O Reduction]] | |||
Latest revision as of 21:58, 1 April 2010
Implement a way to add visits to Places with. This will replace what nsIGloablHistory2::addURI and nsIGlobalHistory3::addDocumentRedirect does now.
Current API design looks something like this (added to IHistory):
enum VisitFlags {
/**
* Whether the URI was loaded in a top-level window.
*/
TOP_LEVEL = 0 << 1,
/**
* Whether the URI was loaded as part of a permanent redirect.
*/
REDIRECT_PERMANENT = 0 << 2,
/**
* Whether the URI was loaded as part of a temporary redirect.
*/
REDIRECT_TEMPORARY = 0 << 3,
};
/**
* @param aURI
* The URI of the page being visited.
* @param aReferrer
* The URI of the referring page.
* @param aFlags
* The VisitFlags describing this visit.
* @param aRedirectedFrom [optional]
* The URI this URI was redirected from, or NULL if not a re-direct.
*/
NS_IMETHOD VisitURI(
nsIURI* aURI,
nsIURI* aReferrer,
PRUint32 aFlags,
nsIURI* aRedirectedFrom = NULL
) = 0;
Project Lead: Ben Stover (stechz)
Status
- IN FLIGHT. See bug 556400 for more details for now!
- Problem is a bit big and frecency updates has been split off into bug 556631
Goals
- Remove synchronous I/O off of the main thread
- Collect all the data we need in one call from docshell
Non-Goals
- Replace nsINavHistoryService::AddVisit with this new API
Timeline / Milestones
Requirements
- No synchronous I/O is to be done with the new API
- Implement this on IHistory
- IHistory should dispatch NS_LINK_VISITED_EVENT_TOPIC instead of docshell
- VisitURI should add the referrer if we do not have it in the database