зеркало из https://github.com/mozilla/pjs.git
bug #75220: sr=jst, r=dr; rename |nsCommon[C]String| to |nsSharable[C]String|. Fix all users of the old name.
This commit is contained in:
Родитель
cd731aa604
Коммит
8352858dc7
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче