From d2326c284cb9883efea9d17bf1014f7c30e1e6a4 Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Tue, 14 Apr 2015 17:11:19 -0700 Subject: [PATCH] Bug 1110485 P2 Remove 'P' prefix from non-protocol IPC types in Cache API. r=baku --HG-- rename : dom/cache/PCacheTypes.ipdlh => dom/cache/CacheTypes.ipdlh --- dom/cache/AutoUtils.cpp | 88 +++++++++---------- dom/cache/AutoUtils.h | 6 +- dom/cache/Cache.cpp | 20 ++--- dom/cache/CacheOpChild.cpp | 8 +- dom/cache/CacheOpChild.h | 6 +- dom/cache/CacheOpParent.cpp | 8 +- dom/cache/CacheOpParent.h | 2 +- dom/cache/CacheStorage.cpp | 6 +- dom/cache/CacheStorage.h | 2 - dom/cache/CacheStreamControlChild.cpp | 8 +- dom/cache/CacheStreamControlChild.h | 6 +- dom/cache/CacheStreamControlParent.cpp | 8 +- dom/cache/CacheStreamControlParent.h | 6 +- .../{PCacheTypes.ipdlh => CacheTypes.ipdlh} | 58 ++++++------ dom/cache/DBSchema.cpp | 42 ++++----- dom/cache/DBSchema.h | 42 ++++----- dom/cache/FetchPut.cpp | 23 +++-- dom/cache/FetchPut.h | 12 +-- dom/cache/Manager.cpp | 6 +- dom/cache/Manager.h | 5 +- dom/cache/PCache.ipdl | 6 +- dom/cache/PCacheOp.ipdl | 6 +- dom/cache/PCacheStorage.ipdl | 6 +- dom/cache/ReadStream.cpp | 24 ++--- dom/cache/ReadStream.h | 12 +-- dom/cache/SavedTypes.h | 6 +- dom/cache/StreamControl.h | 8 +- dom/cache/StreamUtils.cpp | 48 +++++----- dom/cache/StreamUtils.h | 22 ++--- dom/cache/TypeUtils.cpp | 38 ++++---- dom/cache/TypeUtils.h | 34 +++---- dom/cache/moz.build | 2 +- 32 files changed, 283 insertions(+), 291 deletions(-) rename dom/cache/{PCacheTypes.ipdlh => CacheTypes.ipdlh} (79%) diff --git a/dom/cache/AutoUtils.cpp b/dom/cache/AutoUtils.cpp index 02304075ae6f..ff75acf9fc8d 100644 --- a/dom/cache/AutoUtils.cpp +++ b/dom/cache/AutoUtils.cpp @@ -22,8 +22,8 @@ namespace { using mozilla::unused; using mozilla::dom::cache::CachePushStreamChild; -using mozilla::dom::cache::PCacheReadStream; -using mozilla::dom::cache::PCacheReadStreamOrVoid; +using mozilla::dom::cache::CacheReadStream; +using mozilla::dom::cache::CacheReadStreamOrVoid; using mozilla::ipc::FileDescriptor; using mozilla::ipc::FileDescriptorSetChild; using mozilla::ipc::FileDescriptorSetParent; @@ -36,7 +36,7 @@ enum CleanupAction }; void -CleanupChildFds(PCacheReadStream& aReadStream, CleanupAction aAction) +CleanupChildFds(CacheReadStream& aReadStream, CleanupAction aAction) { if (aReadStream.fds().type() != OptionalFileDescriptorSet::TPFileDescriptorSetChild) { @@ -60,7 +60,7 @@ CleanupChildFds(PCacheReadStream& aReadStream, CleanupAction aAction) } void -CleanupChildPushStream(PCacheReadStream& aReadStream, CleanupAction aAction) +CleanupChildPushStream(CacheReadStream& aReadStream, CleanupAction aAction) { if (!aReadStream.pushStreamChild()) { return; @@ -79,24 +79,24 @@ CleanupChildPushStream(PCacheReadStream& aReadStream, CleanupAction aAction) } void -CleanupChild(PCacheReadStream& aReadStream, CleanupAction aAction) +CleanupChild(CacheReadStream& aReadStream, CleanupAction aAction) { CleanupChildFds(aReadStream, aAction); CleanupChildPushStream(aReadStream, aAction); } void -CleanupChild(PCacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction) +CleanupChild(CacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction) { - if (aReadStreamOrVoid.type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aReadStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) { return; } - CleanupChild(aReadStreamOrVoid.get_PCacheReadStream(), aAction); + CleanupChild(aReadStreamOrVoid.get_CacheReadStream(), aAction); } void -CleanupParentFds(PCacheReadStream& aReadStream, CleanupAction aAction) +CleanupParentFds(CacheReadStream& aReadStream, CleanupAction aAction) { if (aReadStream.fds().type() != OptionalFileDescriptorSet::TPFileDescriptorSetParent) { @@ -120,13 +120,13 @@ CleanupParentFds(PCacheReadStream& aReadStream, CleanupAction aAction) } void -CleanupParentFds(PCacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction) +CleanupParentFds(CacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction) { - if (aReadStreamOrVoid.type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aReadStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) { return; } - CleanupParentFds(aReadStreamOrVoid.get_PCacheReadStream(), aAction); + CleanupParentFds(aReadStreamOrVoid.get_CacheReadStream(), aAction); } } // anonymous namespace @@ -162,10 +162,10 @@ AutoChildOpArgs::~AutoChildOpArgs() case CacheOpArgs::TCacheMatchAllArgs: { CacheMatchAllArgs& args = mOpArgs.get_CacheMatchAllArgs(); - if (args.requestOrVoid().type() == PCacheRequestOrVoid::Tvoid_t) { + if (args.requestOrVoid().type() == CacheRequestOrVoid::Tvoid_t) { break; } - CleanupChild(args.requestOrVoid().get_PCacheRequest().body(), action); + CleanupChild(args.requestOrVoid().get_CacheRequest().body(), action); break; } case CacheOpArgs::TCacheAddAllArgs: @@ -196,10 +196,10 @@ AutoChildOpArgs::~AutoChildOpArgs() case CacheOpArgs::TCacheKeysArgs: { CacheKeysArgs& args = mOpArgs.get_CacheKeysArgs(); - if (args.requestOrVoid().type() == PCacheRequestOrVoid::Tvoid_t) { + if (args.requestOrVoid().type() == CacheRequestOrVoid::Tvoid_t) { break; } - CleanupChild(args.requestOrVoid().get_PCacheRequest().body(), action); + CleanupChild(args.requestOrVoid().get_CacheRequest().body(), action); break; } case CacheOpArgs::TStorageMatchArgs: @@ -225,16 +225,16 @@ AutoChildOpArgs::Add(InternalRequest* aRequest, BodyAction aBodyAction, case CacheOpArgs::TCacheMatchArgs: { CacheMatchArgs& args = mOpArgs.get_CacheMatchArgs(); - mTypeUtils->ToPCacheRequest(args.request(), aRequest, aBodyAction, + mTypeUtils->ToCacheRequest(args.request(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); break; } case CacheOpArgs::TCacheMatchAllArgs: { CacheMatchAllArgs& args = mOpArgs.get_CacheMatchAllArgs(); - MOZ_ASSERT(args.requestOrVoid().type() == PCacheRequestOrVoid::Tvoid_t); - args.requestOrVoid() = PCacheRequest(); - mTypeUtils->ToPCacheRequest(args.requestOrVoid().get_PCacheRequest(), + MOZ_ASSERT(args.requestOrVoid().type() == CacheRequestOrVoid::Tvoid_t); + args.requestOrVoid() = CacheRequest(); + mTypeUtils->ToCacheRequest(args.requestOrVoid().get_CacheRequest(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); break; @@ -250,9 +250,9 @@ AutoChildOpArgs::Add(InternalRequest* aRequest, BodyAction aBodyAction, // // Avoid a lot of this hassle by making sure we only create one here. On // error we remove it. - PCacheRequest& request = *args.requestList().AppendElement(); + CacheRequest& request = *args.requestList().AppendElement(); - mTypeUtils->ToPCacheRequest(request, aRequest, aBodyAction, + mTypeUtils->ToCacheRequest(request, aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); if (aRv.Failed()) { args.requestList().RemoveElementAt(args.requestList().Length() - 1); @@ -262,16 +262,16 @@ AutoChildOpArgs::Add(InternalRequest* aRequest, BodyAction aBodyAction, case CacheOpArgs::TCacheDeleteArgs: { CacheDeleteArgs& args = mOpArgs.get_CacheDeleteArgs(); - mTypeUtils->ToPCacheRequest(args.request(), aRequest, aBodyAction, + mTypeUtils->ToCacheRequest(args.request(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); break; } case CacheOpArgs::TCacheKeysArgs: { CacheKeysArgs& args = mOpArgs.get_CacheKeysArgs(); - MOZ_ASSERT(args.requestOrVoid().type() == PCacheRequestOrVoid::Tvoid_t); - args.requestOrVoid() = PCacheRequest(); - mTypeUtils->ToPCacheRequest(args.requestOrVoid().get_PCacheRequest(), + MOZ_ASSERT(args.requestOrVoid().type() == CacheRequestOrVoid::Tvoid_t); + args.requestOrVoid() = CacheRequest(); + mTypeUtils->ToCacheRequest(args.requestOrVoid().get_CacheRequest(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); break; @@ -279,7 +279,7 @@ AutoChildOpArgs::Add(InternalRequest* aRequest, BodyAction aBodyAction, case CacheOpArgs::TStorageMatchArgs: { StorageMatchArgs& args = mOpArgs.get_StorageMatchArgs(); - mTypeUtils->ToPCacheRequest(args.request(), aRequest, aBodyAction, + mTypeUtils->ToCacheRequest(args.request(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); break; } @@ -311,10 +311,10 @@ AutoChildOpArgs::Add(InternalRequest* aRequest, BodyAction aBodyAction, pair.request().body() = void_t(); pair.response().body() = void_t(); - mTypeUtils->ToPCacheRequest(pair.request(), aRequest, aBodyAction, + mTypeUtils->ToCacheRequest(pair.request(), aRequest, aBodyAction, aReferrerAction, aSchemeAction, aRv); if (!aRv.Failed()) { - mTypeUtils->ToPCacheResponse(pair.response(), aResponse, aRv); + mTypeUtils->ToCacheResponse(pair.response(), aResponse, aRv); } if (aRv.Failed()) { @@ -358,10 +358,10 @@ AutoParentOpResult::~AutoParentOpResult() case CacheOpResult::TCacheMatchResult: { CacheMatchResult& result = mOpResult.get_CacheMatchResult(); - if (result.responseOrVoid().type() == PCacheResponseOrVoid::Tvoid_t) { + if (result.responseOrVoid().type() == CacheResponseOrVoid::Tvoid_t) { break; } - CleanupParentFds(result.responseOrVoid().get_PCacheResponse().body(), + CleanupParentFds(result.responseOrVoid().get_CacheResponse().body(), action); break; } @@ -384,10 +384,10 @@ AutoParentOpResult::~AutoParentOpResult() case CacheOpResult::TStorageMatchResult: { StorageMatchResult& result = mOpResult.get_StorageMatchResult(); - if (result.responseOrVoid().type() == PCacheResponseOrVoid::Tvoid_t) { + if (result.responseOrVoid().type() == CacheResponseOrVoid::Tvoid_t) { break; } - CleanupParentFds(result.responseOrVoid().get_PCacheResponse().body(), + CleanupParentFds(result.responseOrVoid().get_CacheResponse().body(), action); break; } @@ -428,10 +428,10 @@ AutoParentOpResult::Add(const SavedResponse& aSavedResponse, case CacheOpResult::TCacheMatchResult: { CacheMatchResult& result = mOpResult.get_CacheMatchResult(); - MOZ_ASSERT(result.responseOrVoid().type() == PCacheResponseOrVoid::Tvoid_t); + MOZ_ASSERT(result.responseOrVoid().type() == CacheResponseOrVoid::Tvoid_t); result.responseOrVoid() = aSavedResponse.mValue; SerializeResponseBody(aSavedResponse, aStreamList, - &result.responseOrVoid().get_PCacheResponse()); + &result.responseOrVoid().get_CacheResponse()); break; } case CacheOpResult::TCacheMatchAllResult: @@ -445,10 +445,10 @@ AutoParentOpResult::Add(const SavedResponse& aSavedResponse, case CacheOpResult::TStorageMatchResult: { StorageMatchResult& result = mOpResult.get_StorageMatchResult(); - MOZ_ASSERT(result.responseOrVoid().type() == PCacheResponseOrVoid::Tvoid_t); + MOZ_ASSERT(result.responseOrVoid().type() == CacheResponseOrVoid::Tvoid_t); result.responseOrVoid() = aSavedResponse.mValue; SerializeResponseBody(aSavedResponse, aStreamList, - &result.responseOrVoid().get_PCacheResponse()); + &result.responseOrVoid().get_CacheResponse()); break; } default: @@ -467,16 +467,16 @@ AutoParentOpResult::Add(const SavedRequest& aSavedRequest, { CacheKeysResult& result = mOpResult.get_CacheKeysResult(); result.requestList().AppendElement(aSavedRequest.mValue); - PCacheRequest& request = result.requestList().LastElement(); + CacheRequest& request = result.requestList().LastElement(); if (!aSavedRequest.mHasBodyId) { request.body() = void_t(); break; } - request.body() = PCacheReadStream(); + request.body() = CacheReadStream(); SerializeReadStream(aSavedRequest.mBodyId, aStreamList, - &request.body().get_PCacheReadStream()); + &request.body().get_CacheReadStream()); break; } default: @@ -495,7 +495,7 @@ AutoParentOpResult::SendAsOpResult() void AutoParentOpResult::SerializeResponseBody(const SavedResponse& aSavedResponse, StreamList* aStreamList, - PCacheResponse* aResponseOut) + CacheResponse* aResponseOut) { MOZ_ASSERT(aResponseOut); @@ -504,14 +504,14 @@ AutoParentOpResult::SerializeResponseBody(const SavedResponse& aSavedResponse, return; } - aResponseOut->body() = PCacheReadStream(); + aResponseOut->body() = CacheReadStream(); SerializeReadStream(aSavedResponse.mBodyId, aStreamList, - &aResponseOut->body().get_PCacheReadStream()); + &aResponseOut->body().get_CacheReadStream()); } void AutoParentOpResult::SerializeReadStream(const nsID& aId, StreamList* aStreamList, - PCacheReadStream* aReadStreamOut) + CacheReadStream* aReadStreamOut) { MOZ_ASSERT(aStreamList); MOZ_ASSERT(aReadStreamOut); diff --git a/dom/cache/AutoUtils.h b/dom/cache/AutoUtils.h index eb1b48e3ff89..69864591d526 100644 --- a/dom/cache/AutoUtils.h +++ b/dom/cache/AutoUtils.h @@ -8,7 +8,7 @@ #define mozilla_dom_cache_AutoUtils_h #include "mozilla/Attributes.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/Types.h" #include "mozilla/dom/cache/TypeUtils.h" #include "nsTArray.h" @@ -84,10 +84,10 @@ public: private: void SerializeResponseBody(const SavedResponse& aSavedResponse, StreamList* aStreamList, - PCacheResponse* aResponseOut); + CacheResponse* aResponseOut); void SerializeReadStream(const nsID& aId, StreamList* aStreamList, - PCacheReadStream* aReadStreamOut); + CacheReadStream* aReadStreamOut); mozilla::ipc::PBackgroundParent* mManager; CacheOpResult mOpResult; diff --git a/dom/cache/Cache.cpp b/dom/cache/Cache.cpp index 923d1bbfbdcd..c2bff6529280 100644 --- a/dom/cache/Cache.cpp +++ b/dom/cache/Cache.cpp @@ -106,10 +106,10 @@ Cache::Match(const RequestOrUSVString& aRequest, return nullptr; } - PCacheQueryParams params; - ToPCacheQueryParams(params, aOptions); + CacheQueryParams params; + ToCacheQueryParams(params, aOptions); - AutoChildOpArgs args(this, CacheMatchArgs(PCacheRequest(), params)); + AutoChildOpArgs args(this, CacheMatchArgs(CacheRequest(), params)); args.Add(ir, IgnoreBody, PassThroughReferrer, IgnoreInvalidScheme, aRv); if (NS_WARN_IF(aRv.Failed())) { @@ -125,8 +125,8 @@ Cache::MatchAll(const Optional& aRequest, { MOZ_ASSERT(mActor); - PCacheQueryParams params; - ToPCacheQueryParams(params, aOptions); + CacheQueryParams params; + ToCacheQueryParams(params, aOptions); AutoChildOpArgs args(this, CacheMatchAllArgs(void_t(), params)); @@ -246,10 +246,10 @@ Cache::Delete(const RequestOrUSVString& aRequest, return nullptr; } - PCacheQueryParams params; - ToPCacheQueryParams(params, aOptions); + CacheQueryParams params; + ToCacheQueryParams(params, aOptions); - AutoChildOpArgs args(this, CacheDeleteArgs(PCacheRequest(), params)); + AutoChildOpArgs args(this, CacheDeleteArgs(CacheRequest(), params)); args.Add(ir, IgnoreBody, PassThroughReferrer, IgnoreInvalidScheme, aRv); if (aRv.Failed()) { @@ -265,8 +265,8 @@ Cache::Keys(const Optional& aRequest, { MOZ_ASSERT(mActor); - PCacheQueryParams params; - ToPCacheQueryParams(params, aOptions); + CacheQueryParams params; + ToCacheQueryParams(params, aOptions); AutoChildOpArgs args(this, CacheKeysArgs(void_t(), params)); diff --git a/dom/cache/CacheOpChild.cpp b/dom/cache/CacheOpChild.cpp index 5e239730940c..c80c6c47e09b 100644 --- a/dom/cache/CacheOpChild.cpp +++ b/dom/cache/CacheOpChild.cpp @@ -155,10 +155,10 @@ CacheOpChild::CreatePushStream(nsIAsyncInputStream* aStream) } void -CacheOpChild::HandleResponse(const PCacheResponseOrVoid& aResponseOrVoid) +CacheOpChild::HandleResponse(const CacheResponseOrVoid& aResponseOrVoid) { nsRefPtr response; - if (aResponseOrVoid.type() == PCacheResponseOrVoid::TPCacheResponse) { + if (aResponseOrVoid.type() == CacheResponseOrVoid::TCacheResponse) { response = ToResponse(aResponseOrVoid); } @@ -171,7 +171,7 @@ CacheOpChild::HandleResponse(const PCacheResponseOrVoid& aResponseOrVoid) } void -CacheOpChild::HandleResponseList(const nsTArray& aResponseList) +CacheOpChild::HandleResponseList(const nsTArray& aResponseList) { nsAutoTArray, 256> responses; responses.SetCapacity(aResponseList.Length()); @@ -184,7 +184,7 @@ CacheOpChild::HandleResponseList(const nsTArray& aResponseList) } void -CacheOpChild::HandleRequestList(const nsTArray& aRequestList) +CacheOpChild::HandleRequestList(const nsTArray& aRequestList) { nsAutoTArray, 256> requests; requests.SetCapacity(aRequestList.Length()); diff --git a/dom/cache/CacheOpChild.h b/dom/cache/CacheOpChild.h index b444cc934652..4794bebad354 100644 --- a/dom/cache/CacheOpChild.h +++ b/dom/cache/CacheOpChild.h @@ -56,13 +56,13 @@ private: // Utility methods void - HandleResponse(const PCacheResponseOrVoid& aResponseOrVoid); + HandleResponse(const CacheResponseOrVoid& aResponseOrVoid); void - HandleResponseList(const nsTArray& aResponseList); + HandleResponseList(const nsTArray& aResponseList); void - HandleRequestList(const nsTArray& aRequestList); + HandleRequestList(const nsTArray& aRequestList); nsCOMPtr mGlobal; nsCOMPtr mParent; diff --git a/dom/cache/CacheOpParent.cpp b/dom/cache/CacheOpParent.cpp index 20c119a54473..d04c5e13b7b3 100644 --- a/dom/cache/CacheOpParent.cpp +++ b/dom/cache/CacheOpParent.cpp @@ -77,7 +77,7 @@ CacheOpParent::Execute(Manager* aManager) MOZ_ASSERT(mCacheId != INVALID_CACHE_ID); const CacheAddAllArgs& args = mOpArgs.get_CacheAddAllArgs(); - const nsTArray& list = args.requestList(); + const nsTArray& list = args.requestList(); nsAutoTArray, 256> requestStreamList; for (uint32_t i = 0; i < list.Length(); ++i) { @@ -232,14 +232,14 @@ CacheOpParent::OnFetchPut(FetchPut* aFetchPut, nsresult aRv) } already_AddRefed -CacheOpParent::DeserializeCacheStream(const PCacheReadStreamOrVoid& aStreamOrVoid) +CacheOpParent::DeserializeCacheStream(const CacheReadStreamOrVoid& aStreamOrVoid) { - if (aStreamOrVoid.type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) { return nullptr; } nsCOMPtr stream; - const PCacheReadStream& readStream = aStreamOrVoid.get_PCacheReadStream(); + const CacheReadStream& readStream = aStreamOrVoid.get_CacheReadStream(); // Option 1: A push stream actor was sent for nsPipe data if (readStream.pushStreamParent()) { diff --git a/dom/cache/CacheOpParent.h b/dom/cache/CacheOpParent.h index 00eb31963ebd..b61a29666bf9 100644 --- a/dom/cache/CacheOpParent.h +++ b/dom/cache/CacheOpParent.h @@ -67,7 +67,7 @@ private: // utility methods already_AddRefed - DeserializeCacheStream(const PCacheReadStreamOrVoid& aStreamOrVoid); + DeserializeCacheStream(const CacheReadStreamOrVoid& aStreamOrVoid); mozilla::ipc::PBackgroundParent* mIpcManager; const CacheId mCacheId; diff --git a/dom/cache/CacheStorage.cpp b/dom/cache/CacheStorage.cpp index 2f7a523103fa..c5ed9f74796d 100644 --- a/dom/cache/CacheStorage.cpp +++ b/dom/cache/CacheStorage.cpp @@ -194,12 +194,12 @@ CacheStorage::Match(const RequestOrUSVString& aRequest, return nullptr; } - PCacheQueryParams params; - ToPCacheQueryParams(params, aOptions); + CacheQueryParams params; + ToCacheQueryParams(params, aOptions); nsAutoPtr entry(new Entry()); entry->mPromise = promise; - entry->mArgs = StorageMatchArgs(PCacheRequest(), params); + entry->mArgs = StorageMatchArgs(CacheRequest(), params); entry->mRequest = request; mPendingRequests.AppendElement(entry.forget()); diff --git a/dom/cache/CacheStorage.h b/dom/cache/CacheStorage.h index 1191dcc27dae..ff227e61e127 100644 --- a/dom/cache/CacheStorage.h +++ b/dom/cache/CacheStorage.h @@ -37,10 +37,8 @@ namespace workers { namespace cache { -class CacheChild; class CacheStorageChild; class Feature; -class PCacheResponseOrVoid; class CacheStorage final : public nsIIPCBackgroundChildCreateCallback , public nsWrapperCache diff --git a/dom/cache/CacheStreamControlChild.cpp b/dom/cache/CacheStreamControlChild.cpp index f5a34ecc99e6..920b3050f4e0 100644 --- a/dom/cache/CacheStreamControlChild.cpp +++ b/dom/cache/CacheStreamControlChild.cpp @@ -9,7 +9,7 @@ #include "mozilla/DebugOnly.h" #include "mozilla/unused.h" #include "mozilla/dom/cache/ActorUtils.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/ipc/FileDescriptorSetChild.h" #include "mozilla/ipc/PBackgroundChild.h" @@ -69,7 +69,7 @@ CacheStreamControlChild::StartDestroy() } void -CacheStreamControlChild::SerializeControl(PCacheReadStream* aReadStreamOut) +CacheStreamControlChild::SerializeControl(CacheReadStream* aReadStreamOut) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlChild); aReadStreamOut->controlParent() = nullptr; @@ -77,7 +77,7 @@ CacheStreamControlChild::SerializeControl(PCacheReadStream* aReadStreamOut) } void -CacheStreamControlChild::SerializeFds(PCacheReadStream* aReadStreamOut, +CacheStreamControlChild::SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray& aFds) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlChild); @@ -97,7 +97,7 @@ CacheStreamControlChild::SerializeFds(PCacheReadStream* aReadStreamOut, } void -CacheStreamControlChild::DeserializeFds(const PCacheReadStream& aReadStream, +CacheStreamControlChild::DeserializeFds(const CacheReadStream& aReadStream, nsTArray& aFdsOut) { if (aReadStream.fds().type() != diff --git a/dom/cache/CacheStreamControlChild.h b/dom/cache/CacheStreamControlChild.h index a45a53c2eb45..50b956809a16 100644 --- a/dom/cache/CacheStreamControlChild.h +++ b/dom/cache/CacheStreamControlChild.h @@ -31,14 +31,14 @@ public: // StreamControl methods virtual void - SerializeControl(PCacheReadStream* aReadStreamOut) override; + SerializeControl(CacheReadStream* aReadStreamOut) override; virtual void - SerializeFds(PCacheReadStream* aReadStreamOut, + SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray& aFds) override; virtual void - DeserializeFds(const PCacheReadStream& aReadStream, + DeserializeFds(const CacheReadStream& aReadStream, nsTArray& aFdsOut) override; private: diff --git a/dom/cache/CacheStreamControlParent.cpp b/dom/cache/CacheStreamControlParent.cpp index 4e4e4c5aa09f..2aac608de526 100644 --- a/dom/cache/CacheStreamControlParent.cpp +++ b/dom/cache/CacheStreamControlParent.cpp @@ -8,7 +8,7 @@ #include "mozilla/DebugOnly.h" #include "mozilla/unused.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/dom/cache/StreamList.h" #include "mozilla/ipc/FileDescriptorSetParent.h" @@ -45,7 +45,7 @@ CacheStreamControlParent::~CacheStreamControlParent() } void -CacheStreamControlParent::SerializeControl(PCacheReadStream* aReadStreamOut) +CacheStreamControlParent::SerializeControl(CacheReadStream* aReadStreamOut) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); aReadStreamOut->controlChild() = nullptr; @@ -53,7 +53,7 @@ CacheStreamControlParent::SerializeControl(PCacheReadStream* aReadStreamOut) } void -CacheStreamControlParent::SerializeFds(PCacheReadStream* aReadStreamOut, +CacheStreamControlParent::SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray& aFds) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); @@ -73,7 +73,7 @@ CacheStreamControlParent::SerializeFds(PCacheReadStream* aReadStreamOut, } void -CacheStreamControlParent::DeserializeFds(const PCacheReadStream& aReadStream, +CacheStreamControlParent::DeserializeFds(const CacheReadStream& aReadStream, nsTArray& aFdsOut) { if (aReadStream.fds().type() != diff --git a/dom/cache/CacheStreamControlParent.h b/dom/cache/CacheStreamControlParent.h index 6561032ad1bb..706a98b65956 100644 --- a/dom/cache/CacheStreamControlParent.h +++ b/dom/cache/CacheStreamControlParent.h @@ -32,14 +32,14 @@ public: // StreamControl methods virtual void - SerializeControl(PCacheReadStream* aReadStreamOut) override; + SerializeControl(CacheReadStream* aReadStreamOut) override; virtual void - SerializeFds(PCacheReadStream* aReadStreamOut, + SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray& aFds) override; virtual void - DeserializeFds(const PCacheReadStream& aReadStream, + DeserializeFds(const CacheReadStream& aReadStream, nsTArray& aFdsOut) override; private: diff --git a/dom/cache/PCacheTypes.ipdlh b/dom/cache/CacheTypes.ipdlh similarity index 79% rename from dom/cache/PCacheTypes.ipdlh rename to dom/cache/CacheTypes.ipdlh index a19f525ff847..5750e4b40487 100644 --- a/dom/cache/PCacheTypes.ipdlh +++ b/dom/cache/CacheTypes.ipdlh @@ -21,7 +21,7 @@ namespace mozilla { namespace dom { namespace cache { -struct PCacheQueryParams +struct CacheQueryParams { bool ignoreSearch; bool ignoreMethod; @@ -30,7 +30,7 @@ struct PCacheQueryParams nsString cacheName; }; -struct PCacheReadStream +struct CacheReadStream { nsID id; OptionalInputStreamParams params; @@ -39,13 +39,13 @@ struct PCacheReadStream nullable PCachePushStream pushStream; }; -union PCacheReadStreamOrVoid +union CacheReadStreamOrVoid { void_t; - PCacheReadStream; + CacheReadStream; }; -struct PCacheRequest +struct CacheRequest { nsCString method; nsString url; @@ -55,19 +55,19 @@ struct PCacheRequest nsString referrer; RequestMode mode; RequestCredentials credentials; - PCacheReadStreamOrVoid body; + CacheReadStreamOrVoid body; uint32_t contentPolicyType; RequestContext context; RequestCache requestCache; }; -union PCacheRequestOrVoid +union CacheRequestOrVoid { void_t; - PCacheRequest; + CacheRequest; }; -struct PCacheResponse +struct CacheResponse { ResponseType type; nsString url; @@ -75,37 +75,37 @@ struct PCacheResponse nsCString statusText; PHeadersEntry[] headers; HeadersGuardEnum headersGuard; - PCacheReadStreamOrVoid body; + CacheReadStreamOrVoid body; nsCString securityInfo; }; -union PCacheResponseOrVoid +union CacheResponseOrVoid { void_t; - PCacheResponse; + CacheResponse; }; struct CacheRequestResponse { - PCacheRequest request; - PCacheResponse response; + CacheRequest request; + CacheResponse response; }; struct CacheMatchArgs { - PCacheRequest request; - PCacheQueryParams params; + CacheRequest request; + CacheQueryParams params; }; struct CacheMatchAllArgs { - PCacheRequestOrVoid requestOrVoid; - PCacheQueryParams params; + CacheRequestOrVoid requestOrVoid; + CacheQueryParams params; }; struct CacheAddAllArgs { - PCacheRequest[] requestList; + CacheRequest[] requestList; }; struct CachePutAllArgs @@ -115,20 +115,20 @@ struct CachePutAllArgs struct CacheDeleteArgs { - PCacheRequest request; - PCacheQueryParams params; + CacheRequest request; + CacheQueryParams params; }; struct CacheKeysArgs { - PCacheRequestOrVoid requestOrVoid; - PCacheQueryParams params; + CacheRequestOrVoid requestOrVoid; + CacheQueryParams params; }; struct StorageMatchArgs { - PCacheRequest request; - PCacheQueryParams params; + CacheRequest request; + CacheQueryParams params; }; struct StorageHasArgs @@ -167,12 +167,12 @@ union CacheOpArgs struct CacheMatchResult { - PCacheResponseOrVoid responseOrVoid; + CacheResponseOrVoid responseOrVoid; }; struct CacheMatchAllResult { - PCacheResponse[] responseList; + CacheResponse[] responseList; }; struct CacheAddAllResult @@ -190,12 +190,12 @@ struct CacheDeleteResult struct CacheKeysResult { - PCacheRequest[] requestList; + CacheRequest[] requestList; }; struct StorageMatchResult { - PCacheResponseOrVoid responseOrVoid; + CacheResponseOrVoid responseOrVoid; }; struct StorageHasResult diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp index 6c4f70b86e79..73865b6e21a3 100644 --- a/dom/cache/DBSchema.cpp +++ b/dom/cache/DBSchema.cpp @@ -8,7 +8,7 @@ #include "ipc/IPCMessageUtils.h" #include "mozilla/dom/InternalHeaders.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/SavedTypes.h" #include "mozIStorageConnection.h" #include "mozIStorageStatement.h" @@ -417,8 +417,8 @@ DBSchema::IsCacheOrphaned(mozIStorageConnection* aConn, // static nsresult DBSchema::CacheMatch(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, bool* aFoundResponseOut, SavedResponse* aSavedResponseOut) { @@ -449,8 +449,8 @@ DBSchema::CacheMatch(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::CacheMatchAll(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequestOrVoid& aRequestOrVoid, - const PCacheQueryParams& aParams, + const CacheRequestOrVoid& aRequestOrVoid, + const CacheQueryParams& aParams, nsTArray& aSavedResponsesOut) { MOZ_ASSERT(!NS_IsMainThread()); @@ -458,7 +458,7 @@ DBSchema::CacheMatchAll(mozIStorageConnection* aConn, CacheId aCacheId, nsresult rv; nsAutoTArray matches; - if (aRequestOrVoid.type() == PCacheRequestOrVoid::Tvoid_t) { + if (aRequestOrVoid.type() == CacheRequestOrVoid::Tvoid_t) { rv = QueryAll(aConn, aCacheId, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } } else { @@ -481,16 +481,16 @@ DBSchema::CacheMatchAll(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::CachePut(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, const nsID* aRequestBodyId, - const PCacheResponse& aResponse, + const CacheResponse& aResponse, const nsID* aResponseBodyId, nsTArray& aDeletedBodyIdListOut) { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(aConn); - PCacheQueryParams params(false, false, false, false, + CacheQueryParams params(false, false, false, false, NS_LITERAL_STRING("")); nsAutoTArray matches; nsresult rv = QueryCache(aConn, aCacheId, aRequest, params, matches); @@ -509,8 +509,8 @@ DBSchema::CachePut(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::CacheDelete(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, nsTArray& aDeletedBodyIdListOut, bool* aSuccessOut) { MOZ_ASSERT(!NS_IsMainThread()); @@ -538,8 +538,8 @@ DBSchema::CacheDelete(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::CacheKeys(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequestOrVoid& aRequestOrVoid, - const PCacheQueryParams& aParams, + const CacheRequestOrVoid& aRequestOrVoid, + const CacheQueryParams& aParams, nsTArray& aSavedRequestsOut) { MOZ_ASSERT(!NS_IsMainThread()); @@ -547,7 +547,7 @@ DBSchema::CacheKeys(mozIStorageConnection* aConn, CacheId aCacheId, nsresult rv; nsAutoTArray matches; - if (aRequestOrVoid.type() == PCacheRequestOrVoid::Tvoid_t) { + if (aRequestOrVoid.type() == CacheRequestOrVoid::Tvoid_t) { rv = QueryAll(aConn, aCacheId, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } } else { @@ -571,8 +571,8 @@ DBSchema::CacheKeys(mozIStorageConnection* aConn, CacheId aCacheId, nsresult DBSchema::StorageMatch(mozIStorageConnection* aConn, Namespace aNamespace, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, bool* aFoundResponseOut, SavedResponse* aSavedResponseOut) { @@ -793,8 +793,8 @@ DBSchema::QueryAll(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::QueryCache(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, nsTArray& aEntryIdListOut, uint32_t aMaxResults) { @@ -871,7 +871,7 @@ DBSchema::QueryCache(mozIStorageConnection* aConn, CacheId aCacheId, // static nsresult DBSchema::MatchByVaryHeader(mozIStorageConnection* aConn, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, EntryId entryId, bool* aSuccessOut) { MOZ_ASSERT(!NS_IsMainThread()); @@ -1071,9 +1071,9 @@ DBSchema::DeleteEntries(mozIStorageConnection* aConn, // static nsresult DBSchema::InsertEntry(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, const nsID* aRequestBodyId, - const PCacheResponse& aResponse, + const CacheResponse& aResponse, const nsID* aResponseBodyId) { MOZ_ASSERT(!NS_IsMainThread()); diff --git a/dom/cache/DBSchema.h b/dom/cache/DBSchema.h index 37d3217ffd50..6611b8deea43 100644 --- a/dom/cache/DBSchema.h +++ b/dom/cache/DBSchema.h @@ -21,10 +21,10 @@ namespace mozilla { namespace dom { namespace cache { -class PCacheQueryParams; -class PCacheRequest; -class PCacheRequestOrVoid; -class PCacheResponse; +class CacheQueryParams; +class CacheRequest; +class CacheRequestOrVoid; +class CacheResponse; struct SavedRequest; struct SavedResponse; @@ -46,34 +46,34 @@ public: CacheId aCacheId, bool* aOrphanedOut); static nsresult CacheMatch(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, bool* aFoundResponseOut, SavedResponse* aSavedResponseOut); static nsresult CacheMatchAll(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequestOrVoid& aRequestOrVoid, - const PCacheQueryParams& aParams, + const CacheRequestOrVoid& aRequestOrVoid, + const CacheQueryParams& aParams, nsTArray& aSavedResponsesOut); static nsresult CachePut(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, const nsID* aRequestBodyId, - const PCacheResponse& aResponse, + const CacheResponse& aResponse, const nsID* aResponseBodyId, nsTArray& aDeletedBodyIdListOut); static nsresult CacheDelete(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, nsTArray& aDeletedBodyIdListOut, bool* aSuccessOut); static nsresult CacheKeys(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequestOrVoid& aRequestOrVoid, - const PCacheQueryParams& aParams, + const CacheRequestOrVoid& aRequestOrVoid, + const CacheQueryParams& aParams, nsTArray& aSavedRequestsOut); static nsresult StorageMatch(mozIStorageConnection* aConn, Namespace aNamespace, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, bool* aFoundResponseOut, SavedResponse* aSavedResponseOut); static nsresult StorageGetCacheId(mozIStorageConnection* aConn, @@ -98,21 +98,21 @@ private: static nsresult QueryAll(mozIStorageConnection* aConn, CacheId aCacheId, nsTArray& aEntryIdListOut); static nsresult QueryCache(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, - const PCacheQueryParams& aParams, + const CacheRequest& aRequest, + const CacheQueryParams& aParams, nsTArray& aEntryIdListOut, uint32_t aMaxResults = UINT32_MAX); static nsresult MatchByVaryHeader(mozIStorageConnection* aConn, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, EntryId entryId, bool* aSuccessOut); static nsresult DeleteEntries(mozIStorageConnection* aConn, const nsTArray& aEntryIdList, nsTArray& aDeletedBodyIdListOut, uint32_t aPos=0, int32_t aLen=-1); static nsresult InsertEntry(mozIStorageConnection* aConn, CacheId aCacheId, - const PCacheRequest& aRequest, + const CacheRequest& aRequest, const nsID* aRequestBodyId, - const PCacheResponse& aResponse, + const CacheResponse& aResponse, const nsID* aResponseBodyId); static nsresult ReadResponse(mozIStorageConnection* aConn, EntryId aEntryId, SavedResponse* aSavedResponseOut); diff --git a/dom/cache/FetchPut.cpp b/dom/cache/FetchPut.cpp index 719f323197f0..2634f3abc6c0 100644 --- a/dom/cache/FetchPut.cpp +++ b/dom/cache/FetchPut.cpp @@ -16,7 +16,6 @@ #include "mozilla/dom/ResponseBinding.h" #include "mozilla/dom/UnionTypes.h" #include "mozilla/dom/cache/ManagerId.h" -#include "mozilla/dom/cache/PCacheTypes.h" #include "nsContentUtils.h" #include "nsNetUtil.h" #include "nsThreadUtils.h" @@ -91,7 +90,7 @@ private: // static nsresult FetchPut::Create(Listener* aListener, Manager* aManager, CacheId aCacheId, - const nsTArray& aRequests, + const nsTArray& aRequests, const nsTArray>& aRequestStreams, FetchPut** aFetchPutOut) { @@ -125,7 +124,7 @@ FetchPut::ClearListener() } FetchPut::FetchPut(Listener* aListener, Manager* aManager, CacheId aCacheId, - const nsTArray& aRequests, + const nsTArray& aRequests, const nsTArray>& aRequestStreams) : mListener(aListener) , mManager(aManager) @@ -141,7 +140,7 @@ FetchPut::FetchPut(Listener* aListener, Manager* aManager, CacheId aCacheId, for (uint32_t i = 0; i < aRequests.Length(); ++i) { State* s = mStateList.AppendElement(); - s->mPCacheRequest = aRequests[i]; + s->mCacheRequest = aRequests[i]; s->mRequestStream = aRequestStreams[i]; } @@ -207,7 +206,7 @@ FetchPut::DoFetchOnMainThread() for (uint32_t i = 0; i < mStateList.Length(); ++i) { nsRefPtr internalRequest = - ToInternalRequest(mStateList[i].mPCacheRequest); + ToInternalRequest(mStateList[i].mCacheRequest); // If there is a stream we must clone it so that its still available // to store in the cache later; @@ -253,7 +252,7 @@ FetchPut::FetchComplete(FetchObserver* aObserver, for (uint32_t i = 0; i < mStateList.Length(); ++i) { if (mStateList[i].mFetchObserver == aObserver) { ErrorResult rv; - ToPCacheResponseWithoutBody(mStateList[i].mPCacheResponse, + ToCacheResponseWithoutBody(mStateList[i].mCacheResponse, *aInternalResponse, rv); if (rv.Failed()) { MaybeSetError(rv.ErrorCode()); @@ -305,15 +304,15 @@ FetchPut::DoPutOnWorkerThread() for (uint32_t i = 0; i < mStateList.Length(); ++i) { // The spec requires us to catch if content tries to insert a set of // requests that would overwrite each other. - if (MatchInPutList(mStateList[i].mPCacheRequest, putList)) { + if (MatchInPutList(mStateList[i].mCacheRequest, putList)) { MaybeSetError(NS_ERROR_DOM_INVALID_STATE_ERR); MaybeNotifyListener(); return; } CacheRequestResponse* entry = putList.AppendElement(); - entry->request() = mStateList[i].mPCacheRequest; - entry->response() = mStateList[i].mPCacheResponse; + entry->request() = mStateList[i].mCacheRequest; + entry->response() = mStateList[i].mCacheResponse; requestStreamList.AppendElement(mStateList[i].mRequestStream.forget()); responseStreamList.AppendElement(mStateList[i].mResponseStream.forget()); } @@ -325,7 +324,7 @@ FetchPut::DoPutOnWorkerThread() // static bool -FetchPut::MatchInPutList(const PCacheRequest& aRequest, +FetchPut::MatchInPutList(const CacheRequest& aRequest, const nsTArray& aPutList) { // This method implements the SW spec QueryCache algorithm against an @@ -343,8 +342,8 @@ FetchPut::MatchInPutList(const PCacheRequest& aRequest, new InternalHeaders(aRequest.headers()); for (uint32_t i = 0; i < aPutList.Length(); ++i) { - const PCacheRequest& cachedRequest = aPutList[i].request(); - const PCacheResponse& cachedResponse = aPutList[i].response(); + const CacheRequest& cachedRequest = aPutList[i].request(); + const CacheResponse& cachedResponse = aPutList[i].response(); // If the URLs don't match, then just skip to the next entry. if (aRequest.url() != cachedRequest.url()) { diff --git a/dom/cache/FetchPut.h b/dom/cache/FetchPut.h index b6564b70e497..7d7421f960f7 100644 --- a/dom/cache/FetchPut.h +++ b/dom/cache/FetchPut.h @@ -10,7 +10,7 @@ #include "mozilla/AlreadyAddRefed.h" #include "mozilla/Attributes.h" #include "mozilla/dom/cache/Manager.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/Types.h" #include "mozilla/dom/cache/TypeUtils.h" #include "nsRefPtr.h" @@ -44,7 +44,7 @@ public: static nsresult Create(Listener* aListener, Manager* aManager, CacheId aCacheId, - const nsTArray& aRequests, + const nsTArray& aRequests, const nsTArray>& aRequestStreams, FetchPut** aFetchPutOut); @@ -55,10 +55,10 @@ private: class FetchObserver; struct State { - PCacheRequest mPCacheRequest; + CacheRequest mCacheRequest; nsCOMPtr mRequestStream; nsRefPtr mFetchObserver; - PCacheResponse mPCacheResponse; + CacheResponse mCacheResponse; nsCOMPtr mResponseStream; nsRefPtr mRequest; @@ -66,7 +66,7 @@ private: }; FetchPut(Listener* aListener, Manager* aManager, CacheId aCacheId, - const nsTArray& aRequests, + const nsTArray& aRequests, const nsTArray>& aRequestStreams); ~FetchPut(); @@ -79,7 +79,7 @@ private: void MaybeCompleteOnMainThread(); void DoPutOnWorkerThread(); - static bool MatchInPutList(const PCacheRequest& aRequest, + static bool MatchInPutList(const CacheRequest& aRequest, const nsTArray& aPutList); virtual void diff --git a/dom/cache/Manager.cpp b/dom/cache/Manager.cpp index d7e851469c17..3e4c1bf49f85 100644 --- a/dom/cache/Manager.cpp +++ b/dom/cache/Manager.cpp @@ -16,7 +16,7 @@ #include "mozilla/dom/cache/DBSchema.h" #include "mozilla/dom/cache/FileUtils.h" #include "mozilla/dom/cache/ManagerId.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/SavedTypes.h" #include "mozilla/dom/cache/StreamList.h" #include "mozilla/dom/cache/Types.h" @@ -826,12 +826,12 @@ private: struct Entry { - PCacheRequest mRequest; + CacheRequest mRequest; nsCOMPtr mRequestStream; nsID mRequestBodyId; nsCOMPtr mRequestCopyContext; - PCacheResponse mResponse; + CacheResponse mResponse; nsCOMPtr mResponseStream; nsID mResponseBodyId; nsCOMPtr mResponseCopyContext; diff --git a/dom/cache/Manager.h b/dom/cache/Manager.h index 94921a4b2d08..b1a7ac374774 100644 --- a/dom/cache/Manager.h +++ b/dom/cache/Manager.h @@ -7,10 +7,10 @@ #ifndef mozilla_dom_cache_Manager_h #define mozilla_dom_cache_Manager_h -#include "mozilla/dom/cache/PCacheStreamControlParent.h" #include "mozilla/dom/cache/Types.h" #include "nsCOMPtr.h" #include "nsISupportsImpl.h" +#include "nsRefPtr.h" #include "nsString.h" #include "nsTArray.h" @@ -26,9 +26,6 @@ class CacheOpResult; class CacheRequestResponse; class Context; class ManagerId; -class PCacheQueryParams; -class PCacheRequest; -class PCacheRequestOrVoid; struct SavedRequest; struct SavedResponse; class StreamList; diff --git a/dom/cache/PCache.ipdl b/dom/cache/PCache.ipdl index a60b1d5d0c2a..fe82c0e6259b 100644 --- a/dom/cache/PCache.ipdl +++ b/dom/cache/PCache.ipdl @@ -3,13 +3,13 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ include protocol PBackground; +include protocol PBlob; // FIXME: bug 792908 include protocol PCacheOp; include protocol PCachePushStream; -include PCacheTypes; +include protocol PCacheStreamControl; include protocol PFileDescriptorSet; -include protocol PBlob; // FIXME: bug 792908 -include protocol PCacheStreamControl; +include CacheTypes; namespace mozilla { namespace dom { diff --git a/dom/cache/PCacheOp.ipdl b/dom/cache/PCacheOp.ipdl index 740d38c9e1d1..2f65d28af00b 100644 --- a/dom/cache/PCacheOp.ipdl +++ b/dom/cache/PCacheOp.ipdl @@ -3,14 +3,12 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ include protocol PCache; -include protocol PCacheStorage; - -// these are needed indirectly through CacheOpResult include protocol PCachePushStream; +include protocol PCacheStorage; include protocol PCacheStreamControl; include protocol PFileDescriptorSet; -include PCacheTypes; +include CacheTypes; namespace mozilla { namespace dom { diff --git a/dom/cache/PCacheStorage.ipdl b/dom/cache/PCacheStorage.ipdl index c3fb3d129cdf..ef06005b4125 100644 --- a/dom/cache/PCacheStorage.ipdl +++ b/dom/cache/PCacheStorage.ipdl @@ -3,13 +3,13 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ include protocol PBackground; +include protocol PBlob; // FIXME: bug 792908 include protocol PCache; include protocol PCacheOp; -include PCacheTypes; +include protocol PCacheStreamControl; include protocol PFileDescriptorSet; -include protocol PBlob; // FIXME: bug 792908 -include protocol PCacheStreamControl; +include CacheTypes; namespace mozilla { namespace dom { diff --git a/dom/cache/ReadStream.cpp b/dom/cache/ReadStream.cpp index a6689e971973..22aa95cfed94 100644 --- a/dom/cache/ReadStream.cpp +++ b/dom/cache/ReadStream.cpp @@ -9,7 +9,7 @@ #include "mozilla/unused.h" #include "mozilla/dom/cache/CacheStreamControlChild.h" #include "mozilla/dom/cache/CacheStreamControlParent.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/ipc/FileDescriptor.h" #include "mozilla/ipc/InputStreamUtils.h" #include "mozilla/SnappyUncompressInputStream.h" @@ -35,10 +35,10 @@ public: nsIInputStream* aStream); void - Serialize(PCacheReadStreamOrVoid* aReadStreamOut); + Serialize(CacheReadStreamOrVoid* aReadStreamOut); void - Serialize(PCacheReadStream* aReadStreamOut); + Serialize(CacheReadStream* aReadStreamOut); // ReadStream::Controllable methods virtual void @@ -193,17 +193,17 @@ ReadStream::Inner::Inner(StreamControl* aControl, const nsID& aId, } void -ReadStream::Inner::Serialize(PCacheReadStreamOrVoid* aReadStreamOut) +ReadStream::Inner::Serialize(CacheReadStreamOrVoid* aReadStreamOut) { MOZ_ASSERT(NS_GetCurrentThread() == mOwningThread); MOZ_ASSERT(aReadStreamOut); - PCacheReadStream stream; + CacheReadStream stream; Serialize(&stream); *aReadStreamOut = stream; } void -ReadStream::Inner::Serialize(PCacheReadStream* aReadStreamOut) +ReadStream::Inner::Serialize(CacheReadStream* aReadStreamOut) { MOZ_ASSERT(NS_GetCurrentThread() == mOwningThread); MOZ_ASSERT(aReadStreamOut); @@ -391,18 +391,18 @@ NS_IMPL_ISUPPORTS(cache::ReadStream, nsIInputStream, ReadStream); // static already_AddRefed -ReadStream::Create(const PCacheReadStreamOrVoid& aReadStreamOrVoid) +ReadStream::Create(const CacheReadStreamOrVoid& aReadStreamOrVoid) { - if (aReadStreamOrVoid.type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aReadStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) { return nullptr; } - return Create(aReadStreamOrVoid.get_PCacheReadStream()); + return Create(aReadStreamOrVoid.get_CacheReadStream()); } // static already_AddRefed -ReadStream::Create(const PCacheReadStream& aReadStream) +ReadStream::Create(const CacheReadStream& aReadStream) { // The parameter may or may not be for a Cache created stream. The way we // tell is by looking at the stream control actor. If the actor exists, @@ -457,13 +457,13 @@ ReadStream::Create(PCacheStreamControlParent* aControl, const nsID& aId, } void -ReadStream::Serialize(PCacheReadStreamOrVoid* aReadStreamOut) +ReadStream::Serialize(CacheReadStreamOrVoid* aReadStreamOut) { mInner->Serialize(aReadStreamOut); } void -ReadStream::Serialize(PCacheReadStream* aReadStreamOut) +ReadStream::Serialize(CacheReadStream* aReadStreamOut) { mInner->Serialize(aReadStreamOut); } diff --git a/dom/cache/ReadStream.h b/dom/cache/ReadStream.h index d44f9514c95a..6c1381b3c0bf 100644 --- a/dom/cache/ReadStream.h +++ b/dom/cache/ReadStream.h @@ -21,8 +21,8 @@ namespace mozilla { namespace dom { namespace cache { -class PCacheReadStream; -class PCacheReadStreamOrVoid; +class CacheReadStream; +class CacheReadStreamOrVoid; class PCacheStreamControlParent; // IID for the dom::cache::ReadStream interface @@ -71,17 +71,17 @@ public: }; static already_AddRefed - Create(const PCacheReadStreamOrVoid& aReadStreamOrVoid); + Create(const CacheReadStreamOrVoid& aReadStreamOrVoid); static already_AddRefed - Create(const PCacheReadStream& aReadStream); + Create(const CacheReadStream& aReadStream); static already_AddRefed Create(PCacheStreamControlParent* aControl, const nsID& aId, nsIInputStream* aStream); - void Serialize(PCacheReadStreamOrVoid* aReadStreamOut); - void Serialize(PCacheReadStream* aReadStreamOut); + void Serialize(CacheReadStreamOrVoid* aReadStreamOut); + void Serialize(CacheReadStream* aReadStreamOut); private: class Inner; diff --git a/dom/cache/SavedTypes.h b/dom/cache/SavedTypes.h index ec95c68d7287..9e1f686b4a65 100644 --- a/dom/cache/SavedTypes.h +++ b/dom/cache/SavedTypes.h @@ -10,7 +10,7 @@ // NOTE: This cannot be rolled into Types.h because the IPC dependency. // breaks webidl unified builds. -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/Types.h" #include "nsCOMPtr.h" #include "nsID.h" @@ -23,7 +23,7 @@ namespace cache { struct SavedRequest { SavedRequest() : mHasBodyId(false) { mValue.body() = void_t(); } - PCacheRequest mValue; + CacheRequest mValue; bool mHasBodyId; nsID mBodyId; CacheId mCacheId; @@ -32,7 +32,7 @@ struct SavedRequest struct SavedResponse { SavedResponse() : mHasBodyId(false) { mValue.body() = void_t(); } - PCacheResponse mValue; + CacheResponse mValue; bool mHasBodyId; nsID mBodyId; CacheId mCacheId; diff --git a/dom/cache/StreamControl.h b/dom/cache/StreamControl.h index 8b1cb6f8f9f6..a1e5518186c3 100644 --- a/dom/cache/StreamControl.h +++ b/dom/cache/StreamControl.h @@ -20,7 +20,7 @@ namespace ipc { namespace dom { namespace cache { -class PCacheReadStream; +class CacheReadStream; // Abstract class to help implement the stream control Child and Parent actors. // This provides an interface to partly help with serialization of IPC types, @@ -30,14 +30,14 @@ class StreamControl public: // abstract interface that must be implemented by child class virtual void - SerializeControl(PCacheReadStream* aReadStreamOut) = 0; + SerializeControl(CacheReadStream* aReadStreamOut) = 0; virtual void - SerializeFds(PCacheReadStream* aReadStreamOut, + SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray& aFds) = 0; virtual void - DeserializeFds(const PCacheReadStream& aReadStream, + DeserializeFds(const CacheReadStream& aReadStream, nsTArray& aFdsOut) = 0; // inherited implementation of the ReadStream::Controllable list diff --git a/dom/cache/StreamUtils.cpp b/dom/cache/StreamUtils.cpp index b0f7eae0ae54..570bbdfd463e 100644 --- a/dom/cache/StreamUtils.cpp +++ b/dom/cache/StreamUtils.cpp @@ -8,7 +8,7 @@ #include "mozilla/unused.h" #include "mozilla/dom/cache/CacheStreamControlChild.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/ipc/FileDescriptor.h" #include "mozilla/ipc/FileDescriptorSetChild.h" @@ -22,13 +22,13 @@ using mozilla::unused; using mozilla::void_t; using mozilla::dom::cache::CacheStreamControlChild; using mozilla::dom::cache::Feature; -using mozilla::dom::cache::PCacheReadStream; +using mozilla::dom::cache::CacheReadStream; using mozilla::ipc::FileDescriptor; using mozilla::ipc::FileDescriptorSetChild; using mozilla::ipc::OptionalFileDescriptorSet; void -StartDestroyStreamChild(const PCacheReadStream& aReadStream) +StartDestroyStreamChild(const CacheReadStream& aReadStream) { CacheStreamControlChild* cacheControl = static_cast(aReadStream.controlChild()); @@ -52,7 +52,7 @@ StartDestroyStreamChild(const PCacheReadStream& aReadStream) } void -AddFeatureToStreamChild(const PCacheReadStream& aReadStream, Feature* aFeature) +AddFeatureToStreamChild(const CacheReadStream& aReadStream, Feature* aFeature) { CacheStreamControlChild* cacheControl = static_cast(aReadStream.controlChild()); @@ -64,27 +64,27 @@ AddFeatureToStreamChild(const PCacheReadStream& aReadStream, Feature* aFeature) } // anonymous namespace void -StartDestroyStreamChild(const PCacheResponseOrVoid& aResponseOrVoid) +StartDestroyStreamChild(const CacheResponseOrVoid& aResponseOrVoid) { - if (aResponseOrVoid.type() == PCacheResponseOrVoid::Tvoid_t) { + if (aResponseOrVoid.type() == CacheResponseOrVoid::Tvoid_t) { return; } - StartDestroyStreamChild(aResponseOrVoid.get_PCacheResponse()); + StartDestroyStreamChild(aResponseOrVoid.get_CacheResponse()); } void -StartDestroyStreamChild(const PCacheResponse& aResponse) +StartDestroyStreamChild(const CacheResponse& aResponse) { - if (aResponse.body().type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aResponse.body().type() == CacheReadStreamOrVoid::Tvoid_t) { return; } - StartDestroyStreamChild(aResponse.body().get_PCacheReadStream()); + StartDestroyStreamChild(aResponse.body().get_CacheReadStream()); } void -StartDestroyStreamChild(const nsTArray& aResponses) +StartDestroyStreamChild(const nsTArray& aResponses) { for (uint32_t i = 0; i < aResponses.Length(); ++i) { StartDestroyStreamChild(aResponses[i]); @@ -92,40 +92,40 @@ StartDestroyStreamChild(const nsTArray& aResponses) } void -StartDestroyStreamChild(const nsTArray& aRequests) +StartDestroyStreamChild(const nsTArray& aRequests) { for (uint32_t i = 0; i < aRequests.Length(); ++i) { - if (aRequests[i].body().type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aRequests[i].body().type() == CacheReadStreamOrVoid::Tvoid_t) { continue; } - StartDestroyStreamChild(aRequests[i].body().get_PCacheReadStream()); + StartDestroyStreamChild(aRequests[i].body().get_CacheReadStream()); } } void -AddFeatureToStreamChild(const PCacheResponseOrVoid& aResponseOrVoid, +AddFeatureToStreamChild(const CacheResponseOrVoid& aResponseOrVoid, Feature* aFeature) { - if (aResponseOrVoid.type() == PCacheResponseOrVoid::Tvoid_t) { + if (aResponseOrVoid.type() == CacheResponseOrVoid::Tvoid_t) { return; } - AddFeatureToStreamChild(aResponseOrVoid.get_PCacheResponse(), aFeature); + AddFeatureToStreamChild(aResponseOrVoid.get_CacheResponse(), aFeature); } void -AddFeatureToStreamChild(const PCacheResponse& aResponse, +AddFeatureToStreamChild(const CacheResponse& aResponse, Feature* aFeature) { - if (aResponse.body().type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aResponse.body().type() == CacheReadStreamOrVoid::Tvoid_t) { return; } - AddFeatureToStreamChild(aResponse.body().get_PCacheReadStream(), aFeature); + AddFeatureToStreamChild(aResponse.body().get_CacheReadStream(), aFeature); } void -AddFeatureToStreamChild(const nsTArray& aResponses, +AddFeatureToStreamChild(const nsTArray& aResponses, Feature* aFeature) { for (uint32_t i = 0; i < aResponses.Length(); ++i) { @@ -134,14 +134,14 @@ AddFeatureToStreamChild(const nsTArray& aResponses, } void -AddFeatureToStreamChild(const nsTArray& aRequests, +AddFeatureToStreamChild(const nsTArray& aRequests, Feature* aFeature) { for (uint32_t i = 0; i < aRequests.Length(); ++i) { - if (aRequests[i].body().type() == PCacheReadStreamOrVoid::Tvoid_t) { + if (aRequests[i].body().type() == CacheReadStreamOrVoid::Tvoid_t) { continue; } - AddFeatureToStreamChild(aRequests[i].body().get_PCacheReadStream(), + AddFeatureToStreamChild(aRequests[i].body().get_CacheReadStream(), aFeature); } } diff --git a/dom/cache/StreamUtils.h b/dom/cache/StreamUtils.h index cb8d1bb65722..bf3d56d24453 100644 --- a/dom/cache/StreamUtils.h +++ b/dom/cache/StreamUtils.h @@ -14,22 +14,22 @@ namespace dom { namespace cache { class Feature; -class PCacheRequest; -class PCacheResponse; -class PCacheResponseOrVoid; +class CacheRequest; +class CacheResponse; +class CacheResponseOrVoid; -void StartDestroyStreamChild(const PCacheResponseOrVoid& aResponseOrVoid); -void StartDestroyStreamChild(const PCacheResponse& aResponse); -void StartDestroyStreamChild(const nsTArray& aResponses); -void StartDestroyStreamChild(const nsTArray& aRequests); +void StartDestroyStreamChild(const CacheResponseOrVoid& aResponseOrVoid); +void StartDestroyStreamChild(const CacheResponse& aResponse); +void StartDestroyStreamChild(const nsTArray& aResponses); +void StartDestroyStreamChild(const nsTArray& aRequests); -void AddFeatureToStreamChild(const PCacheResponseOrVoid& aResponseOrVoid, +void AddFeatureToStreamChild(const CacheResponseOrVoid& aResponseOrVoid, Feature* aFeature); -void AddFeatureToStreamChild(const PCacheResponse& aResponse, +void AddFeatureToStreamChild(const CacheResponse& aResponse, Feature* aFeature); -void AddFeatureToStreamChild(const nsTArray& aResponses, +void AddFeatureToStreamChild(const nsTArray& aResponses, Feature* aFeature); -void AddFeatureToStreamChild(const nsTArray& aRequests, +void AddFeatureToStreamChild(const nsTArray& aRequests, Feature* aFeature); } // namespace cache diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index d9fa6ff0c41b..cfeb7ebb9e91 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -12,7 +12,7 @@ #include "mozilla/dom/Request.h" #include "mozilla/dom/Response.h" #include "mozilla/dom/cache/CachePushStreamChild.h" -#include "mozilla/dom/cache/PCacheTypes.h" +#include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/ipc/BackgroundChild.h" #include "mozilla/ipc/FileDescriptorSetChild.h" @@ -32,7 +32,7 @@ namespace { using mozilla::ErrorResult; using mozilla::unused; using mozilla::void_t; -using mozilla::dom::cache::PCacheReadStream; +using mozilla::dom::cache::CacheReadStream; using mozilla::ipc::BackgroundChild; using mozilla::ipc::FileDescriptor; using mozilla::ipc::PBackgroundChild; @@ -105,7 +105,7 @@ ProcessURL(nsAString& aUrl, bool* aSchemeValidOut, } void -SerializeNormalStream(nsIInputStream* aStream, PCacheReadStream& aReadStreamOut) +SerializeNormalStream(nsIInputStream* aStream, CacheReadStream& aReadStreamOut) { nsAutoTArray fds; SerializeInputStream(aStream, aReadStreamOut.params(), fds); @@ -181,10 +181,10 @@ TypeUtils::ToInternalRequest(const OwningRequestOrUSVString& aIn, } void -TypeUtils::ToPCacheRequest(PCacheRequest& aOut, InternalRequest* aIn, - BodyAction aBodyAction, - ReferrerAction aReferrerAction, - SchemeAction aSchemeAction, ErrorResult& aRv) +TypeUtils::ToCacheRequest(CacheRequest& aOut, InternalRequest* aIn, + BodyAction aBodyAction, + ReferrerAction aReferrerAction, + SchemeAction aSchemeAction, ErrorResult& aRv) { MOZ_ASSERT(aIn); @@ -244,8 +244,8 @@ TypeUtils::ToPCacheRequest(PCacheRequest& aOut, InternalRequest* aIn, } void -TypeUtils::ToPCacheResponseWithoutBody(PCacheResponse& aOut, - InternalResponse& aIn, ErrorResult& aRv) +TypeUtils::ToCacheResponseWithoutBody(CacheResponse& aOut, + InternalResponse& aIn, ErrorResult& aRv) { aOut.type() = aIn.Type(); @@ -272,7 +272,7 @@ TypeUtils::ToPCacheResponseWithoutBody(PCacheResponse& aOut, } void -TypeUtils::ToPCacheResponse(PCacheResponse& aOut, Response& aIn, ErrorResult& aRv) +TypeUtils::ToCacheResponse(CacheResponse& aOut, Response& aIn, ErrorResult& aRv) { if (aIn.BodyUsed()) { aRv.ThrowTypeError(MSG_FETCH_BODY_CONSUMED_ERROR); @@ -280,7 +280,7 @@ TypeUtils::ToPCacheResponse(PCacheResponse& aOut, Response& aIn, ErrorResult& aR } nsRefPtr ir = aIn.GetInternalResponse(); - ToPCacheResponseWithoutBody(aOut, *ir, aRv); + ToCacheResponseWithoutBody(aOut, *ir, aRv); nsCOMPtr stream; aIn.GetBody(getter_AddRefs(stream)); @@ -296,8 +296,8 @@ TypeUtils::ToPCacheResponse(PCacheResponse& aOut, Response& aIn, ErrorResult& aR // static void -TypeUtils::ToPCacheQueryParams(PCacheQueryParams& aOut, - const CacheQueryOptions& aIn) +TypeUtils::ToCacheQueryParams(CacheQueryParams& aOut, + const CacheQueryOptions& aIn) { aOut.ignoreSearch() = aIn.mIgnoreSearch; aOut.ignoreMethod() = aIn.mIgnoreMethod; @@ -311,7 +311,7 @@ TypeUtils::ToPCacheQueryParams(PCacheQueryParams& aOut, } already_AddRefed -TypeUtils::ToResponse(const PCacheResponse& aIn) +TypeUtils::ToResponse(const CacheResponse& aIn) { if (aIn.type() == ResponseType::Error) { nsRefPtr error = InternalResponse::NetworkError(); @@ -359,7 +359,7 @@ TypeUtils::ToResponse(const PCacheResponse& aIn) } already_AddRefed -TypeUtils::ToInternalRequest(const PCacheRequest& aIn) +TypeUtils::ToInternalRequest(const CacheRequest& aIn) { nsRefPtr internalRequest = new InternalRequest(); @@ -391,7 +391,7 @@ TypeUtils::ToInternalRequest(const PCacheRequest& aIn) } already_AddRefed -TypeUtils::ToRequest(const PCacheRequest& aIn) +TypeUtils::ToRequest(const CacheRequest& aIn) { nsRefPtr internalRequest = ToInternalRequest(aIn); nsRefPtr request = new Request(GetGlobalObject(), internalRequest); @@ -445,7 +445,7 @@ TypeUtils::ToInternalRequest(const nsAString& aIn, ErrorResult& aRv) void TypeUtils::SerializeCacheStream(nsIInputStream* aStream, - PCacheReadStreamOrVoid* aStreamOut, + CacheReadStreamOrVoid* aStreamOut, ErrorResult& aRv) { *aStreamOut = void_t(); @@ -460,7 +460,7 @@ TypeUtils::SerializeCacheStream(nsIInputStream* aStream, return; } - PCacheReadStream readStream; + CacheReadStream readStream; readStream.controlChild() = nullptr; readStream.controlParent() = nullptr; readStream.pushStreamChild() = nullptr; @@ -484,7 +484,7 @@ TypeUtils::SerializeCacheStream(nsIInputStream* aStream, void TypeUtils::SerializePushStream(nsIInputStream* aStream, - PCacheReadStream& aReadStreamOut, + CacheReadStream& aReadStreamOut, ErrorResult& aRv) { nsCOMPtr asyncStream = do_QueryInterface(aStream); diff --git a/dom/cache/TypeUtils.h b/dom/cache/TypeUtils.h index b78fcd8355db..069fa4cd3afa 100644 --- a/dom/cache/TypeUtils.h +++ b/dom/cache/TypeUtils.h @@ -29,11 +29,11 @@ class Response; namespace cache { class CachePushStreamChild; -class PCacheQueryParams; -class PCacheReadStream; -class PCacheReadStreamOrVoid; -class PCacheRequest; -class PCacheResponse; +class CacheQueryParams; +class CacheReadStream; +class CacheReadStreamOrVoid; +class CacheRequest; +class CacheResponse; class TypeUtils { @@ -77,28 +77,28 @@ public: ErrorResult& aRv); void - ToPCacheRequest(PCacheRequest& aOut, InternalRequest* aIn, - BodyAction aBodyAction, ReferrerAction aReferrerAction, - SchemeAction aSchemeAction, ErrorResult& aRv); + ToCacheRequest(CacheRequest& aOut, InternalRequest* aIn, + BodyAction aBodyAction, ReferrerAction aReferrerAction, + SchemeAction aSchemeAction, ErrorResult& aRv); void - ToPCacheResponseWithoutBody(PCacheResponse& aOut, InternalResponse& aIn, - ErrorResult& aRv); + ToCacheResponseWithoutBody(CacheResponse& aOut, InternalResponse& aIn, + ErrorResult& aRv); void - ToPCacheResponse(PCacheResponse& aOut, Response& aIn, ErrorResult& aRv); + ToCacheResponse(CacheResponse& aOut, Response& aIn, ErrorResult& aRv); void - ToPCacheQueryParams(PCacheQueryParams& aOut, const CacheQueryOptions& aIn); + ToCacheQueryParams(CacheQueryParams& aOut, const CacheQueryOptions& aIn); already_AddRefed - ToResponse(const PCacheResponse& aIn); + ToResponse(const CacheResponse& aIn); already_AddRefed - ToInternalRequest(const PCacheRequest& aIn); + ToInternalRequest(const CacheRequest& aIn); already_AddRefed - ToRequest(const PCacheRequest& aIn); + ToRequest(const CacheRequest& aIn); private: void @@ -109,11 +109,11 @@ private: ToInternalRequest(const nsAString& aIn, ErrorResult& aRv); void - SerializeCacheStream(nsIInputStream* aStream, PCacheReadStreamOrVoid* aStreamOut, + SerializeCacheStream(nsIInputStream* aStream, CacheReadStreamOrVoid* aStreamOut, ErrorResult& aRv); void - SerializePushStream(nsIInputStream* aStream, PCacheReadStream& aReadStreamOut, + SerializePushStream(nsIInputStream* aStream, CacheReadStream& aReadStreamOut, ErrorResult& aRv); }; diff --git a/dom/cache/moz.build b/dom/cache/moz.build index 6ed12a00a9a5..fbb8ee11a543 100644 --- a/dom/cache/moz.build +++ b/dom/cache/moz.build @@ -77,12 +77,12 @@ UNIFIED_SOURCES += [ ] IPDL_SOURCES += [ + 'CacheTypes.ipdlh', 'PCache.ipdl', 'PCacheOp.ipdl', 'PCachePushStream.ipdl', 'PCacheStorage.ipdl', 'PCacheStreamControl.ipdl', - 'PCacheTypes.ipdlh', ] include('/ipc/chromium/chromium-config.mozbuild')