b1130cc
From 2810aea1f6c9cca48b93130a7c245f9a2f85637e Mon Sep 17 00:00:00 2001
b1130cc
From: Florian Bruhin <git@the-compiler.org>
b1130cc
Date: Wed, 18 Mar 2015 18:47:19 +0100
b1130cc
Subject: [PATCH] Fix URLs visited during private browsing showing up in
b1130cc
 WebpageIcons.db.
b1130cc
b1130cc
Ported from http://trac.webkit.org/changeset/181565 by beidson@apple.com.
b1130cc
b1130cc
Upstream patch by Sam Weinig, reviewed by Brady Eidson.
b1130cc
b1130cc
* loader/icon/IconController.cpp:
b1130cc
b1130cc
(WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
b1130cc
(WebCore::IconController::continueLoadWithDecision): Instead of here.
b1130cc
b1130cc
Change-Id: I263bb6122606caa3488d641b127dd377012ee424
b1130cc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
b1130cc
---
b1130cc
 Source/WebCore/loader/icon/IconController.cpp | 8 ++++----
b1130cc
 1 file changed, 4 insertions(+), 4 deletions(-)
b1130cc
b1130cc
diff --git a/Source/WebCore/loader/icon/IconController.cpp b/Source/WebCore/loader/icon/IconController.cpp
b1130cc
index 8f23f6d..a808352 100644
b1130cc
--- a/Source/WebCore/loader/icon/IconController.cpp
b1130cc
+++ b/Source/WebCore/loader/icon/IconController.cpp
b1130cc
@@ -159,6 +159,10 @@ void IconController::startLoader()
b1130cc
     }
b1130cc
 
b1130cc
     if (iconDatabase().supportsAsynchronousMode()) {
b1130cc
+        //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
b1130cc
+        if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
b1130cc
+            return;
b1130cc
+
b1130cc
         m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString);
b1130cc
         // Commit the icon url mapping to the database just in case we don't end up loading later.
b1130cc
         commitToDatabase(iconURL);
b1130cc
@@ -202,10 +206,6 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
b1130cc
 {
b1130cc
     ASSERT(iconLoadDecision != IconLoadUnknown);
b1130cc
 
b1130cc
-    //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
b1130cc
-    if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
b1130cc
-        return;
b1130cc
-
b1130cc
     if (iconLoadDecision == IconLoadNo) {
b1130cc
         KURL iconURL(url());
b1130cc
         String urlString(iconURL.string());
b1130cc
-- 
b1130cc
2.3.3
b1130cc