Skip to content

Commit

Permalink
Fix bug 193347. r/sr=alecf. a=dbaron. Remove autocomplete learning an…
Browse files Browse the repository at this point in the history
…d data collection code from nsGlobalHistory.cpp now that it is no longer needed.
  • Loading branch information
nisheeth%netscape.com committed Feb 21, 2003
1 parent 7d03818 commit 8180f7e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1,245 deletions.
27 changes: 3 additions & 24 deletions docshell/base/nsDocShell.cpp
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion docshell/base/nsDocShell.h
Expand Up @@ -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,
Expand Down
17 changes: 0 additions & 17 deletions xpfe/components/history/public/nsIBrowserHistory.idl
Expand Up @@ -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++
Expand Down

0 comments on commit 8180f7e

Please sign in to comment.