Title: [211870] trunk/Source
Revision
211870
Author
[email protected]
Date
2017-02-08 07:39:38 -0800 (Wed, 08 Feb 2017)

Log Message

Add support for enhanced privacy diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167948
<rdar://problem/30385112>

Reviewed by Antti Koivisto.

Source/WebCore:

Add new logDiagnosticMessageWithEnhancedPrivacy() method to DiagnosticLoggingClient
that is used for enhanced privacy logging. Start using this new API to log domains
that are visited.

* loader/EmptyClients.cpp:
* loader/FrameLoader.cpp:
(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::domainVisitedKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
delegate.

* UIProcess/API/APIDiagnosticLoggingClient.h:
(API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageDiagnosticLoggingClient.cpp:
(WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageDiagnosticLoggingClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211869 => 211870)


--- trunk/Source/WebCore/ChangeLog	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/ChangeLog	2017-02-08 15:39:38 UTC (rev 211870)
@@ -1,3 +1,24 @@
+2017-02-08  Chris Dumez  <[email protected]>
+
+        Add support for enhanced privacy diagnostic logging
+        https://bugs.webkit.org/show_bug.cgi?id=167948
+        <rdar://problem/30385112>
+
+        Reviewed by Antti Koivisto.
+
+        Add new logDiagnosticMessageWithEnhancedPrivacy() method to DiagnosticLoggingClient
+        that is used for enhanced privacy logging. Start using this new API to log domains
+        that are visited.
+
+        * loader/EmptyClients.cpp:
+        * loader/FrameLoader.cpp:
+        (WebCore::logNavigation):
+        (WebCore::FrameLoader::loadWithDocumentLoader):
+        * page/DiagnosticLoggingClient.h:
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::domainVisitedKey):
+        * page/DiagnosticLoggingKeys.h:
+
 2017-02-08  Carlos Garcia Campos  <[email protected]>
 
         [GStreamer] Critical warnings when media player is destroyed

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (211869 => 211870)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -121,6 +121,7 @@
     void logDiagnosticMessage(const String&, const String&, ShouldSample) final { }
     void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) final { }
     void logDiagnosticMessageWithValue(const String&, const String&, double, unsigned, ShouldSample) final { }
+    void logDiagnosticMessageWithEnhancedPrivacy(const String&, const String&, ShouldSample) final { }
 };
 
 #if ENABLE(DRAG_SUPPORT)

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (211869 => 211870)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -95,6 +95,7 @@
 #include "PluginDocument.h"
 #include "PolicyChecker.h"
 #include "ProgressTracker.h"
+#include "PublicSuffix.h"
 #include "ResourceHandle.h"
 #include "ResourceLoadInfo.h"
 #include "ResourceLoadObserver.h"
@@ -1368,7 +1369,7 @@
     loadWithDocumentLoader(newDocumentLoader, type, 0, AllowNavigationToInvalidURL::Yes);
 }
 
-static void logNavigation(MainFrame& frame, FrameLoadType type)
+static void logNavigation(MainFrame& frame, const URL& destinationURL, FrameLoadType type)
 {
     if (!frame.page())
         return;
@@ -1402,6 +1403,11 @@
         return;
     }
     frame.page()->diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::navigationKey(), navigationDescription, ShouldSample::No);
+#if ENABLE(PUBLIC_SUFFIX_LIST)
+    String domain = topPrivatelyControlledDomain(destinationURL.host());
+    if (!domain.isEmpty())
+        frame.page()->diagnosticLoggingClient().logDiagnosticMessageWithEnhancedPrivacy(DiagnosticLoggingKeys::domainVisitedKey(), domain, ShouldSample::No);
+#endif
 }
 
 void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, FormState* formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL)
@@ -1422,9 +1428,11 @@
     if (m_frame.document())
         m_previousURL = m_frame.document()->url();
 
+    const URL& newURL = loader->request().url();
+
     // Log main frame navigation types.
     if (m_frame.isMainFrame()) {
-        logNavigation(static_cast<MainFrame&>(m_frame), type);
+        logNavigation(static_cast<MainFrame&>(m_frame), newURL, type);
         static_cast<MainFrame&>(m_frame).performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadStarted);
     }
 
@@ -1431,7 +1439,6 @@
     policyChecker().setLoadType(type);
     bool isFormSubmission = formState;
 
-    const URL& newURL = loader->request().url();
     const String& httpMethod = loader->request().httpMethod();
 
     if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {

Modified: trunk/Source/WebCore/page/DiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebCore/page/DiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -40,6 +40,7 @@
     virtual void logDiagnosticMessage(const String& message, const String& description, ShouldSample) = 0;
     virtual void logDiagnosticMessageWithResult(const String& message, const String& description, DiagnosticLoggingResultType, ShouldSample) = 0;
     virtual void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, ShouldSample) = 0;
+    virtual void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, ShouldSample) = 0;
 
     static bool shouldLogAfterSampling(ShouldSample);
 

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (211869 => 211870)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -343,6 +343,11 @@
     return ASCIILiteral("documentLoaderStopping");
 }
 
+String DiagnosticLoggingKeys::domainVisitedKey()
+{
+    return ASCIILiteral("DomainVisited");
+}
+
 String DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey()
 {
     return ASCIILiteral("cannotSuspendActiveDOMObjects");

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (211869 => 211870)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -50,6 +50,7 @@
     static String diskCacheKey();
     static String diskCacheAfterValidationKey();
     static String documentLoaderStoppingKey();
+    static String domainVisitedKey();
     static String engineFailedToLoadKey();
     WEBCORE_EXPORT static String entryRightlyNotWarmedUpKey();
     WEBCORE_EXPORT static String entryWronglyNotWarmedUpKey();

Modified: trunk/Source/WebKit2/ChangeLog (211869 => 211870)


--- trunk/Source/WebKit2/ChangeLog	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-08 15:39:38 UTC (rev 211870)
@@ -1,3 +1,34 @@
+2017-02-08  Chris Dumez  <[email protected]>
+
+        Add support for enhanced privacy diagnostic logging
+        https://bugs.webkit.org/show_bug.cgi?id=167948
+        <rdar://problem/30385112>
+
+        Reviewed by Antti Koivisto.
+
+        Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
+        virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
+        delegate.
+
+        * UIProcess/API/APIDiagnosticLoggingClient.h:
+        (API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+        * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
+        * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
+        * UIProcess/Cocoa/DiagnosticLoggingClient.h:
+        * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
+        (WebKit::DiagnosticLoggingClient::setDelegate):
+        (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+        * UIProcess/WebPageDiagnosticLoggingClient.cpp:
+        (WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+        * UIProcess/WebPageDiagnosticLoggingClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
+        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
+
 2017-02-08  Antti Koivisto  <[email protected]>
 
         Allow speculative redirects

Modified: trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -42,6 +42,7 @@
     virtual void logDiagnosticMessage(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
     virtual void logDiagnosticMessageWithResult(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description, WebCore::DiagnosticLoggingResultType) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
     virtual void logDiagnosticMessageWithValue(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description, const WTF::String& value) { UNUSED_PARAM(message); UNUSED_PARAM(description); UNUSED_PARAM(value); }
+    virtual void logDiagnosticMessageWithEnhancedPrivacy(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
 };
 
 } // namespace API

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -36,6 +36,7 @@
 typedef void (*WKPageLogDiagnosticMessageCallback)(WKPageRef page, WKStringRef message, WKStringRef description, const void* clientInfo);
 typedef void (*WKPageLogDiagnosticMessageWithResultCallback)(WKPageRef page, WKStringRef message, WKStringRef description, WKDiagnosticLoggingResultType result, const void* clientInfo);
 typedef void (*WKPageLogDiagnosticMessageWithValueCallback)(WKPageRef page, WKStringRef message, WKStringRef description, WKStringRef value, const void* clientInfo);
+typedef void (*WKPageLogDiagnosticMessageWithEnhancedPrivacyCallback)(WKPageRef page, WKStringRef message, WKStringRef description, const void* clientInfo);
 
 typedef struct WKPageDiagnosticLoggingClientBase {
     int                                                                version;
@@ -51,6 +52,18 @@
     WKPageLogDiagnosticMessageWithValueCallback                        logDiagnosticMessageWithValue;
 } WKPageDiagnosticLoggingClientV0;
 
+typedef struct WKPageDiagnosticLoggingClientV1 {
+    WKPageDiagnosticLoggingClientBase                                  base;
+
+    // Version 0.
+    WKPageLogDiagnosticMessageCallback                                 logDiagnosticMessage;
+    WKPageLogDiagnosticMessageWithResultCallback                       logDiagnosticMessageWithResult;
+    WKPageLogDiagnosticMessageWithValueCallback                        logDiagnosticMessageWithValue;
+
+    // Version 1.
+    WKPageLogDiagnosticMessageWithEnhancedPrivacyCallback              logDiagnosticMessageWithEnhancedPrivacy;
+} WKPageDiagnosticLoggingClientV1;
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -41,6 +41,7 @@
 - (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message description:(NSString *)description;
 - (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message description:(NSString *)description result:(_WKDiagnosticLoggingResultType)result;
 - (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message description:(NSString *)description value:(NSString *) value;
+- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithEnhancedPrivacy:(NSString *)message description:(NSString *)description;
 
 @end
 

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -51,6 +51,7 @@
     void logDiagnosticMessage(WebPageProxy*, const String& message, const String& description) override;
     void logDiagnosticMessageWithResult(WebPageProxy*, const String& message, const String& description, WebCore::DiagnosticLoggingResultType) override;
     void logDiagnosticMessageWithValue(WebPageProxy*, const String& message, const String& description, const String& value) override;
+    void logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy*, const String& message, const String& description) override;
 
     WKWebView *m_webView;
     WeakObjCPtr<id <_WKDiagnosticLoggingDelegate>> m_delegate;
@@ -59,6 +60,7 @@
         unsigned webviewLogDiagnosticMessage : 1;
         unsigned webviewLogDiagnosticMessageWithResult : 1;
         unsigned webviewLogDiagnosticMessageWithValue : 1;
+        unsigned webviewLogDiagnosticMessageWithEnhancedPrivacy : 1;
     } m_delegateMethods;
 };
 

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm	2017-02-08 15:39:38 UTC (rev 211870)
@@ -50,6 +50,7 @@
     m_delegateMethods.webviewLogDiagnosticMessage = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessage:description:)];
     m_delegateMethods.webviewLogDiagnosticMessageWithResult = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithResult:description:result:)];
     m_delegateMethods.webviewLogDiagnosticMessageWithValue = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithValue:description:value:)];
+    m_delegateMethods.webviewLogDiagnosticMessageWithEnhancedPrivacy = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithEnhancedPrivacy:description:)];
 }
 
 void DiagnosticLoggingClient::logDiagnosticMessage(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description)
@@ -82,6 +83,12 @@
         [m_delegate.get() _webView:m_webView logDiagnosticMessageWithValue:message description:description value:value];
 }
 
+void DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description)
+{
+    if (m_delegateMethods.webviewLogDiagnosticMessageWithEnhancedPrivacy)
+        [m_delegate.get() _webView:m_webView logDiagnosticMessageWithEnhancedPrivacy:message description:description];
+}
+
 } // namespace WebKit
 
 #endif // WK_API_ENABLED

Modified: trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -61,4 +61,12 @@
     m_client.logDiagnosticMessageWithValue(toAPI(page), toAPI(message.impl()), toAPI(description.impl()), toAPI(value.impl()), m_client.base.clientInfo);
 }
 
+void WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy* page, const String& message, const String& description)
+{
+    if (!m_client.logDiagnosticMessageWithEnhancedPrivacy)
+        return;
+
+    m_client.logDiagnosticMessageWithEnhancedPrivacy(toAPI(page), toAPI(message.impl()), toAPI(description.impl()), m_client.base.clientInfo);
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -35,7 +35,7 @@
 namespace API {
 
 template<> struct ClientTraits<WKPageDiagnosticLoggingClientBase> {
-    typedef std::tuple<WKPageDiagnosticLoggingClientV0> Versions;
+    typedef std::tuple<WKPageDiagnosticLoggingClientV0, WKPageDiagnosticLoggingClientV1> Versions;
 };
 
 } // namespace API
@@ -51,6 +51,7 @@
     void logDiagnosticMessage(WebPageProxy*, const String& message, const String& description) override;
     void logDiagnosticMessageWithResult(WebPageProxy*, const String& message, const String& description, WebCore::DiagnosticLoggingResultType) override;
     void logDiagnosticMessageWithValue(WebPageProxy*, const String& message, const String& description, const String& value) override;
+    void logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy*, const String& message, const String& description) override;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -5195,6 +5195,14 @@
     m_diagnosticLoggingClient->logDiagnosticMessageWithValue(this, message, description, String::number(value, significantFigures));
 }
 
+void WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, ShouldSample shouldSample)
+{
+    if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
+        return;
+
+    m_diagnosticLoggingClient->logDiagnosticMessageWithEnhancedPrivacy(this, message, description);
+}
+
 void WebPageProxy::rectForCharacterRangeCallback(const IntRect& rect, const EditingRange& actualRange, uint64_t callbackID)
 {
     MESSAGE_CHECK(actualRange.isValid());

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -1130,6 +1130,7 @@
     void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample);
     void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, WebCore::ShouldSample);
     void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
+    void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample);
 
     // Form validation messages.
     void showValidationMessage(const WebCore::IntRect& anchorClientRect, const String& message);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211869 => 211870)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2017-02-08 15:39:38 UTC (rev 211870)
@@ -238,6 +238,7 @@
     LogDiagnosticMessage(String message, String description, enum WebCore::ShouldSample shouldSample)
     LogDiagnosticMessageWithResult(String message, String description, uint32_t result, enum WebCore::ShouldSample shouldSample)
     LogDiagnosticMessageWithValue(String message, String description, double value, unsigned significantFigures, enum WebCore::ShouldSample shouldSample)
+    LogDiagnosticMessageWithEnhancedPrivacy(String message, String description, enum WebCore::ShouldSample shouldSample)
 
     # Editor notifications
     EditorStateChanged(struct WebKit::EditorState editorState)

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp (211869 => 211870)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp	2017-02-08 15:39:38 UTC (rev 211870)
@@ -73,4 +73,14 @@
     m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithValue(message, description, value, significantFigures, ShouldSample::No));
 }
 
+void WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample shouldSample)
+{
+    ASSERT(!m_page.corePage() || m_page.corePage()->settings().diagnosticLoggingEnabled());
+
+    if (!shouldLogAfterSampling(shouldSample))
+        return;
+
+    m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacy(message, description, ShouldSample::No));
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h (211869 => 211870)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h	2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h	2017-02-08 15:39:38 UTC (rev 211870)
@@ -42,6 +42,7 @@
     void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample) override;
     void logDiagnosticMessageWithResult(const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample) override;
     void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample) override;
+    void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample) override;
 
     WebPage& m_page;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to