Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
nsDOMStorageManager Class Reference

#include <nsDOMStorage.h>

Inheritance diagram for nsDOMStorageManager:
Inheritance graph
[legend]
Collaboration diagram for nsDOMStorageManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER void 
AddToStoragesHash (nsDOMStorage *aStorage)
void RemoveFromStoragesHash (nsDOMStorage *aStorage)
nsresult ClearAllStorages ()
void observe (in nsISupports aSubject, in string aTopic, in wstring aData)
 Observe will be called when there is a notification for the topic |aTopic|.

Static Public Member Functions

static nsresult Initialize ()
static void Shutdown ()

Static Public Attributes

static nsDOMStorageManagergStorageManager

Protected Attributes

nsTHashtable< nsDOMStorageEntrymStorages

Detailed Description

Definition at line 83 of file nsDOMStorage.h.


Member Function Documentation

Definition at line 198 of file nsDOMStorage.cpp.

{
  nsDOMStorageEntry* entry = mStorages.PutEntry(aStorage);
  if (entry)
    entry->mStorage = aStorage;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 143 of file nsDOMStorage.cpp.

{
  gStorageManager = new nsDOMStorageManager();
  if (!gStorageManager)
    return NS_ERROR_OUT_OF_MEMORY;

  if (!gStorageManager->mStorages.Init()) {
    delete gStorageManager;
    gStorageManager = nsnull;
    return NS_ERROR_OUT_OF_MEMORY;
  }

  NS_ADDREF(gStorageManager);

  nsCOMPtr<nsIObserverService> os = do_GetService("@mozilla.org/observer-service;1");
  if (os)
    os->AddObserver(gStorageManager, "cookie-changed", PR_FALSE);

  return NS_OK;
}

Here is the call graph for this function:

void nsIObserver::observe ( in nsISupports  aSubject,
in string  aTopic,
in wstring  aData 
) [inherited]

Observe will be called when there is a notification for the topic |aTopic|.

This assumes that the object implementing this interface has been registered with an observer service such as the nsIObserverService.

If you expect multiple topics/subjects, the impl is responsible for filtering.

You should not modify, add, remove, or enumerate notifications in the implemention of observe.

Parameters:
aSubject: Notification specific interface pointer.
aTopic: The notification topic or subject.
aData: Notification specific wide string. subject event.

Definition at line 206 of file nsDOMStorage.cpp.

{
 nsDOMStorageEntry* entry = mStorages.GetEntry(aStorage);
  if (entry)
    mStorages.RemoveEntry(aStorage);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 100 of file nsDOMStorage.h.

Definition at line 104 of file nsDOMStorage.h.


The documentation for this class was generated from the following files: