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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsIconChannel_h___
8 #define nsIconChannel_h___
10 #include "mozilla/Attributes.h"
12 #include "nsCOMPtr.h"
13 #include "nsXPIDLString.h"
14 #include "nsIChannel.h"
15 #include "nsILoadGroup.h"
16 #include "nsIInterfaceRequestor.h"
17 #include "nsIInterfaceRequestorUtils.h"
18 #include "nsIInputStreamPump.h"
19 #include "nsIStreamListener.h"
20 #include "nsIURI.h"
22 class nsIFile;
24 class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
25 {
26 public:
27 NS_DECL_THREADSAFE_ISUPPORTS
28 NS_DECL_NSIREQUEST
29 NS_DECL_NSICHANNEL
30 NS_DECL_NSIREQUESTOBSERVER
31 NS_DECL_NSISTREAMLISTENER
33 nsIconChannel();
34 virtual ~nsIconChannel();
36 nsresult Init(nsIURI* uri);
38 protected:
39 nsCOMPtr<nsIURI> mUrl;
40 nsCOMPtr<nsIURI> mOriginalURI;
41 int64_t mContentLength;
42 nsCOMPtr<nsILoadGroup> mLoadGroup;
43 nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
44 nsCOMPtr<nsISupports> mOwner;
46 nsCOMPtr<nsIInputStreamPump> mPump;
47 nsCOMPtr<nsIStreamListener> mListener;
49 nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking);
51 nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize,
52 nsACString &aContentType, nsACString &aFileExtension);
53 };
55 #endif /* nsIconChannel_h___ */