NS_IMETHODIMP nsAndroidHistory::VisitURI(nsIURI *aURI, nsIURI *aLastVisitedURI, uint32_t aFlags) { if (!aURI) return NS_OK; if (!(aFlags & VisitFlags::TOP_LEVEL)) return NS_OK; if (aFlags & VisitFlags::REDIRECT_SOURCE) return NS_OK; if (aFlags & VisitFlags::UNRECOVERABLE_ERROR) return NS_OK; AndroidBridge *bridge = AndroidBridge::Bridge(); if (bridge) { nsAutoCString uri; nsresult rv = aURI->GetSpec(uri); if (NS_FAILED(rv)) return rv; NS_ConvertUTF8toUTF16 uriString(uri); bridge->MarkURIVisited(uriString); } return NS_OK; }
NS_IMETHODIMP nsAndroidHistory::VisitURI(nsIURI *aURI, nsIURI *aLastVisitedURI, PRUint32 aFlags) { if (!aURI) return NS_OK; if (!(aFlags & VisitFlags::TOP_LEVEL)) return NS_OK; AndroidBridge *bridge = AndroidBridge::Bridge(); if (bridge) { nsCAutoString uri; nsresult rv = aURI->GetSpec(uri); if (NS_FAILED(rv)) return rv; NS_ConvertUTF8toUTF16 uriString(uri); bridge->MarkURIVisited(uriString); } return NS_OK; }