I would like to write a chrome extension which not only lists the URLs visited in the History, but the referring URLs as well. For example, if I clicked on Wikipedia from Google, it should say "Wikipedia: referred to by Google".
My initial attempt was to take a HistoryItem for the URL in question, extract its most recent VisitItem, and then use referringVisitId to track down the initial URL, however this is where I got stuck. My problem comes down to not understanding the meaning of referringVisitId. Is it the ID of the history item which opened the new page? Is it the ID of the VisitItem initiated by the URL click? The documentation states that it is the "visit ID of the referrer", however this still leaves me puzzled.
1) What is the meaning of referringVisitId?
2) Can I use referringVisitId to track down the referring URL? If so, how?
Thank you for your time!