зеркало из https://github.com/mozilla/pjs.git
Bug 325257 - Rename nsIFormHistory to avoid changing interfaces on the 1.8 branch, r=bryner
This commit is contained in:
Родитель
e8676d4e2b
Коммит
0e0fe8e1d1
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1018,7 +1018,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". ;-)
|
||||
|
@ -1074,7 +1074,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;
|
||||
|
|
|
@ -72,18 +72,19 @@ CPPSRCS += dlldeps-xul.cpp
|
|||
endif
|
||||
|
||||
# dependent libraries
|
||||
STATIC_LIBS = \
|
||||
xulapp_s \
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
|
||||
STATIC_LIBS += gtkembedmoz
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
|
||||
SHARED_LIBRARY_LIBS = \
|
||||
$(foreach lib,$(STATIC_LIBS),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
||||
$(foreach component,$(COMPONENT_LIBS),$(DIST)/lib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
||||
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_JAVAXPCOM
|
||||
|
@ -97,7 +98,8 @@ LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
|
|||
else
|
||||
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
|
||||
endif
|
||||
STATIC_LIBS += javaxpcom
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DEPTH)/extensions/java/xpcom/src/$(LIB_PREFIX)javaxpcom.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
|
|
Загрузка…
Ссылка в новой задаче