Bug 325257 - Rename nsIFormHistory to avoid changing interfaces on the 1.8 branch, r=bryner
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@193711 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -165,14 +165,14 @@ Sanitizer.prototype = {
|
||||
}
|
||||
|
||||
var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
|
||||
.getService(Components.interfaces.nsIFormHistory);
|
||||
.getService(Components.interfaces.nsIFormHistory2);
|
||||
formHistory.removeAllEntries();
|
||||
},
|
||||
|
||||
get canClear()
|
||||
{
|
||||
var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
|
||||
.getService(Components.interfaces.nsIFormHistory);
|
||||
.getService(Components.interfaces.nsIFormHistory2);
|
||||
return formHistory.hasEntries;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1010,7 +1010,7 @@ nsIEProfileMigrator::GetUserNameAndPass(unsigned char* data, unsigned long len,
|
||||
// fieldName3:StringData value1\0value2\0value3\0
|
||||
//
|
||||
// Walk each non-URI prefixed key in IE's PStore section, split the value provided
|
||||
// into chunks (\0 delimited) and use nsIFormHistory's |addEntry| method to add
|
||||
// into chunks (\0 delimited) and use nsIFormHistory2's |addEntry| method to add
|
||||
// an entry for the fieldName prefix and each value.
|
||||
//
|
||||
// "Quite Easily Done". ;-)
|
||||
@@ -1066,7 +1066,7 @@ nsIEProfileMigrator::CopyFormData(PRBool aReplace)
|
||||
nsresult
|
||||
nsIEProfileMigrator::AddDataToFormHistory(const nsAString& aKey, PRUnichar* aData, unsigned long aCount)
|
||||
{
|
||||
nsCOMPtr<nsIFormHistory> formHistory(do_GetService("@mozilla.org/satchel/form-history;1"));
|
||||
nsCOMPtr<nsIFormHistory2> formHistory(do_GetService("@mozilla.org/satchel/form-history;1"));
|
||||
if (!formHistory)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
@@ -1107,7 +1107,7 @@ nsSafariProfileMigrator::CopyFormData(PRBool aReplace)
|
||||
Boolean hasSearchStrings = ::CFDictionaryContainsKey(safariPrefs,
|
||||
CFSTR("RecentSearchStrings"));
|
||||
if (hasSearchStrings) {
|
||||
nsCOMPtr<nsIFormHistory> formHistory(do_GetService("@mozilla.org/satchel/form-history;1"));
|
||||
nsCOMPtr<nsIFormHistory2> formHistory(do_GetService("@mozilla.org/satchel/form-history;1"));
|
||||
if (formHistory) {
|
||||
CFArrayRef strings = (CFArrayRef)::CFDictionaryGetValue(safariPrefs,
|
||||
CFSTR("RecentSearchStrings"));
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
<body><![CDATA[
|
||||
this._formHistSvc =
|
||||
Components.classes["@mozilla.org/satchel/form-history;1"]
|
||||
.getService(Components.interfaces.nsIFormHistory);
|
||||
.getService(Components.interfaces.nsIFormHistory2);
|
||||
this._prefBranch =
|
||||
Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
@@ -50,7 +50,7 @@ interface nsIFile;
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a61f0a62-ae0a-4382-b474-d259442ca80c)]
|
||||
interface nsIFormHistory : nsISupports
|
||||
interface nsIFormHistory2 : nsISupports
|
||||
{
|
||||
/**
|
||||
* Returns true if the form history has any entries.
|
||||
@@ -103,5 +103,5 @@ interface nsIFormHistoryImporter : nsISupports
|
||||
* supplied since the importer is invoked during
|
||||
* form history initialization.
|
||||
*/
|
||||
void importFormHistory(in nsIFile file, in nsIFormHistory formHistory);
|
||||
void importFormHistory(in nsIFile file, in nsIFormHistory2 formHistory);
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ static void SwapBytes(PRUnichar* aDest, const PRUnichar* aSrc, PRUint32 aLen)
|
||||
static const char *kFormHistoryFileName = "formhistory.dat";
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsFormHistory)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormHistory)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormHistory2)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormSubmitObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
@@ -145,7 +145,7 @@ nsFormHistory::FormHistoryEnabled()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// nsIFormHistory
|
||||
//// nsIFormHistory2
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormHistory::GetHasEntries(PRBool *aHasEntries)
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsToolkitCompsCID.h"
|
||||
|
||||
class nsFormHistory : public nsIFormHistory,
|
||||
class nsFormHistory : public nsIFormHistory2,
|
||||
public nsIObserver,
|
||||
public nsIFormSubmitObserver,
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIFORMHISTORY
|
||||
NS_DECL_NSIFORMHISTORY2
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
// nsIFormSubmitObserver
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
static nsFormHistory *GetInstance()
|
||||
{
|
||||
if (!gFormHistory) {
|
||||
nsCOMPtr<nsIFormHistory> fh = do_GetService(NS_FORMHISTORY_CONTRACTID);
|
||||
nsCOMPtr<nsIFormHistory2> fh = do_GetService(NS_FORMHISTORY_CONTRACTID);
|
||||
}
|
||||
return gFormHistory;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ nsFormHistoryResult::RemoveValueAt(PRInt32 aRowIndex, PRBool aRemoveFromDB)
|
||||
#define PREF_FORMFILL_ENABLE "enable"
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsFormHistory)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormHistory)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormHistory2)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormHistoryPrivate)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFormSubmitObserver)
|
||||
@@ -197,7 +197,7 @@ nsFormHistory::FormHistoryEnabled()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// nsIFormHistory
|
||||
//// nsIFormHistory2
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormHistory::GetHasEntries(PRBool *aHasEntries)
|
||||
@@ -512,7 +512,7 @@ static const char * const gColumnNames[] = {
|
||||
|
||||
struct FormHistoryImportClosure
|
||||
{
|
||||
FormHistoryImportClosure(nsMorkReader *aReader, nsIFormHistory *aFormHistory)
|
||||
FormHistoryImportClosure(nsMorkReader *aReader, nsIFormHistory2 *aFormHistory)
|
||||
: reader(aReader), formHistory(aFormHistory), byteOrderColumn(-1),
|
||||
swapBytes(PR_FALSE)
|
||||
{
|
||||
@@ -523,7 +523,7 @@ struct FormHistoryImportClosure
|
||||
|
||||
// Back pointers to the reader and history we're operating on
|
||||
const nsMorkReader *reader;
|
||||
nsIFormHistory *formHistory;
|
||||
nsIFormHistory2 *formHistory;
|
||||
|
||||
// Indexes of the columns that we care about
|
||||
PRInt32 columnIndexes[kColumnCount];
|
||||
@@ -604,7 +604,7 @@ NS_IMPL_ISUPPORTS1(nsFormHistoryImporter, nsIFormHistoryImporter)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormHistoryImporter::ImportFormHistory(nsIFile *aFile,
|
||||
nsIFormHistory *aFormHistory)
|
||||
nsIFormHistory2 *aFormHistory)
|
||||
{
|
||||
// Check that the file exists before we try to open it
|
||||
PRBool exists;
|
||||
|
||||
Reference in New Issue
Block a user