2015-03-02 13:20:00 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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_cache_CacheStorageParent_h
|
|
|
|
#define mozilla_dom_cache_CacheStorageParent_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/cache/PCacheStorageParent.h"
|
|
|
|
#include "mozilla/dom/cache/PrincipalVerifier.h"
|
|
|
|
#include "mozilla/dom/cache/Types.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace cache {
|
|
|
|
|
|
|
|
class ManagerId;
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
class CacheStorageParent final : public PCacheStorageParent
|
2015-03-22 06:52:12 +00:00
|
|
|
, public PrincipalVerifier::Listener
|
2015-03-02 13:20:00 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CacheStorageParent(PBackgroundParent* aManagingActor, Namespace aNamespace,
|
|
|
|
const mozilla::ipc::PrincipalInfo& aPrincipalInfo);
|
|
|
|
virtual ~CacheStorageParent();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// PCacheStorageParent methods
|
2015-04-16 19:00:15 +00:00
|
|
|
virtual void
|
|
|
|
ActorDestroy(ActorDestroyReason aReason) override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
2015-04-16 19:00:15 +00:00
|
|
|
virtual PCacheOpParent*
|
|
|
|
AllocPCacheOpParent(const CacheOpArgs& aOpArgs) override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
2015-04-16 19:00:15 +00:00
|
|
|
virtual bool
|
|
|
|
DeallocPCacheOpParent(PCacheOpParent* aActor) override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
2015-04-16 19:00:15 +00:00
|
|
|
virtual bool
|
|
|
|
RecvPCacheOpConstructor(PCacheOpParent* actor,
|
|
|
|
const CacheOpArgs& aOpArgs) override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
2015-04-16 19:00:15 +00:00
|
|
|
virtual bool
|
|
|
|
RecvTeardown() override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
2015-04-16 19:00:15 +00:00
|
|
|
// PrincipalVerifier::Listener methods
|
|
|
|
virtual void OnPrincipalVerified(nsresult aRv,
|
|
|
|
ManagerId* aManagerId) override;
|
2015-03-02 13:20:00 +00:00
|
|
|
|
|
|
|
const Namespace mNamespace;
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<PrincipalVerifier> mVerifier;
|
2015-03-02 13:20:00 +00:00
|
|
|
nsresult mVerifiedStatus;
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<ManagerId> mManagerId;
|
2015-03-02 13:20:00 +00:00
|
|
|
};
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace cache
|
2015-03-02 13:20:00 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_cache_CacheStorageParent_h
|