Bug 1173029 - Remove mFinalURL from InternalResponse; r=baku a=KWierso
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 09 Jun 2015 15:23:13 -0400
changeset 270977 e2db79eec7fefbcddfc62794960941bc149770ff
parent 270976 90b8bf917db0f3e4d58155bb1f9a2386180a6de4
child 270978 c3dceefa3b20d053f51ba11e6e5d8ad28e2c0deb
push id2738
push userwcosta@mozilla.com
push dateWed, 10 Jun 2015 13:39:02 +0000
reviewersbaku, KWierso
bugs1173029
milestone41.0a1
Bug 1173029 - Remove mFinalURL from InternalResponse; r=baku a=KWierso
dom/fetch/InternalResponse.cpp
dom/fetch/InternalResponse.h
--- a/dom/fetch/InternalResponse.cpp
+++ b/dom/fetch/InternalResponse.cpp
@@ -9,17 +9,16 @@
 #include "mozilla/dom/InternalHeaders.h"
 #include "nsStreamUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 InternalResponse::InternalResponse(uint16_t aStatus, const nsACString& aStatusText)
   : mType(ResponseType::Default)
-  , mFinalURL(false)
   , mStatus(aStatus)
   , mStatusText(aStatusText)
   , mHeaders(new InternalHeaders(HeadersGuardEnum::Response))
 {
 }
 
 already_AddRefed<InternalResponse>
 InternalResponse::Clone()
--- a/dom/fetch/InternalResponse.h
+++ b/dom/fetch/InternalResponse.h
@@ -43,17 +43,16 @@ public:
   already_AddRefed<InternalResponse>
   OpaqueResponse()
   {
     MOZ_ASSERT(!mWrappedResponse, "Can't OpaqueResponse a already wrapped response");
     nsRefPtr<InternalResponse> response = new InternalResponse(0, EmptyCString());
     response->mType = ResponseType::Opaque;
     response->mTerminationReason = mTerminationReason;
     response->mURL = mURL;
-    response->mFinalURL = mFinalURL;
     response->mChannelInfo = mChannelInfo;
     response->mWrappedResponse = this;
     return response.forget();
   }
 
   already_AddRefed<InternalResponse>
   BasicResponse();
 
@@ -85,28 +84,16 @@ public:
   }
 
   void
   SetUrl(const nsACString& aURL)
   {
     mURL.Assign(aURL);
   }
 
-  bool
-  FinalURL() const
-  {
-    return mFinalURL;
-  }
-
-  void
-  SetFinalURL(bool aFinalURL)
-  {
-    mFinalURL = aFinalURL;
-  }
-
   uint16_t
   GetStatus() const
   {
     return mStatus;
   }
 
   const nsCString&
   GetStatusText() const
@@ -192,25 +179,23 @@ private:
   // InternalResponse, except headers, body and wrapped response (if any) which
   // are left uninitialized. Used for cloning and filtering.
   already_AddRefed<InternalResponse> CreateIncompleteCopy()
   {
     nsRefPtr<InternalResponse> copy = new InternalResponse(mStatus, mStatusText);
     copy->mType = mType;
     copy->mTerminationReason = mTerminationReason;
     copy->mURL = mURL;
-    copy->mFinalURL = mFinalURL;
     copy->mChannelInfo = mChannelInfo;
     return copy.forget();
   }
 
   ResponseType mType;
   nsCString mTerminationReason;
   nsCString mURL;
-  bool mFinalURL;
   const uint16_t mStatus;
   const nsCString mStatusText;
   nsRefPtr<InternalHeaders> mHeaders;
   nsCOMPtr<nsIInputStream> mBody;
   ChannelInfo mChannelInfo;
 
   // For filtered responses.
   // Cache, and SW interception should always serialize/access the underlying