|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21585/root/usr/lib64/xulrunner-devel-17.0.10/include/mozilla/dom/ |
Upload File : |
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_StorageChild_h
#define mozilla_dom_StorageChild_h
#include "mozilla/dom/PStorageChild.h"
#include "nsDOMStorage.h"
#include "nsCycleCollectionParticipant.h"
namespace mozilla {
namespace dom {
class StorageChild : public PStorageChild
, public DOMStorageBase
, public nsSupportsWeakReference
{
public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(StorageChild, nsIPrivacyTransitionObserver)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIPRIVACYTRANSITIONOBSERVER
StorageChild(nsDOMStorage* aOwner);
StorageChild(nsDOMStorage* aOwner, StorageChild& aOther);
virtual void InitAsSessionStorage(nsIURI* aDomainURI, bool aPrivate);
virtual void InitAsLocalStorage(nsIURI* aDomainURI, bool aCanUseChromePersist, bool aPrivate);
virtual bool CacheStoragePermissions();
virtual nsTArray<nsString>* GetKeys(bool aCallerSecure);
virtual nsresult GetLength(bool aCallerSecure, uint32_t* aLength);
virtual nsresult GetKey(bool aCallerSecure, uint32_t aIndex, nsAString& aKey);
virtual nsIDOMStorageItem* GetValue(bool aCallerSecure, const nsAString& aKey,
nsresult* rv);
virtual nsresult SetValue(bool aCallerSecure, const nsAString& aKey,
const nsAString& aData, nsAString& aOldValue);
virtual nsresult RemoveValue(bool aCallerSecure, const nsAString& aKey,
nsAString& aOldValue);
virtual nsresult Clear(bool aCallerSecure, int32_t* aOldCount);
virtual bool CanUseChromePersist();
virtual nsresult GetDBValue(const nsAString& aKey,
nsAString& aValue,
bool* aSecure);
virtual nsresult SetDBValue(const nsAString& aKey,
const nsAString& aValue,
bool aSecure);
virtual nsresult SetSecure(const nsAString& aKey, bool aSecure);
virtual nsresult CloneFrom(bool aCallerSecure, DOMStorageBase* aThat);
void AddIPDLReference();
void ReleaseIPDLReference();
private:
void InitRemote();
// Unimplemented
StorageChild(const StorageChild&);
nsCOMPtr<nsIDOMStorageObsolete> mStorage;
bool mIPCOpen;
};
}
}
#endif