210 res = self.__isOnDomainList(self.__exceptionsBlock, cookieDomain) |
210 res = self.__isOnDomainList(self.__exceptionsBlock, cookieDomain) |
211 if res: |
211 if res: |
212 return True |
212 return True |
213 |
213 |
214 if self.__acceptCookies == self.AcceptOnlyFromSitesNavigatedTo: |
214 if self.__acceptCookies == self.AcceptOnlyFromSitesNavigatedTo: |
215 url = WebBrowserWindow.mainWindow().getWindow().currentBrowser()\ |
215 mainWindow = WebBrowserWindow.mainWindow() |
216 .url() |
216 if mainWindow is not None: |
217 if url.isValid(): |
217 url = mainWindow.getWindow().currentBrowser().url() |
218 host = url.host() |
218 if url.isValid(): |
219 else: |
219 host = url.host() |
220 host = "" |
220 else: |
221 res = self.__matchDomain(cookieDomain, host) |
221 host = "" |
222 if not res: |
222 res = self.__matchDomain(cookieDomain, host) |
223 return True |
223 if not res: |
|
224 return True |
224 |
225 |
225 if self.__filterTrackingCookies and cookie.name().startsWith(b"__utm"): |
226 if self.__filterTrackingCookies and cookie.name().startsWith(b"__utm"): |
226 return True |
227 return True |
227 |
228 |
228 return False |
229 return False |