Remove VisitedLink dependency on rest of chrome
This is in preparation of componentizing VisitedLink implementation and
be shared with Android WebView.
* Added VisitedLinkDelegate which HistoryService implements.
* Removed VisitedLinkMasterFactory and have HistoryService directly own
VisitedLinkMaster.
* Introduce URLIterator interface for DeleteURLs.
Last committed in
https://src.chromium.org/viewvc/chrome?view=rev&revision=175186
Reverted in
https://src.chromium.org/viewvc/chrome?view=rev&revision=175217
due to memory leaks.
Before this patch, VisitedLink was a ProfileKeyedService and some using
HistoryService did not create VisitedLink at all. After this patch,
VisitedLink is created and owned directly by HistoryService, so they are
now created for some tests depending on which HistoryService constructor
is used.
First version was leaking URLEnumerator in HistoryService::RebuildTable
which was doing manual ref counting (AddRef/Release) calls. Some tests do
not start the background thread at all, so URLEnumerator::OnComplete is
never called to delete itself.
Fixed by properly ref-counting URLEnumerator with scoped_refptr in this
path.
BUG=
168716
Committed:
https://src.chromium.org/viewvc/chrome?view=rev&revision=175906