Fix URLs visited during private browsing showing up in WebpageIcons.db.
authorFlorian Bruhin <git@the-compiler.org>
Wed, 18 Mar 2015 17:47:19 +0000 (18:47 +0100)
committerFelix Geyer <fgeyer@debian.org>
Wed, 1 Apr 2015 17:44:29 +0000 (17:44 +0000)
Ported from http://trac.webkit.org/changeset/181565 by beidson@apple.com.

Upstream patch by Sam Weinig, reviewed by Brady Eidson.

* loader/icon/IconController.cpp:

(WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
(WebCore::IconController::continueLoadWithDecision): Instead of here.

Change-Id: I263bb6122606caa3488d641b127dd377012ee424
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Gbp-Pq: Name webpageicons_db_privacy.patch

Source/WebCore/loader/icon/IconController.cpp

index 8f23f6db1110a703928926bf117e26e19931aae2..a808352affebe0391b08cb1271472d8a5b96c21b 100644 (file)
@@ -159,6 +159,10 @@ void IconController::startLoader()
     }
 
     if (iconDatabase().supportsAsynchronousMode()) {
+        //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
+        if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
+            return;
+
         m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString);
         // Commit the icon url mapping to the database just in case we don't end up loading later.
         commitToDatabase(iconURL);
@@ -202,10 +206,6 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
 {
     ASSERT(iconLoadDecision != IconLoadUnknown);
 
-    //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
-    if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
-        return;
-
     if (iconLoadDecision == IconLoadNo) {
         KURL iconURL(url());
         String urlString(iconURL.string());