diff --git a/mozilla/content/base/src/nsContentSink.cpp b/mozilla/content/base/src/nsContentSink.cpp index 5f48bf40e13..b154aaf9580 100644 --- a/mozilla/content/base/src/nsContentSink.cpp +++ b/mozilla/content/base/src/nsContentSink.cpp @@ -62,6 +62,7 @@ #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" #include "nsIScriptGlobalObject.h" +#include "nsNetCID.h" #include "nsICookieService.h" #include "nsIPrompt.h" #include "nsIServiceManagerUtils.h" diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index aee838e6fac..68132ebb457 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -89,6 +89,7 @@ #include "nsIScriptSecurityManager.h" #include "nsIScrollableView.h" +#include "nsNetCID.h" #include "nsIIOService.h" #include "nsICookieService.h" diff --git a/mozilla/extensions/cookie/nsCookiePermission.cpp b/mozilla/extensions/cookie/nsCookiePermission.cpp index f516e9fe5e6..4d6fd8e0468 100644 --- a/mozilla/extensions/cookie/nsCookiePermission.cpp +++ b/mozilla/extensions/cookie/nsCookiePermission.cpp @@ -42,7 +42,7 @@ #include "nsIServiceManager.h" #include "nsICookiePromptService.h" #include "nsICookieManager2.h" -#include "nsCCookieManager.h" +#include "nsNetCID.h" #include "nsIURI.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/mozilla/extensions/cookie/tests/TestCookie.cpp b/mozilla/extensions/cookie/tests/TestCookie.cpp index 38319cf89e8..ae8328e9eb2 100644 --- a/mozilla/extensions/cookie/tests/TestCookie.cpp +++ b/mozilla/extensions/cookie/tests/TestCookie.cpp @@ -41,6 +41,7 @@ #include #include "plstr.h" #include "nsNetUtil.h" +#include "nsNetCID.h" #include "nsXPIDLString.h" #include "nsIPrefBranch.h" #include "nsIPrefService.h" diff --git a/mozilla/extensions/tridentprofile/src/nsTridentPreferencesWin.cpp b/mozilla/extensions/tridentprofile/src/nsTridentPreferencesWin.cpp index 57c209ef845..f4a968132f7 100644 --- a/mozilla/extensions/tridentprofile/src/nsTridentPreferencesWin.cpp +++ b/mozilla/extensions/tridentprofile/src/nsTridentPreferencesWin.cpp @@ -40,7 +40,7 @@ #include #include "nsAppDirectoryServiceDefs.h" #include "nsCOMPtr.h" -#include "nsCCookieManager.h" +#include "nsNetCID.h" #include "nsDebug.h" #include "nsDependentString.h" #include "nsDirectoryServiceDefs.h" @@ -51,7 +51,6 @@ #include "prmem.h" #include "prlong.h" #include "nsICookieManager2.h" -#include "nsICookieService.h" #include "nsIFile.h" #include "nsILocalFile.h" #include "nsIPrefService.h" @@ -450,8 +449,7 @@ nsTridentPreferencesWin::CopyCookies() { nsCOMPtr cookieFiles; nsCOMPtr cookieManager(do_GetService(NS_COOKIEMANAGER_CONTRACTID)); - nsCOMPtr cookieService(do_GetService(NS_COOKIESERVICE_CONTRACTID)); - if (!cookieManager || !cookieService) + if (!cookieManager) return NS_ERROR_FAILURE; // find the cookies directory diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index d31acd56967..ede6e064728 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -107,6 +107,7 @@ #include "nsIPrincipal.h" #include "nsIServiceManager.h" +#include "nsNetCID.h" #include "nsICookieService.h" #include "nsIDOMPlugin.h" #include "nsIDOMMimeType.h" diff --git a/mozilla/netwerk/build/nsNetCID.h b/mozilla/netwerk/build/nsNetCID.h index 7a2212494a9..1e3bdedf3ad 100644 --- a/mozilla/netwerk/build/nsNetCID.h +++ b/mozilla/netwerk/build/nsNetCID.h @@ -658,4 +658,34 @@ { 0xa2, 0x8a, 0x5b, 0xa2, 0x44, 0x7f, 0xba, 0xce } \ } +/****************************************************************************** + * netwerk/cookie classes + */ + +// service implementing nsICookieManager and nsICookieManager2. +#define NS_COOKIEMANAGER_CLASSNAME \ + "CookieManager" +#define NS_COOKIEMANAGER_CONTRACTID \ + "@mozilla.org/cookiemanager;1" +#define NS_COOKIEMANAGER_CID \ +{ /* aaab6710-0f2c-11d5-a53b-0010a401eb10 */ \ + 0xaaab6710, \ + 0x0f2c, \ + 0x11d5, \ + { 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 } \ +} + +// service implementing nsICookieService. +#define NS_COOKIESERVICE_CLASSNAME \ + "CookieService" +#define NS_COOKIESERVICE_CONTRACTID \ + "@mozilla.org/cookieService;1" +#define NS_COOKIESERVICE_CID \ +{ /* c375fa80-150f-11d6-a618-0010a401eb10 */ \ + 0xc375fa80, \ + 0x150f, \ + 0x11d6, \ + { 0xa6, 0x18, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 } \ +} + #endif // nsNetCID_h__ diff --git a/mozilla/netwerk/build/nsNetModule.cpp b/mozilla/netwerk/build/nsNetModule.cpp index cbddd389061..10f790eaf0c 100644 --- a/mozilla/netwerk/build/nsNetModule.cpp +++ b/mozilla/netwerk/build/nsNetModule.cpp @@ -141,7 +141,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee) /////////////////////////////////////////////////////////////////////////////// #include "nsCookieService.h" -#include "nsCCookieManager.h" NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCookieService, nsCookieService::GetSingleton) /////////////////////////////////////////////////////////////////////////////// @@ -1005,13 +1004,13 @@ static const nsModuleComponentInfo gNetModuleInfo[] = { nsCacheService::Create }, - { "CookieManager", + { NS_COOKIEMANAGER_CLASSNAME, NS_COOKIEMANAGER_CID, NS_COOKIEMANAGER_CONTRACTID, nsCookieServiceConstructor }, - { "CookieService", + { NS_COOKIESERVICE_CLASSNAME, NS_COOKIESERVICE_CID, NS_COOKIESERVICE_CONTRACTID, nsCookieServiceConstructor diff --git a/mozilla/netwerk/cookie/public/nsCCookieManager.h b/mozilla/netwerk/cookie/public/nsCCookieManager.h index d69227330cb..e69de29bb2d 100644 --- a/mozilla/netwerk/cookie/public/nsCCookieManager.h +++ b/mozilla/netwerk/cookie/public/nsCCookieManager.h @@ -1,49 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ----- BEGIN LICENSE BLOCK ----- - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape Communications Corporation. - * Portions created by Netscape Communications Corporation are - * Copyright (C) 2002 Netscape Communications Corporation. - * All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the LGPL or the GPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ----- END LICENSE BLOCK ----- */ - -/* - * This is a "service" and not just an ordinary component. A consumer must talk - * to the service manager, not the component manager. - */ - -#ifndef NSCCOOKIEMANAGER_H -#define NSCCOOKIEMANAGER_H - -#include "nsICookieManager.h" -#define NS_COOKIEMANAGER_CONTRACTID "@mozilla.org/cookiemanager;1" - -#endif diff --git a/mozilla/netwerk/cookie/public/nsICookieService.idl b/mozilla/netwerk/cookie/public/nsICookieService.idl index 553c7b1c459..4fbde5d0780 100644 --- a/mozilla/netwerk/cookie/public/nsICookieService.idl +++ b/mozilla/netwerk/cookie/public/nsICookieService.idl @@ -167,16 +167,3 @@ interface nsICookieService : nsISupports */ readonly attribute boolean cookieIconIsVisible; }; - -%{ C++ -// nsCookieService CID and ContractID: -#define NS_COOKIESERVICE_CID \ -{ /* 011C3190-1434-11d6-A618-0010A401EB10 */ \ - 0xc375fa80, \ - 0x150f, \ - 0x11d6, \ - {0xa6, 0x18, 0x0, 0x10, 0xa4, 0x1, 0xeb, 0x10} \ -} -#define NS_COOKIESERVICE_CONTRACTID \ - "@mozilla.org/cookieService;1" -%} diff --git a/mozilla/netwerk/cookie/src/nsCookieService.h b/mozilla/netwerk/cookie/src/nsCookieService.h index c7c671af126..5097bc35743 100644 --- a/mozilla/netwerk/cookie/src/nsCookieService.h +++ b/mozilla/netwerk/cookie/src/nsCookieService.h @@ -246,6 +246,4 @@ class nsCookieService : public nsICookieService friend PLDHashOperator PR_CALLBACK removeExpiredCallback(nsCookieEntry *aEntry, void *aArg); }; -#define NS_COOKIEMANAGER_CID {0xaaab6710,0xf2c,0x11d5,{0xa5,0x3b,0x0,0x10,0xa4,0x1,0xeb,0x10}} - #endif // nsCookieService_h__ diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.cpp b/mozilla/webshell/tests/viewer/nsViewerApp.cpp index b8871efcf13..fa4376f6d4d 100644 --- a/mozilla/webshell/tests/viewer/nsViewerApp.cpp +++ b/mozilla/webshell/tests/viewer/nsViewerApp.cpp @@ -98,6 +98,7 @@ #endif // cookie +#include "nsNetCID.h" #include "nsICookieService.h" #define DIALOG_FONT "Helvetica"