Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsPrefsFactory.cpp File Reference
#include "nsIGenericFactory.h"
#include "nsPrefService.h"
#include "nsPrefBranch.h"
#include "nsIPref.h"
#include "prefapi.h"

Go to the source code of this file.

Functions

NS_IMETHODIMP nsPrefConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static void UnloadPrefsModule (nsIModule *unused)

Variables

static const nsModuleComponentInfo components []

Function Documentation

NS_IMETHODIMP nsPrefConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 731 of file nsPref.cpp.

{
  nsresult rv;
    
  if (NULL == aResult) {
    rv = NS_ERROR_NULL_POINTER;
    return rv;
  }
  *aResult = NULL;
  if (NULL != aOuter) {
    rv = NS_ERROR_NO_AGGREGATION;
    return rv;
  }

  nsPref *inst = nsPref::GetInstance();

  if (NULL == inst) {
    rv = NS_ERROR_OUT_OF_MEMORY;
    return rv;
  }
  NS_ADDREF(inst);
  rv = inst->QueryInterface(aIID, aResult);
  NS_RELEASE(inst);

  return rv;
}

Here is the call graph for this function:

static void UnloadPrefsModule ( nsIModule unused) [static]

Definition at line 90 of file nsPrefsFactory.cpp.

{
  PREF_Cleanup();

#ifdef MOZ_PROFILESHARING
  NS_ASSERTION(!gSharedPrefHandler, "Leaking the shared pref handler (and the prefservice, presumably).");
  gSharedPrefHandler = nsnull;
#endif
}

Here is the call graph for this function:


Variable Documentation