From 8352858dc78c24b492d7f72d24860315ee2d88e7 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Wed, 16 May 2001 04:52:43 +0000 Subject: [PATCH] bug #75220: sr=jst, r=dr; rename |nsCommon[C]String| to |nsSharable[C]String|. Fix all users of the old name. --- string/public/nsPromiseFlatString.h | 10 +++++----- xpcom/string/public/nsPromiseFlatString.h | 10 +++++----- xpfe/components/history/src/nsGlobalHistory.cpp | 6 +++--- xpfe/components/history/src/nsGlobalHistory.h | 3 ++- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/string/public/nsPromiseFlatString.h b/string/public/nsPromiseFlatString.h index e7ba8e90bbf..7826f757658 100644 --- a/string/public/nsPromiseFlatString.h +++ b/string/public/nsPromiseFlatString.h @@ -24,8 +24,8 @@ #ifndef nsPromiseFlatString_h___ #define nsPromiseFlatString_h___ -#ifndef nsCommonString_h___ -#include "nsCommonString.h" +#ifndef nsSharableString_h___ +#include "nsSharableString.h" #endif /** @@ -76,7 +76,7 @@ * a string that happens to be flat, your promise is just a reference to that other string * and all calls are forwarded through to it. If you apply it to a non-flat string, * then a temporary flat string is created for you, by allocating and copying. In the unlikely - * event that you end up assigning the result into a sharing string (e.g., |nsCommon[C]String|), + * event that you end up assigning the result into a sharing string (e.g., |nsSharable[C]String|), * the right thing happens. */ @@ -112,7 +112,7 @@ class NS_COM nsPromiseFlatString void operator=( const nsPromiseFlatString& ); private: - nsCommonString mFlattenedString; + nsSharableString mFlattenedString; const nsAFlatString* mPromisedString; }; @@ -148,7 +148,7 @@ class NS_COM nsPromiseFlatCString void operator=( const nsPromiseFlatCString& ); private: - nsCommonCString mFlattenedString; + nsSharableCString mFlattenedString; const nsAFlatCString* mPromisedString; }; diff --git a/xpcom/string/public/nsPromiseFlatString.h b/xpcom/string/public/nsPromiseFlatString.h index e7ba8e90bbf..7826f757658 100644 --- a/xpcom/string/public/nsPromiseFlatString.h +++ b/xpcom/string/public/nsPromiseFlatString.h @@ -24,8 +24,8 @@ #ifndef nsPromiseFlatString_h___ #define nsPromiseFlatString_h___ -#ifndef nsCommonString_h___ -#include "nsCommonString.h" +#ifndef nsSharableString_h___ +#include "nsSharableString.h" #endif /** @@ -76,7 +76,7 @@ * a string that happens to be flat, your promise is just a reference to that other string * and all calls are forwarded through to it. If you apply it to a non-flat string, * then a temporary flat string is created for you, by allocating and copying. In the unlikely - * event that you end up assigning the result into a sharing string (e.g., |nsCommon[C]String|), + * event that you end up assigning the result into a sharing string (e.g., |nsSharable[C]String|), * the right thing happens. */ @@ -112,7 +112,7 @@ class NS_COM nsPromiseFlatString void operator=( const nsPromiseFlatString& ); private: - nsCommonString mFlattenedString; + nsSharableString mFlattenedString; const nsAFlatString* mPromisedString; }; @@ -148,7 +148,7 @@ class NS_COM nsPromiseFlatCString void operator=( const nsPromiseFlatCString& ); private: - nsCommonCString mFlattenedString; + nsSharableCString mFlattenedString; const nsAFlatCString* mPromisedString; }; diff --git a/xpfe/components/history/src/nsGlobalHistory.cpp b/xpfe/components/history/src/nsGlobalHistory.cpp index a5a6df2c375..3bc7f7312cb 100644 --- a/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/xpfe/components/history/src/nsGlobalHistory.cpp @@ -3489,7 +3489,7 @@ nsGlobalHistory::OnStartLookup(const PRUnichar *searchString, AutoCompleteStatus status = nsIAutoCompleteStatus::failed; // pass user input through filter before search - nsCommonString filtered = AutoCompletePrefilter(nsLocalString (searchString)); + nsSharableString filtered = AutoCompletePrefilter(nsLocalString (searchString)); if (filtered.Length() == 0) { listener->OnAutoComplete(results, status); return NS_OK; @@ -3650,7 +3650,7 @@ nsGlobalHistory::AutoCompleteCutPrefix(nsAWritableString& aURL) aURL.Cut(0, idx); } -nsCommonString +nsSharableString nsGlobalHistory::AutoCompletePrefilter(const nsAReadableString& aSearchString) { // XXX using nsAutoString here only because nsAString's Cut method doesn't work @@ -3672,7 +3672,7 @@ nsGlobalHistory::AutoCompletePrefilter(const nsAReadableString& aSearchString) url.ToLowerCase(); } - return nsCommonString(url); + return nsSharableString(url); } PRBool diff --git a/xpfe/components/history/src/nsGlobalHistory.h b/xpfe/components/history/src/nsGlobalHistory.h index 2f817f1e27b..2a682587d26 100644 --- a/xpfe/components/history/src/nsGlobalHistory.h +++ b/xpfe/components/history/src/nsGlobalHistory.h @@ -41,6 +41,7 @@ #include "nsHashtable.h" #include "nsCOMPtr.h" #include "nsAWritableString.h" +#include "nsSharableString.h" #include "nsITimer.h" #include "nsIAutoCompleteSession.h" @@ -181,7 +182,7 @@ protected: nsIAutoCompleteResults* aPrevResults, nsIAutoCompleteResults* aResults); void AutoCompleteCutPrefix(nsAWritableString& aURL); - nsCommonString AutoCompletePrefilter(const nsAReadableString& aSearchString); + nsSharableString AutoCompletePrefilter(const nsAReadableString& aSearchString); PRBool AutoCompleteCompare(nsAString& aHistoryURL, const nsAReadableString& aUserURL); // caching of PR_Now() so we don't call it every time we do