Bug 1057764: Remove references to appRepUrl completely (r=gcp)
authorMonica Chew <mmc@mozilla.com>
Sun, 24 Aug 2014 08:50:28 -0700
changeset 201254 8be3a7df7779e6e5d138e306bbdbc4555e152618
parent 201253 3746808d32b1ebd9d888cfbb276e62ad14c403e0
child 201255 98623c0c5ba2c1f6b1b4d1f0fbad6dd6b6b7baa3
push id48132
push usermchew@mozilla.com
push dateSun, 24 Aug 2014 15:50:37 +0000
treeherdermozilla-inbound@8be3a7df7779 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1057764
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057764: Remove references to appRepUrl completely (r=gcp)
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