зеркало из https://github.com/mozilla/gecko-dev.git
expose whether the registry is already open or not, which enables the profile
manager to avoid opening and closing the registry ~20 times at startup.
This commit is contained in:
Родитель
78b9f507f0
Коммит
7d68f66b73
|
@ -55,6 +55,7 @@ struct nsRegistry : public nsIRegistry {
|
|||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid );
|
||||
NS_IMETHOD OpenDefault();
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD IsOpen( PRBool *result );
|
||||
|
||||
NS_IMETHOD GetString( Key baseKey, const char *path, char **result );
|
||||
NS_IMETHOD SetString( Key baseKey, const char *path, const char *value );
|
||||
|
@ -492,6 +493,15 @@ NS_IMETHODIMP nsRegistry::Close() {
|
|||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::IsOpen( PRBool *result ) {
|
||||
*result = ( mReg != 0 );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------- nsRegistry::GetString ----------------------------
|
||||
| First, look for the entry using GetValueInfo. If found, and it's a string, |
|
||||
| allocate space for it and fetch the value. |
|
||||
|
|
|
@ -168,6 +168,7 @@ struct nsIRegistry : public nsISupports {
|
|||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid ) = 0;
|
||||
NS_IMETHOD OpenDefault() = 0;
|
||||
NS_IMETHOD Close() = 0;
|
||||
NS_IMETHOD IsOpen( PRBool *result ) = 0;
|
||||
|
||||
/*----------------------- Reading/Writing Values ---------------------------
|
||||
| These functions read/write the registry values at a given node. |
|
||||
|
|
|
@ -55,6 +55,7 @@ struct nsRegistry : public nsIRegistry {
|
|||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid );
|
||||
NS_IMETHOD OpenDefault();
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD IsOpen( PRBool *result );
|
||||
|
||||
NS_IMETHOD GetString( Key baseKey, const char *path, char **result );
|
||||
NS_IMETHOD SetString( Key baseKey, const char *path, const char *value );
|
||||
|
@ -492,6 +493,15 @@ NS_IMETHODIMP nsRegistry::Close() {
|
|||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::IsOpen( PRBool *result ) {
|
||||
*result = ( mReg != 0 );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------- nsRegistry::GetString ----------------------------
|
||||
| First, look for the entry using GetValueInfo. If found, and it's a string, |
|
||||
| allocate space for it and fetch the value. |
|
||||
|
|
Загрузка…
Ссылка в новой задаче