Bug 1389529 - Remove @deprecated nsIDOMStorageManager.getLocalStorageForPrincipal. r?mayhemer draft
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sat, 12 Aug 2017 00:36:01 +0900
changeset 649148 130685cbea65c0fa2e81a9cf55053e1802f23000
parent 648573 a6a1f5c1d971dbee67ba6eec7ead7902351ddca2
child 649149 3e14fdca6207670d38a8952daefe07320aad4d4a
push id74967
push userVYV03354@nifty.ne.jp
push dateFri, 18 Aug 2017 18:09:33 +0000
reviewersmayhemer
bugs1389529
milestone57.0a1
Bug 1389529 - Remove @deprecated nsIDOMStorageManager.getLocalStorageForPrincipal. r?mayhemer MozReview-Commit-ID: 7xmsk1b2MQE
dom/interfaces/storage/nsIDOMStorageManager.idl
dom/storage/LocalStorageManager.cpp
dom/storage/SessionStorageManager.cpp
--- a/dom/interfaces/storage/nsIDOMStorageManager.idl
+++ b/dom/interfaces/storage/nsIDOMStorageManager.idl
@@ -87,26 +87,9 @@ interface nsIDOMStorageManager : nsISupp
    *
    * @result
    *    true when the storage object is bound with the principal and is managed
    *         by this storage manager.
    *    false otherwise
    */
   bool checkStorage(in nsIPrincipal aPrincipal,
                     in nsIDOMStorage aStorage);
-
-  /**
-   * @deprecated
-   *
-   * Returns instance of localStorage object for aURI's origin.
-   * This method ensures there is always only a single instance
-   * for a single origin.
-   *
-   * Currently just forwards to the createStorage method of this
-   * interface.
-   *
-   * Extension developers are strongly encouraged to use getStorage
-   * or createStorage method instead.
-   */
-  nsIDOMStorage getLocalStorageForPrincipal(in nsIPrincipal aPrincipal,
-                                            in DOMString aDocumentURI,
-                                            [optional] in bool aPrivate);
 };
--- a/dom/storage/LocalStorageManager.cpp
+++ b/dom/storage/LocalStorageManager.cpp
@@ -331,27 +331,16 @@ LocalStorageManager::CheckStorage(nsIPri
   if (!storage->PrincipalEquals(aPrincipal)) {
     return NS_OK;
   }
 
   *aRetval = true;
   return NS_OK;
 }
 
-// Obsolete nsIDOMStorageManager methods
-
-NS_IMETHODIMP
-LocalStorageManager::GetLocalStorageForPrincipal(nsIPrincipal* aPrincipal,
-                                                 const nsAString& aDocumentURI,
-                                                 bool aPrivate,
-                                                 nsIDOMStorage** aRetval)
-{
-  return CreateStorage(nullptr, aPrincipal, aDocumentURI, aPrivate, aRetval);
-}
-
 void
 LocalStorageManager::ClearCaches(uint32_t aUnloadFlags,
                                  const OriginAttributesPattern& aPattern,
                                  const nsACString& aOriginScope)
 {
   for (auto iter1 = mCaches.Iter(); !iter1.Done(); iter1.Next()) {
     OriginAttributes oa;
     DebugOnly<bool> rv = oa.PopulateFromSuffix(iter1.Key());
--- a/dom/storage/SessionStorageManager.cpp
+++ b/dom/storage/SessionStorageManager.cpp
@@ -197,25 +197,16 @@ SessionStorageManager::CheckStorage(nsIP
   if (!StorageUtils::PrincipalsEqual(storage->Principal(), aPrincipal)) {
     return NS_OK;
   }
 
   *aRetval = true;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-SessionStorageManager::GetLocalStorageForPrincipal(nsIPrincipal* aPrincipal,
-                                                   const nsAString& aDocumentURI,
-                                                   bool aPrivate,
-                                                   nsIDOMStorage** aRetval)
-{
-  return NS_ERROR_UNEXPECTED;
-}
-
 void
 SessionStorageManager::ClearStorages(ClearStorageType aType,
                                      const OriginAttributesPattern& aPattern,
                                      const nsACString& aOriginScope)
 {
   for (auto iter1 = mOATable.Iter(); !iter1.Done(); iter1.Next()) {
     OriginAttributes oa;
     DebugOnly<bool> ok = oa.PopulateFromSuffix(iter1.Key());