Bug 1057764: Remove references to appRepUrl completely (r=gcp,a=lmandel)
authorMonica Chew <mmc@mozilla.com>
Sat, 23 Aug 2014 15:04:58 -0700
changeset 217641 e1df4eee7044182d571bdd002376b0d3092fe44e
parent 217640 52f54e8b54148641484c5372e70fd1327d4745f0
child 217642 c3278a50ce13bf7afae5b197b3279c7bc837c00e
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp, lmandel
bugs1057764
milestone33.0a2
Bug 1057764: Remove references to appRepUrl completely (r=gcp,a=lmandel)
toolkit/components/downloads/ApplicationReputation.cpp
toolkit/components/downloads/test/unit/xpcshell.ini
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -416,41 +416,18 @@ PendingLookup::LookupNext()
   index = mAllowlistSpecs.Length() - 1;
   if (index >= 0) {
     spec = mAllowlistSpecs[index];
     LOG(("PendingLookup::LookupNext: checking %s on allowlist", spec.get()));
     mAllowlistSpecs.RemoveElementAt(index);
     nsRefPtr<PendingDBLookup> lookup(new PendingDBLookup(this));
     return lookup->LookupSpec(spec, true);
   }
-#ifdef XP_WIN
-  // If there is no service URL for querying application reputation, abort.
-  nsCString serviceUrl;
-  NS_ENSURE_SUCCESS(Preferences::GetCString(PREF_SB_APP_REP_URL, &serviceUrl),
-                    NS_ERROR_NOT_AVAILABLE);
-  if (serviceUrl.EqualsLiteral("")) {
-    return OnComplete(false, NS_ERROR_NOT_AVAILABLE);
-  }
-
-  // There are no more URIs to check against local list. If the file is not
-  // eligible for remote lookup, bail.
-  if (!IsBinaryFile()) {
-    LOG(("Not eligible for remote lookups [this=%x]", this));
-    return OnComplete(false, NS_OK);
-  }
-  // Send the remote query if we are on Windows.
-  nsresult rv = SendRemoteQuery();
-  if (NS_FAILED(rv)) {
-    return OnComplete(false, rv);
-  }
-  return NS_OK;
-#else
   LOG(("PendingLookup: Nothing left to check [this=%p]", this));
   return OnComplete(false, NS_OK);
-#endif
 }
 
 nsCString
 PendingLookup::EscapeCertificateAttribute(const nsACString& aAttribute)
 {
   // Escape '/' because it's a field separator, and '%' because Chrome does
   nsCString escaped;
   escaped.SetCapacity(aAttribute.Length());
--- a/toolkit/components/downloads/test/unit/xpcshell.ini
+++ b/toolkit/components/downloads/test/unit/xpcshell.ini
@@ -5,18 +5,19 @@ firefox-appdir = browser
 support-files =
   downloads_manifest.js
   test_downloads.manifest
   data/digest.chunk
   data/block_digest.chunk
   data/signed_win.exe
 
 [test_app_rep.js]
-[test_app_rep_windows.js]
-run-if = os == "win"
+# Bug 1057764: disable remote lookups completely
+# [test_app_rep_windows.js]
+# run-if = os == "win"
 [test_bug_382825.js]
 [test_bug_384744.js]
 [test_bug_395092.js]
 [test_bug_401430.js]
 [test_bug_406857.js]
 [test_bug_420230.js]
 [test_cancel_download_files_removed.js]
 # Bug 676989: test hangs consistently on Android