From 0e0fe8e1d1ee0c6f34bb26f0b2f80e08bbd56a80 Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Thu, 6 Apr 2006 18:06:05 +0000 Subject: [PATCH] Bug 325257 - Rename nsIFormHistory to avoid changing interfaces on the 1.8 branch, r=bryner --- browser/base/content/sanitize.js | 4 ++-- .../migration/src/nsIEProfileMigrator.cpp | 4 ++-- .../migration/src/nsSafariProfileMigrator.cpp | 2 +- browser/components/search/content/search.xml | 2 +- .../components/satchel/public/nsIFormHistory.idl | 4 ++-- toolkit/components/satchel/src/nsFormHistory.cpp | 4 ++-- toolkit/components/satchel/src/nsFormHistory.h | 6 +++--- .../satchel/src/nsStorageFormHistory.cpp | 10 +++++----- toolkit/library/Makefile.in | 16 +++++++++------- 9 files changed, 27 insertions(+), 25 deletions(-) diff --git a/browser/base/content/sanitize.js b/browser/base/content/sanitize.js index 31026c11423..57b19740454 100644 --- a/browser/base/content/sanitize.js +++ b/browser/base/content/sanitize.js @@ -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; } }, diff --git a/browser/components/migration/src/nsIEProfileMigrator.cpp b/browser/components/migration/src/nsIEProfileMigrator.cpp index c7bc8b3891f..3b12d715adf 100644 --- a/browser/components/migration/src/nsIEProfileMigrator.cpp +++ b/browser/components/migration/src/nsIEProfileMigrator.cpp @@ -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 formHistory(do_GetService("@mozilla.org/satchel/form-history;1")); + nsCOMPtr formHistory(do_GetService("@mozilla.org/satchel/form-history;1")); if (!formHistory) return NS_ERROR_OUT_OF_MEMORY; diff --git a/browser/components/migration/src/nsSafariProfileMigrator.cpp b/browser/components/migration/src/nsSafariProfileMigrator.cpp index f8160b3f80c..206e379425f 100644 --- a/browser/components/migration/src/nsSafariProfileMigrator.cpp +++ b/browser/components/migration/src/nsSafariProfileMigrator.cpp @@ -1107,7 +1107,7 @@ nsSafariProfileMigrator::CopyFormData(PRBool aReplace) Boolean hasSearchStrings = ::CFDictionaryContainsKey(safariPrefs, CFSTR("RecentSearchStrings")); if (hasSearchStrings) { - nsCOMPtr formHistory(do_GetService("@mozilla.org/satchel/form-history;1")); + nsCOMPtr formHistory(do_GetService("@mozilla.org/satchel/form-history;1")); if (formHistory) { CFArrayRef strings = (CFArrayRef)::CFDictionaryGetValue(safariPrefs, CFSTR("RecentSearchStrings")); diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index e4d9b3dc401..23dd1c34b62 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -308,7 +308,7 @@ fh = do_GetService(NS_FORMHISTORY_CONTRACTID); + nsCOMPtr fh = do_GetService(NS_FORMHISTORY_CONTRACTID); } return gFormHistory; } diff --git a/toolkit/components/satchel/src/nsStorageFormHistory.cpp b/toolkit/components/satchel/src/nsStorageFormHistory.cpp index d27db8b642f..c2daca8c0a0 100644 --- a/toolkit/components/satchel/src/nsStorageFormHistory.cpp +++ b/toolkit/components/satchel/src/nsStorageFormHistory.cpp @@ -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; diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 7be0eadb0e2..6941275816f 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -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