Bug 1547114 - Part 8: Move nsCookiePermission to netwerk/cookie; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 26 Apr 2019 22:31:57 +0000
changeset 530425 52b13dded51f032b89df622d31afa5e63bf24552
parent 530424 6702864a9169e475bbdb8d037dc5d35981182a0b
child 530426 749bc2ac924298a5649697f2c759e8e6bc7e9e93
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 8: Move nsCookiePermission to netwerk/cookie; r=baku Differential Revision: https://phabricator.services.mozilla.com/D29078
extensions/cookie/moz.build
extensions/cookie/nsCookiePermission.cpp
extensions/cookie/nsCookiePermission.h
extensions/cookie/nsPermission.cpp
extensions/cookie/nsPermission.h
netwerk/cookie/moz.build
netwerk/cookie/nsCookiePermission.cpp
netwerk/cookie/nsCookiePermission.h
--- a/extensions/cookie/moz.build
+++ b/extensions/cookie/moz.build
@@ -1,22 +1,17 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 TEST_DIRS += ['test']
 
-EXPORTS += [
-    'nsCookiePermission.h',
-]
-
 UNIFIED_SOURCES += [
-    'nsCookiePermission.cpp',
     'nsPermission.cpp',
     'nsPermissionManager.cpp',
 ]
 
 XPCOM_MANIFESTS += [
     'components.conf',
 ]
 
--- a/extensions/cookie/nsPermission.cpp
+++ b/extensions/cookie/nsPermission.cpp
@@ -2,16 +2,18 @@
 /* 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 "nsPermission.h"
 #include "nsContentUtils.h"
 #include "nsIClassInfoImpl.h"
 #include "nsIEffectiveTLDService.h"
+#include "nsNetCID.h"
+#include "nsNetUtil.h"
 #include "mozilla/BasePrincipal.h"
 
 // nsPermission Implementation
 
 NS_IMPL_CLASSINFO(nsPermission, nullptr, 0, {0})
 NS_IMPL_ISUPPORTS_CI(nsPermission, nsIPermission)
 
 nsPermission::nsPermission(nsIPrincipal* aPrincipal, const nsACString& aType,
--- a/extensions/cookie/nsPermission.h
+++ b/extensions/cookie/nsPermission.h
@@ -2,16 +2,17 @@
 /* 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/. */
 
 #ifndef nsPermission_h__
 #define nsPermission_h__
 
 #include "nsIPermission.h"
+#include "nsCOMPtr.h"
 #include "nsString.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsPermission : public nsIPermission {
  public:
   // nsISupports
   NS_DECL_ISUPPORTS
--- a/netwerk/cookie/moz.build
+++ b/netwerk/cookie/moz.build
@@ -15,27 +15,32 @@ XPIDL_SOURCES += [
     'nsICookiePermission.idl',
     'nsICookieService.idl',
     'nsICookieSettings.idl',
 ]
 
 XPIDL_MODULE = 'necko_cookie'
 
 if CONFIG['NECKO_COOKIES']:
+    EXPORTS += [
+        'nsCookiePermission.h',
+    ]
+
     EXPORTS.mozilla.net = [
         'CookieServiceChild.h',
         'CookieServiceParent.h',
         'CookieSettings.h',
         'nsCookieKey.h',
     ]
     UNIFIED_SOURCES += [
         'CookieServiceChild.cpp',
         'CookieServiceParent.cpp',
         'CookieSettings.cpp',
         'nsCookie.cpp',
+        'nsCookiePermission.cpp',
     ]
     # nsCookieService.cpp can't be unified because of symbol conflicts
     SOURCES += [
         'nsCookieService.cpp',
     ]
     LOCAL_INCLUDES += [
         '/dom/base',
         '/extensions/cookie',
rename from extensions/cookie/nsCookiePermission.cpp
rename to netwerk/cookie/nsCookiePermission.cpp
rename from extensions/cookie/nsCookiePermission.h
rename to netwerk/cookie/nsCookiePermission.h