Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_net_WyciwygChannelParent_h
6 #define mozilla_net_WyciwygChannelParent_h
8 #include "mozilla/net/PWyciwygChannelParent.h"
9 #include "mozilla/net/NeckoCommon.h"
10 #include "nsIStreamListener.h"
12 #include "nsIWyciwygChannel.h"
13 #include "nsIInterfaceRequestor.h"
14 #include "nsILoadContext.h"
16 namespace mozilla {
17 namespace dom {
18 class PBrowserParent;
19 }
21 namespace net {
23 class WyciwygChannelParent : public PWyciwygChannelParent
24 , public nsIStreamListener
25 , public nsIInterfaceRequestor
26 {
27 public:
28 NS_DECL_ISUPPORTS
29 NS_DECL_NSIREQUESTOBSERVER
30 NS_DECL_NSISTREAMLISTENER
31 NS_DECL_NSIINTERFACEREQUESTOR
33 WyciwygChannelParent();
34 virtual ~WyciwygChannelParent();
36 protected:
37 virtual bool RecvInit(const URIParams& uri) MOZ_OVERRIDE;
38 virtual bool RecvAsyncOpen(const URIParams& original,
39 const uint32_t& loadFlags,
40 const IPC::SerializedLoadContext& loadContext,
41 PBrowserParent* parent) MOZ_OVERRIDE;
42 virtual bool RecvWriteToCacheEntry(const nsString& data) MOZ_OVERRIDE;
43 virtual bool RecvCloseCacheEntry(const nsresult& reason) MOZ_OVERRIDE;
44 virtual bool RecvSetCharsetAndSource(const int32_t& source,
45 const nsCString& charset) MOZ_OVERRIDE;
46 virtual bool RecvSetSecurityInfo(const nsCString& securityInfo) MOZ_OVERRIDE;
47 virtual bool RecvCancel(const nsresult& statusCode) MOZ_OVERRIDE;
48 virtual bool RecvAppData(const IPC::SerializedLoadContext& loadContext,
49 PBrowserParent* parent) MOZ_OVERRIDE;
51 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
53 bool SetupAppData(const IPC::SerializedLoadContext& loadContext,
54 PBrowserParent* aParent);
56 nsCOMPtr<nsIWyciwygChannel> mChannel;
57 bool mIPCClosed;
58 bool mReceivedAppData;
59 nsCOMPtr<nsILoadContext> mLoadContext;
60 };
62 } // namespace net
63 } // namespace mozilla
65 #endif // mozilla_net_WyciwygChannelParent_h