Bug 1139818 - Merge imgRequest public and private sections. r=baku
authorSeth Fowler <seth@mozilla.com>
Mon, 23 Mar 2015 19:37:46 -0700
changeset 264080 29219668983e3112203d32d913bd4ece318bf187
parent 264079 165b9f6bb984c873811c181a553876e4c6336f6e
child 264081 f687743cc499b25eeca008639abc506640de3eaf
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1139818
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1139818 - Merge imgRequest public and private sections. r=baku
image/src/imgRequest.h
--- a/image/src/imgRequest.h
+++ b/image/src/imgRequest.h
@@ -43,27 +43,31 @@ class ProgressTracker;
 struct NewPartResult;
 
 class imgRequest final : public nsIStreamListener,
                              public nsIThreadRetargetableStreamListener,
                              public nsIChannelEventSink,
                              public nsIInterfaceRequestor,
                              public nsIAsyncVerifyRedirectCallback
 {
-  virtual ~imgRequest();
-
-public:
   typedef mozilla::image::Image Image;
   typedef mozilla::image::ImageURL ImageURL;
   typedef mozilla::image::ProgressTracker ProgressTracker;
   typedef mozilla::net::ReferrerPolicy ReferrerPolicy;
 
+public:
   explicit imgRequest(imgLoader* aLoader);
 
   NS_DECL_THREADSAFE_ISUPPORTS
+  NS_DECL_NSISTREAMLISTENER
+  NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
+  NS_DECL_NSIREQUESTOBSERVER
+  NS_DECL_NSICHANNELEVENTSINK
+  NS_DECL_NSIINTERFACEREQUESTOR
+  NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
 
   nsresult Init(nsIURI *aURI,
                 nsIURI *aCurrentURI,
                 nsIRequest *aRequest,
                 nsIChannel *aChannel,
                 imgCacheEntry *aCacheEntry,
                 nsISupports* aCX,
                 nsIPrincipal* aLoadingPrincipal,
@@ -181,46 +185,39 @@ public:
   /// Set whether this request is stored in the cache. If it isn't, regardless
   /// of whether this request has a non-null mCacheEntry, this imgRequest won't
   /// try to update or modify the image cache.
   void SetIsInCache(bool aCacheable);
 
   void EvictFromCache();
   void RemoveFromCache();
 
+  // Sets properties for this image; will dispatch to main thread if needed.
+  void SetProperties(const nsACString& aContentType,
+                     const nsACString& aContentDisposition);
+
   nsIProperties* Properties() const { return mProperties; }
 
   bool HasConsumers() const;
 
 private:
+  friend class FinishPreparingForNewPartRunnable;
+
+  virtual ~imgRequest();
+
+  void FinishPreparingForNewPart(const NewPartResult& aResult);
+
   void Cancel(nsresult aStatus);
 
   // Update the cache entry size based on the image container.
   void UpdateCacheEntrySize();
 
   /// Returns true if RequestDecode() was called.
   bool IsDecodeRequested() const;
 
-public:
-  NS_DECL_NSISTREAMLISTENER
-  NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
-  NS_DECL_NSIREQUESTOBSERVER
-  NS_DECL_NSICHANNELEVENTSINK
-  NS_DECL_NSIINTERFACEREQUESTOR
-  NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
-
-  // Sets properties for this image; will dispatch to main thread if needed.
-  void SetProperties(const nsACString& aContentType,
-                     const nsACString& aContentDisposition);
-
-private:
-  friend class FinishPreparingForNewPartRunnable;
-
-  void FinishPreparingForNewPart(const NewPartResult& aResult);
-
   // Weak reference to parent loader; this request cannot outlive its owner.
   imgLoader* mLoader;
   nsCOMPtr<nsIRequest> mRequest;
   // The original URI we were loaded with. This is the same as the URI we are
   // keyed on in the cache. We store a string here to avoid off main thread
   // refcounting issues with nsStandardURL.
   nsRefPtr<ImageURL> mURI;
   // The URI of the resource we ended up loading after all redirects, etc.