Bug 1413394 - Port relevant parts of |
Bug 1407720 - Merge nsICookieManager and nsICookieManager2| to suite r=IanN
--- a/suite/common/tests/browser/browser_423132.js
+++ b/suite/common/tests/browser/browser_423132.js
@@ -16,17 +16,17 @@ function browserWindowsCount() {
function test() {
// test that cookies are stored and restored correctly by sessionstore,
// bug 423132, ported by bug 524371.
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
waitForExplicitFinish();
- let cs = Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2);
+ let cs = Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager);
cs.removeAll();
// make sure that sessionstore.js can be forced to be created by setting
// the interval pref to 0
Services.prefs.setIntPref("browser.sessionstore.interval", 0);
const testURL = "http://mochi.test:8888/browser/" +
"suite/common/tests/browser/browser_423132_sample.html";
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsAppDirectoryServiceDefs.h"
#include "nsSuiteProfileMigratorUtils.h"
#include "nsCRT.h"
-#include "nsICookieManager2.h"
+#include "nsICookieManager.h"
#include "nsIFile.h"
#include "nsILineInputStream.h"
#include "nsIOutputStream.h"
#include "nsIPrefBranch.h"
#include "nsIPrefLocalizedString.h"
#include "nsIPrefService.h"
#include "nsIServiceManager.h"
#include "nsISupportsPrimitives.h"
@@ -654,17 +654,17 @@ nsNetscapeProfileMigratorBase::CopyCooki
mTargetProfile->Clone(getter_AddRefs(targetFile));
targetFile->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_COOKIES_SQLITE));
targetFile->Remove(false);
return CopyFile(FILE_NAME_COOKIES, FILE_NAME_COOKIES);
}
nsresult rv;
- nsCOMPtr<nsICookieManager2> cookieManager(do_GetService(NS_COOKIEMANAGER_CONTRACTID, &rv));
+ nsCOMPtr<nsICookieManager> cookieManager(do_GetService(NS_COOKIEMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIFile> seamonkeyCookiesFile;
mSourceProfile->Clone(getter_AddRefs(seamonkeyCookiesFile));
seamonkeyCookiesFile->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_COOKIES));
return cookieManager->ImportCookies(seamonkeyCookiesFile);