Bug 785632 - Remove the permission manager workaround for Gaia. r=jlebar
authorMounir Lamouri <mounir.lamouri@gmail.com>
Tue, 25 Sep 2012 23:50:17 +0100
changeset 110531 a7be3bc10c5844bbd76c8fb8ba5d5c63129fe704
parent 110530 ef672af86f8f59558b1a5c8d82a067b28f2146ef
child 110532 67b12a268fbe9eef6187da47b7d8a6097ff9b8d5
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjlebar
bugs785632
milestone19.0a1
Bug 785632 - Remove the permission manager workaround for Gaia. r=jlebar
extensions/cookie/nsPermissionManager.cpp
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -1017,25 +1017,16 @@ nsPermissionManager::GetPermissionHashKe
   uint32_t offset = 0;
   PermissionHashKey* entry;
   int64_t now = PR_Now() / 1000;
 
   do {
     nsRefPtr<PermissionKey> key = new PermissionKey(Substring(aHost, offset), aAppId, aIsInBrowserElement);
     entry = mPermissionTable.GetEntry(key);
 
-    if (!entry) {
-      // This is a temporary fix to have Gaia working and allow a time frame to
-      // update profiles. With this hack, if a permission isn't found for an app
-      // the check will be done for the same host outside of any app.
-      // TODO: remove this with bug 785632.
-      key = new PermissionKey(Substring(aHost, offset), nsIScriptSecurityManager::NO_APP_ID, false);
-      entry = mPermissionTable.GetEntry(key);
-    }
-
     if (entry) {
       PermissionEntry permEntry = entry->GetPermission(aType);
 
       // if the entry is expired, remove and keep looking for others.
       if (permEntry.mExpireType == nsIPermissionManager::EXPIRE_TIME &&
           permEntry.mExpireTime <= now) {
         nsCOMPtr<nsIPrincipal> principal;
         if (NS_FAILED(GetPrincipal(aHost, aAppId, aIsInBrowserElement, getter_AddRefs(principal)))) {