 #endif
     }
 
-    func fileLoader(loader: NetworkDataFileLoader, setDataFile data: NSData?) {
-        // synchronize code from this point on.
-        objc_sync_enter(self)
-        defer { objc_sync_exit(self) }
-
-        guard let data = data else { return }
-
-        if loader === targetsLoader {
-            do {
-                guard let json = try NSJSONSerialization.JSONObjectWithData(data, options: []) as? [String:[Int]] else { return }
-                domainToIdMapping = json
-            } catch {
-                print("Failed to load targetsLoader: \(error)")
-            }
-        } else if loader === rulesetsLoader {
-            loadSqlDb()
-        }
-
+    private func checkBothLoadsAreComplete() {
         delay(0) { // runs the closure on main thread
             self.runtimeDebugOnlyTestVerifyResourcesLoaded()
 

        }
    }

    func fileLoaderHasDataFile(_: NetworkDataFileLoader) -> Bool {
        return false
    }

    lazy var targetsLoader: NetworkDataFileLoader = {
        let targetsDataUrl = NSURL(string: "https://s3.amazonaws.com/https-everywhere-data/\(dataVersion)/httpse-targets.json")!
        let dataFile = "https-targets-\(dataVersion).json"
        let loader = NetworkDataFileLoader(url: targetsDataUrl, file: dataFile, localDirName: "https-everywhere-data-targets")
        loader.delegate = self
        return loader
    }()
