Permalink
Browse files

Fix bug 193347. r/sr=alecf. a=dbaron. Remove autocomplete learning an…

…d data collection code from nsGlobalHistory.cpp now that it is no longer needed.
  • Loading branch information...
nisheeth%netscape.com
nisheeth%netscape.com committed Feb 21, 2003
1 parent 7d03818 commit 8180f7e5bade581fabf69b59443347fd6b01ca8a
@@ -4222,7 +4222,7 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
// Add the original url to global History so that
// visited url color changes happen.
if (uri)
- AddToGlobalHistory(channel, uri, PR_TRUE);
+ AddToGlobalHistory(uri, PR_TRUE);
} // channel
} // aProgress
}
@@ -5878,7 +5878,7 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel,
}
// Update Global history
- AddToGlobalHistory(aChannel, aURI, IsFrame());
+ AddToGlobalHistory(aURI, IsFrame());
}
// If this was a history load, update the index in
@@ -6417,9 +6417,8 @@ NS_IMETHODIMP nsDocShell::MakeEditable(PRBool inWaitForUriLoad)
}
nsresult
-nsDocShell::AddToGlobalHistory(nsIChannel* aChannel, nsIURI * aURI, PRBool aHidden)
+nsDocShell::AddToGlobalHistory(nsIURI * aURI, PRBool aHidden)
{
- nsresult rv;
// first check if we should be adding it
PRBool updateHistory;
ShouldAddToGlobalHistory(aURI, &updateHistory);
@@ -6432,26 +6431,6 @@ nsDocShell::AddToGlobalHistory(nsIChannel* aChannel, nsIURI * aURI, PRBool aHidd
NS_ENSURE_SUCCESS(mGlobalHistory->AddPage(spec.get()), NS_ERROR_FAILURE);
- nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aChannel, &rv));
- if (NS_SUCCEEDED(rv)) {
- nsCOMPtr<nsIURI> referrer;
- rv = httpChannel->GetReferrer(getter_AddRefs(referrer));
- if (NS_SUCCEEDED(rv) && referrer) {
- nsCAutoString referrerSpec;
- rv = referrer->GetSpec(referrerSpec);
- if (NS_SUCCEEDED(rv)) {
- nsCOMPtr<nsIBrowserHistory> browserHistory =
- do_QueryInterface(mGlobalHistory);
- // In embedding environments, the "lite" global history
- // implementation might not implement nsIBrowserHistory.
- if (browserHistory) {
- browserHistory->OutputReferrerURL(spec.get(),
- referrerSpec.get());
- }
- }
- }
- }
-
// this is a redirect, so hide the page from
// being enumerated in history
if (aHidden) {
@@ -235,7 +235,7 @@ friend class nsDSURIContentListener;
// Global History
nsresult ShouldAddToGlobalHistory(nsIURI * aURI, PRBool * aShouldAdd);
- nsresult AddToGlobalHistory(nsIChannel* aChannel, nsIURI * aURI, PRBool aHidden);
+ nsresult AddToGlobalHistory(nsIURI * aURI, PRBool );
// Helper Routines
NS_IMETHOD GetPromptAndStringBundle(nsIPrompt ** aPrompt,
@@ -117,23 +117,6 @@ interface nsIBrowserHistory : nsISupports
*/
void markPageAsTyped(in string url);
-
- /**
- * outputReferrerURL
- * Prints out referrer information for a url to a
- * data file if browser.history.url.datacapture.mode is set
- * to 1 or 2 (see the comment in nsGlobalHistory.cpp for
- * more details).
- *
- * This method is a big hack and only temporary. Please do NOT use
- * it in your code. It will be removed after the data
- * collection phase of the project described in bug 182366 is
- * over.
- *
- * @param aURL a url in global history
- * @param aReferrer the referrer url to aURL
- */
- void outputReferrerURL(in string aURL, in string aReferrer);
};
%{ C++
Oops, something went wrong.

0 comments on commit 8180f7e

Please sign in to comment.