From 030b45ecfa3f8d53cb6f28ac56df64fd7041824f Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Wed, 6 Jul 2011 11:08:52 -0700 Subject: [PATCH] Backed out changeset 549e3276ed25 --- .../url-classifier/nsUrlClassifierDBService.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index a35f6f8e699..8d1d7bb362b 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -77,7 +77,6 @@ #include "prprf.h" #include "prnetdb.h" #include "zlib.h" -#include "mozilla/Preferences.h" // Needed to interpert mozIStorageConnection::GetLastError #include @@ -1799,6 +1798,7 @@ nsUrlClassifierDBServiceWorker::GetTables(nsIUrlClassifierCallback* c) nsresult rv = OpenDb(); if (NS_FAILED(rv)) { + NS_ERROR("Unable to open database"); return NS_ERROR_FAILURE; } @@ -2913,6 +2913,7 @@ nsUrlClassifierDBServiceWorker::BeginUpdate(nsIUrlClassifierUpdateObserver *obse nsresult rv = OpenDb(); if (NS_FAILED(rv)) { + NS_ERROR("Unable to open database"); return NS_ERROR_FAILURE; } @@ -3060,6 +3061,7 @@ nsUrlClassifierDBServiceWorker::UpdateStream(const nsACString& chunk) LOG(("Update from Stream.")); nsresult rv = OpenDb(); if (NS_FAILED(rv)) { + NS_ERROR("Unable to open database"); return NS_ERROR_FAILURE; } @@ -3365,15 +3367,6 @@ nsUrlClassifierDBServiceWorker::OpenDb() if (mConnection) return NS_OK; - // If we're turned off, refuse to open the DB - PRBool openDB = - Preferences::GetBool(CHECK_MALWARE_PREF, CHECK_MALWARE_DEFAULT) || - Preferences::GetBool(CHECK_PHISHING_PREF, CHECK_PHISHING_DEFAULT); - if (!openDB) { - NS_WARNING("Not opening url-classifier DB"); - return NS_ERROR_NOT_AVAILABLE; - } - LOG(("Opening db\n")); nsresult rv;