240 # Safe Browsing |
240 # Safe Browsing |
241 from WebBrowser.SafeBrowsing.SafeBrowsingManager import \ |
241 from WebBrowser.SafeBrowsing.SafeBrowsingManager import \ |
242 SafeBrowsingManager |
242 SafeBrowsingManager |
243 if SafeBrowsingManager.isEnabled(): |
243 if SafeBrowsingManager.isEnabled(): |
244 threatLists = WebBrowserWindow.safeBrowsingManager().lookupUrl(url) |
244 threatLists = WebBrowserWindow.safeBrowsingManager().lookupUrl(url) |
|
245 # TODO: handle threatLists being None (indicating a lookup error) |
245 if threatLists: |
246 if threatLists: |
246 threatMessages = WebBrowserWindow.safeBrowsingManager()\ |
247 threatMessages = WebBrowserWindow.safeBrowsingManager()\ |
247 .getThreatMessages(threatLists) |
248 .getThreatMessages(threatLists) |
248 res = E5MessageBox.warning( |
249 res = E5MessageBox.warning( |
249 WebBrowserWindow.getWindow(), |
250 WebBrowserWindow.getWindow(), |