Bug 1547114 - Part 3: Remove nsCookiePermission::mThirdPartyUtil; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 26 Apr 2019 15:49:21 +0000
changeset 530347 14ad847bd4778993dbf02286687521a56f167624
parent 530346 405b90db2106c0bb6d211d8c364b3b08c2ede455
child 530348 c8d4031fcf8004d5db6abfaaf82432dea38f233e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1547114
milestone68.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 1547114 - Part 3: Remove nsCookiePermission::mThirdPartyUtil; r=baku Differential Revision: https://phabricator.services.mozilla.com/D28916
extensions/cookie/nsCookiePermission.cpp
extensions/cookie/nsCookiePermission.h
--- a/extensions/cookie/nsCookiePermission.cpp
+++ b/extensions/cookie/nsCookiePermission.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 sw=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsCookiePermission.h"
 
-#include "mozIThirdPartyUtil.h"
 #include "nsICookie2.h"
 #include "nsIServiceManager.h"
 #include "nsICookieManager.h"
 #include "nsICookieService.h"
 #include "nsNetUtil.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIProtocolHandler.h"
 #include "nsIURI.h"
@@ -55,18 +54,16 @@ void nsCookiePermission::Shutdown() { gS
 
 bool nsCookiePermission::Init() {
   // Initialize nsIPermissionManager and fetch relevant prefs. This is only
   // required for some methods on nsICookiePermission, so it should be done
   // lazily.
   nsresult rv;
   mPermMgr = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return false;
-  mThirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return false;
 
   return true;
 }
 
 NS_IMETHODIMP
 nsCookiePermission::SetAccess(nsIURI *aURI, nsCookieAccess aAccess) {
   // Lazily initialize ourselves
   if (!EnsureInitialized()) return NS_ERROR_UNEXPECTED;
--- a/extensions/cookie/nsCookiePermission.h
+++ b/extensions/cookie/nsCookiePermission.h
@@ -3,34 +3,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsCookiePermission_h__
 #define nsCookiePermission_h__
 
 #include "nsICookiePermission.h"
 #include "nsIPermissionManager.h"
 #include "nsCOMPtr.h"
-#include "mozIThirdPartyUtil.h"
-
 
 class nsCookiePermission final : public nsICookiePermission {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOOKIEPERMISSION
 
   // Singleton accessor
   static already_AddRefed<nsICookiePermission> GetOrCreate();
   static void Shutdown();
 
   bool Init();
 
  private:
   ~nsCookiePermission() = default;
 
-  bool EnsureInitialized() {
-    return (mPermMgr != nullptr && mThirdPartyUtil != nullptr) || Init();
-  };
+  bool EnsureInitialized() { return (mPermMgr != nullptr) || Init(); };
 
   nsCOMPtr<nsIPermissionManager> mPermMgr;
-  nsCOMPtr<mozIThirdPartyUtil> mThirdPartyUtil;
 };
 
 #endif