Web Browser NG, Safe Browsing: identified places needing a change to support the Lookup API (v4)

Tue, 10 Apr 2018 19:40:37 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Apr 2018 19:40:37 +0200
changeset 6230
77a1b22c8a1f
parent 6229
72b40274a3b6
child 6231
fdfcd201f783

Web Browser NG, Safe Browsing: identified places needing a change to support the Lookup API (v4)

WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py file | annotate | diff | comparison | revisions
WebBrowser/SafeBrowsing/SafeBrowsingDialog.py file | annotate | diff | comparison | revisions
WebBrowser/SafeBrowsing/SafeBrowsingManager.py file | annotate | diff | comparison | revisions
--- a/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py	Tue Apr 10 19:39:13 2018 +0200
+++ b/WebBrowser/SafeBrowsing/SafeBrowsingAPIClient.py	Tue Apr 10 19:40:37 2018 +0200
@@ -88,6 +88,10 @@
         reply.deleteLater()
         return res
     
+    #######################################################################
+    ## Methods below implement the 'Update API (v4)'
+    #######################################################################
+    
     def getThreatsUpdate(self, clientStates):
         """
         Public method to fetch hash prefix updates for the given threat list.
@@ -254,6 +258,16 @@
         """
         return self.__nextRequestNoSoonerThan
     
+    #######################################################################
+    ## Methods below implement the 'Lookup API (v4)'
+    #######################################################################
+    
+    # TODO: implement the Lookup API (including temporary caching)
+    
+    #######################################################################
+    ## Methods below implement global (class wide) functionality
+    #######################################################################
+    
     @classmethod
     def getThreatMessage(cls, threatType):
         """
--- a/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py	Tue Apr 10 19:39:13 2018 +0200
+++ b/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py	Tue Apr 10 19:40:37 2018 +0200
@@ -66,8 +66,11 @@
         self.gsbGroupBox.setChecked(self.__enabled)
         self.gsbApiKeyEdit.setText(self.__apiKey)
         self.gsbFilterPlatformCheckBox.setChecked(self.__filterPlatform)
+        # TODO: add text to label to indicate Update API only
         self.gsbAutoUpdateCheckBox.setChecked(self.__automaticUpdate)
+        # TODO: add checkbox to enable the Lookup API
         
+        # TODO: enable the cache buttons group box only on Update API
         self.__updateCacheButtons()
         
         super(SafeBrowsingDialog, self).show()
--- a/WebBrowser/SafeBrowsing/SafeBrowsingManager.py	Tue Apr 10 19:39:13 2018 +0200
+++ b/WebBrowser/SafeBrowsing/SafeBrowsingManager.py	Tue Apr 10 19:40:37 2018 +0200
@@ -373,6 +373,7 @@
         @exception ValueError raised for an invalid URL
         """
         if self.isEnabled():
+            # TODO: add branch for the lookup API
             if isinstance(url, QUrl):
                 urlStr = url.toString().strip()
             else:

eric ide

mercurial