         }
         return nil
     }
+    
+    private func isWhitelistedUrl(url: String) -> Bool {
+        for whiteListUrl in urlsWhiteList {
+            if url.startsWith(whiteListUrl) {
+                return true
+            }
+        }
+        return false
+    }
 }
 

    private let adBlockPrefName = "cliqz-adb"
    
    private let telemetryWhiteList = ["attrack.FP", "attrack.tp_events"]
    
    // MARK: - Local variables
    var privateMode = false

    }
    
    //MARK: - Private Helpers
    private func extractAdblockerSeedFiles() {
        let sourceDirectory = "\(antiTrackingDirectory)/seed-files/adblocking"
        let destinationDirectory = "cliqz/antitracking/adblocking"
        
        if let sourcePath = NSBundle.mainBundle().resourceURL?.URLByAppendingPathComponent(sourceDirectory)?.path,
            let destinationPath = NSURL(fileURLWithPath: documentDirectory).URLByAppendingPathComponent(destinationDirectory)?.path {
            
            if self.fileManager.fileExistsAtPath(destinationPath) == false {
                let allFiles = self.fileManager.enumeratorAtPath(sourcePath)
                
                while let file = allFiles?.nextObject() as? String {
                    if file.endsWith(".txt") {
                        extractFile(file, sourcePath: sourcePath, destinationPath: destinationPath)
                    }
                }
            }
        }
    }
    
    private func extractFile(relativePath: String, sourcePath: String, destinationPath: String) {
        do {
            let absolutePath = sourcePath + "/" + relativePath
            if let content = self.fileManager.contentsAtPath(absolutePath) {
                let unzippedData = try content.gunzippedData()
                
                let fileDesitination = destinationPath + "/" + (relativePath)
                let containingDirectory = NSURL(fileURLWithPath: fileDesitination).URLByDeletingLastPathComponent
                createDirectoryIfNotExist(containingDirectory)
                
                unzippedData.writeToFile(fileDesitination, atomically:true)
            }
        } catch let error as NSError  {
            print("[Error] Could not copy file: \(relativePath), because of the following error: \(error)")
        }
    }
    
    private func getTabBlockingInfo(webViewId: Int) -> [NSObject : AnyObject]! {
        let tabBlockInfo = self.context.evaluateScript("System.get('antitracking/attrack').default.getTabBlockingInfo(\(webViewId));").toDictionary()
        return tabBlockInfo
