<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175288] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175288">175288</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2014-10-28 17:18:08 -0700 (Tue, 28 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EME] Pass location for media key storage through from WebKit/WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=137120

Reviewed by Anders Carlsson.

Allow the location for media key storage to be passed into the WebProcess from the UIProcess
through the WebContextConfiguraiton struct.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Add mediaKeysStorageDirectory.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyMediaKeysStorageDirectory): Added getter.
(WKContextConfigurationSetMediaKeysStorageDirectory): Added setter.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/C/WKOriginDataManager.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]): Provide a default location.
* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration): Set mediaKeysStorageDirectory.
* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::mediaKeysStorageDirectory): Added getter.
(API::ContextConfiguration::setMediaKeysStorageDirectory): Added setter.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults): Apply mediaKeysStorageDirectory.
(WebKit::WebContext::WebContext): Initialize m_mediaKeysStorageDirectory.
(WebKit::WebContext::createNewWebProcess): Create a sandbox extension handle for mediaKeysStorageDirectory.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return a default location.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Ditto.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return an overridable default location.
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: Added.
(WebKit::WebMediaKeyStorageManager::initialize): Pull the mediaKeysStorageDirectory out of configuration.
(WebKit::WebMediaKeyStorageManager::supplementName): Return a configuration name.
(WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin): Return the
    correct storage directory based on the SecureOrigin.
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): Return the origins within the
    storage directory.
(WebKit::removeAllMediaKeyStorageForOriginPath): Static, remove contents and directory at path.
(WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin): Use
    removeAllMediaKeyStorageForOriginPath to remove origin data.
(WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates): Ditto.
(WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries): Ditto.
* WebProcess/MediaCache/WebMediaKeyStorageManager.h: Added.
(WebKit::WebMediaKeyStorageManager::WebMediaKeyStorageManager): Default constructor.
(WebKit::WebMediaKeyStorageManager::~WebMediaKeyStorageManager): Default virtual destructor.
(WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectory): Simple accessor.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add WebMediaKeyStorageManager as a supplement.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Create a sandbox extension from the sandbox extension handle.

Add new source files to project(s).

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
(WebKit::removeAllMediaKeyStorageForOriginPath):

Drive-by fix: references to VoidCallback are ambiguous, since the same name is re-used in multiple namespaces.
Make references to WebCore::VoidCallback explicit where the entire WebCore (and other) namespaces are pulled in.

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::requestPermission):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefh">trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKOriginDataManagerh">trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIContextConfigurationcpp">trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIContextConfigurationh">trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContexth">trunk/Source/WebKit2/UIProcess/WebContext.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebContextEflcpp">trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebContextGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagercpp">trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessMediaCacheWebMediaKeyStorageManagercpp">trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessMediaCacheWebMediaKeyStorageManagerh">trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2014-10-28  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        [EME] Pass location for media key storage through from WebKit/WebKit2.
+        https://bugs.webkit.org/show_bug.cgi?id=137120
+
+        Reviewed by Anders Carlsson.
+
+        Allow the location for media key storage to be passed into the WebProcess from the UIProcess
+        through the WebContextConfiguraiton struct.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode): Add mediaKeysStorageDirectory.
+        (WebKit::WebProcessCreationParameters::decode): Ditto.
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/API/C/WKContextConfigurationRef.cpp:
+        (WKContextConfigurationCopyMediaKeysStorageDirectory): Added getter.
+        (WKContextConfigurationSetMediaKeysStorageDirectory): Added setter.
+        * UIProcess/API/C/WKContextConfigurationRef.h:
+        * UIProcess/API/C/WKOriginDataManager.h:
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (-[WKProcessPool _initWithConfiguration:]): Provide a default location.
+        * UIProcess/APIContextConfiguration.cpp:
+        (API::ContextConfiguration::webContextConfiguration): Set mediaKeysStorageDirectory.
+        * UIProcess/APIContextConfiguration.h:
+        (API::ContextConfiguration::mediaKeysStorageDirectory): Added getter.
+        (API::ContextConfiguration::setMediaKeysStorageDirectory): Added setter.
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults): Apply mediaKeysStorageDirectory.
+        (WebKit::WebContext::WebContext): Initialize m_mediaKeysStorageDirectory.
+        (WebKit::WebContext::createNewWebProcess): Create a sandbox extension handle for mediaKeysStorageDirectory.
+        * UIProcess/WebContext.h:
+        * UIProcess/efl/WebContextEfl.cpp:
+        (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return a default location.
+        * UIProcess/gtk/WebContextGtk.cpp:
+        (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Ditto.
+        * UIProcess/mac/WebContextMac.mm:
+        (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return an overridable default location.
+        * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: Added.
+        (WebKit::WebMediaKeyStorageManager::initialize): Pull the mediaKeysStorageDirectory out of configuration.
+        (WebKit::WebMediaKeyStorageManager::supplementName): Return a configuration name.
+        (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin): Return the
+            correct storage directory based on the SecureOrigin.
+        (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): Return the origins within the
+            storage directory.
+        (WebKit::removeAllMediaKeyStorageForOriginPath): Static, remove contents and directory at path.
+        (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin): Use
+            removeAllMediaKeyStorageForOriginPath to remove origin data.
+        (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates): Ditto.
+        (WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries): Ditto.
+        * WebProcess/MediaCache/WebMediaKeyStorageManager.h: Added.
+        (WebKit::WebMediaKeyStorageManager::WebMediaKeyStorageManager): Default constructor.
+        (WebKit::WebMediaKeyStorageManager::~WebMediaKeyStorageManager): Default virtual destructor.
+        (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectory): Simple accessor.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess): Add WebMediaKeyStorageManager as a supplement.
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess): Create a sandbox extension from the sandbox extension handle.
+
+        Add new source files to project(s).
+
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
+        (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
+        (WebKit::removeAllMediaKeyStorageForOriginPath):
+
+        Drive-by fix: references to VoidCallback are ambiguous, since the same name is re-used in multiple namespaces.
+        Make references to WebCore::VoidCallback explicit where the entire WebCore (and other) namespaces are pulled in.
+
+        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
+        (WebKit::NotificationPermissionRequestManager::startRequest):
+        (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
+        * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
+        (WebKit::WebNotificationClient::requestPermission):
+
</ins><span class="cx"> 2014-10-28  Jeremy Jones  &lt;jeremyj@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add optimized fullscreen mode.
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -184,6 +184,8 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp
</span><span class="cx"> 
</span><ins>+    WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
+
</ins><span class="cx">     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -278,6 +278,8 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
</span><span class="cx"> 
</span><ins>+    WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
+
</ins><span class="cx">     WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -73,6 +73,8 @@
</span><span class="cx">     encoder &lt;&lt; containerTemporaryDirectoryExtensionHandle;
</span><span class="cx">     encoder &lt;&lt; hstsDatabasePathExtensionHandle;
</span><span class="cx"> #endif
</span><ins>+    encoder &lt;&lt; mediaKeyStorageDirectory;
+    encoder &lt;&lt; mediaKeyStorageDirectoryExtensionHandle;
</ins><span class="cx">     encoder &lt;&lt; shouldUseTestingNetworkSession;
</span><span class="cx">     encoder &lt;&lt; urlSchemesRegistererdAsEmptyDocument;
</span><span class="cx">     encoder &lt;&lt; urlSchemesRegisteredAsSecure;
</span><span class="lines">@@ -171,6 +173,10 @@
</span><span class="cx">     if (!decoder.decode(parameters.hstsDatabasePathExtensionHandle))
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span><ins>+    if (!decoder.decode(parameters.mediaKeyStorageDirectory))
+        return false;
+    if (!decoder.decode(parameters.mediaKeyStorageDirectoryExtensionHandle))
+        return false;
</ins><span class="cx">     if (!decoder.decode(parameters.shouldUseTestingNetworkSession))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.urlSchemesRegistererdAsEmptyDocument))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -78,6 +78,8 @@
</span><span class="cx">     // FIXME: Remove this once &lt;rdar://problem/17726660&gt; is fixed.
</span><span class="cx">     SandboxExtension::Handle hstsDatabasePathExtensionHandle;
</span><span class="cx"> #endif
</span><ins>+    SandboxExtension::Handle mediaKeyStorageDirectoryExtensionHandle;
+    String mediaKeyStorageDirectory;
</ins><span class="cx"> 
</span><span class="cx">     bool shouldUseTestingNetworkSession;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -75,3 +75,13 @@
</span><span class="cx"> {
</span><span class="cx">     toImpl(configuration)-&gt;setWebSQLDatabaseDirectory(toImpl(webSQLDatabaseDirectory)-&gt;string());
</span><span class="cx"> }
</span><ins>+
+WKStringRef WKContextConfigurationCopyMediaKeysStorageDirectory(WKContextConfigurationRef configuration)
+{
+    return toCopiedAPI(toImpl(configuration)-&gt;mediaKeysStorageDirectory());
+}
+
+void WKContextConfigurationSetMediaKeysStorageDirectory(WKContextConfigurationRef configuration, WKStringRef mediaKeysStorageDirectory)
+{
+    toImpl(configuration)-&gt;setMediaKeysStorageDirectory(toImpl(mediaKeysStorageDirectory)-&gt;string());
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -46,6 +46,9 @@
</span><span class="cx"> WK_EXPORT WKStringRef WKContextConfigurationCopyWebSQLDatabaseDirectory(WKContextConfigurationRef configuration);
</span><span class="cx"> WK_EXPORT void WKContextConfigurationSetWebSQLDatabaseDirectory(WKContextConfigurationRef configuration, WKStringRef webSQLDatabaseDirectory);
</span><span class="cx"> 
</span><ins>+WK_EXPORT WKStringRef WKContextConfigurationCopyMediaKeysStorageDirectory(WKContextConfigurationRef configuration);
+WK_EXPORT void WKContextConfigurationSetMediaKeysStorageDirectory(WKContextConfigurationRef configuration, WKStringRef mediaKeysStorageDirectory);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKOriginDataManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">     kWKPluginDataOriginData = 1 &lt;&lt; 5,
</span><span class="cx">     kWKResourceCacheOriginData = 1 &lt;&lt; 6,
</span><span class="cx">     kWKWebSQLDatabaseOriginData = 1 &lt;&lt; 7,
</span><ins>+    kWKMediaKeyStorageOriginData = 1 &lt;&lt; 8,
</ins><span class="cx"> 
</span><span class="cx">     kWKAllOriginData = 0xFFFFFFFF
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -174,6 +174,7 @@
</span><span class="cx">     webContextConfiguration.localStorageDirectory = websiteDataDirectoryURL(@&quot;LocalStorage&quot;).absoluteURL.path.fileSystemRepresentation;
</span><span class="cx">     webContextConfiguration.webSQLDatabaseDirectory = websiteDataDirectoryURL(@&quot;WebSQL&quot;).absoluteURL.path.fileSystemRepresentation;
</span><span class="cx">     webContextConfiguration.indexedDBDatabaseDirectory = websiteDataDirectoryURL(@&quot;IndexedDB&quot;).absoluteURL.path.fileSystemRepresentation;
</span><ins>+    webContextConfiguration.mediaKeysStorageDirectory = websiteDataDirectoryURL(@&quot;MediaKeys&quot;).absoluteURL.path.fileSystemRepresentation;
</ins><span class="cx"> 
</span><span class="cx">     API::Object::constructInWrapper&lt;WebKit::WebContext&gt;(self, WTF::move(webContextConfiguration));
</span><span class="cx">     _context-&gt;setHistoryClient(std::make_unique&lt;WebKit::HistoryClient&gt;());
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIContextConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     configuration.injectedBundlePath = m_injectedBundlePath;
</span><span class="cx">     configuration.localStorageDirectory = m_localStorageDirectory;
</span><span class="cx">     configuration.webSQLDatabaseDirectory = m_webSQLDatabaseDirectory;
</span><ins>+    configuration.mediaKeysStorageDirectory = m_mediaKeysStorageDirectory;
</ins><span class="cx"> 
</span><span class="cx">     WebKit::WebContext::applyPlatformSpecificConfigurationDefaults(configuration);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIContextConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -55,6 +55,9 @@
</span><span class="cx">     String webSQLDatabaseDirectory() const { return m_webSQLDatabaseDirectory; }
</span><span class="cx">     void setWebSQLDatabaseDirectory(const String&amp; webSQLDatabaseDirectory) { m_webSQLDatabaseDirectory = webSQLDatabaseDirectory; }
</span><span class="cx"> 
</span><ins>+    String mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
+    void setMediaKeysStorageDirectory(const String&amp; mediaKeysStorageDirectory) { m_mediaKeysStorageDirectory = mediaKeysStorageDirectory; }
+
</ins><span class="cx">     WebKit::WebContextConfiguration webContextConfiguration() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -64,6 +67,7 @@
</span><span class="cx">     String m_injectedBundlePath;
</span><span class="cx">     String m_localStorageDirectory;
</span><span class="cx">     String m_webSQLDatabaseDirectory;
</span><ins>+    String m_mediaKeysStorageDirectory;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -128,6 +128,9 @@
</span><span class="cx">     // *********
</span><span class="cx">     if (!configuration.indexedDBDatabaseDirectory)
</span><span class="cx">         configuration.indexedDBDatabaseDirectory = platformDefaultIndexedDBDatabaseDirectory();
</span><ins>+
+    if (!configuration.mediaKeysStorageDirectory)
+        configuration.mediaKeysStorageDirectory = platformDefaultMediaKeysStorageDirectory();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebContext&gt; WebContext::create(WebContextConfiguration configuration)
</span><span class="lines">@@ -170,6 +173,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_webSQLDatabaseDirectory(WTF::move(configuration.webSQLDatabaseDirectory))
</span><span class="cx">     , m_indexedDBDatabaseDirectory(WTF::move(configuration.indexedDBDatabaseDirectory))
</span><ins>+    , m_mediaKeysStorageDirectory(WTF::move(configuration.mediaKeysStorageDirectory))
</ins><span class="cx">     , m_shouldUseTestingNetworkSession(false)
</span><span class="cx">     , m_processTerminationEnabled(true)
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="lines">@@ -628,6 +632,10 @@
</span><span class="cx">         SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    parameters.mediaKeyStorageDirectory = m_mediaKeysStorageDirectory;
+    if (!parameters.mediaKeyStorageDirectory.isEmpty())
+        SandboxExtension::createHandleForReadWriteDirectory(parameters.mediaKeyStorageDirectory, parameters.mediaKeyStorageDirectoryExtensionHandle);
+
</ins><span class="cx">     parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
</span><span class="cx"> 
</span><span class="cx">     parameters.cacheModel = m_cacheModel;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -100,6 +100,7 @@
</span><span class="cx">     String localStorageDirectory;
</span><span class="cx">     String webSQLDatabaseDirectory;
</span><span class="cx">     String indexedDBDatabaseDirectory;
</span><ins>+    String mediaKeysStorageDirectory;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class WebContext : public API::ObjectImpl&lt;API::Object::Type::Context&gt;, private IPC::MessageReceiver
</span><span class="lines">@@ -416,6 +417,7 @@
</span><span class="cx">     static String platformDefaultLocalStorageDirectory();
</span><span class="cx">     static String platformDefaultIndexedDBDatabaseDirectory();
</span><span class="cx">     static String platformDefaultWebSQLDatabaseDirectory();
</span><ins>+    static String platformDefaultMediaKeysStorageDirectory();
</ins><span class="cx"> 
</span><span class="cx">     String diskCacheDirectory() const;
</span><span class="cx">     String platformDefaultDiskCacheDirectory() const;
</span><span class="lines">@@ -529,6 +531,7 @@
</span><span class="cx"> 
</span><span class="cx">     String m_webSQLDatabaseDirectory;
</span><span class="cx">     String m_indexedDBDatabaseDirectory;
</span><ins>+    String m_mediaKeysStorageDirectory;
</ins><span class="cx"> 
</span><span class="cx">     bool m_shouldUseTestingNetworkSession;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebContextEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -121,6 +121,11 @@
</span><span class="cx">     return String::fromUTF8(efreet_data_home_get()) + &quot;/WebKitEfl/LocalStorage&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String WebContext::platformDefaultMediaKeysStorageDirectory()
+{
+    return String::fromUTF8(efreet_data_home_get()) + &quot;/WebKitEfl/MediaKeys&quot;;
+}
+
</ins><span class="cx"> String WebContext::platformDefaultDiskCacheDirectory() const
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(efreet_cache_home_get()) + &quot;/WebKitEfl&quot;;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebContextGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -136,6 +136,12 @@
</span><span class="cx">     return WebCore::filenameToString(storageDirectory.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String WebContext::platformDefaultMediaKeysStorageDirectory()
+{
+    GUniquePtr&lt;gchar&gt; mediaKeysStorageDirectory(g_build_filename(g_get_user_data_dir(), &quot;webkitgtk&quot;, &quot;mediakeys&quot;, nullptr));
+    return WebCore::filenameToString(mediaKeysStorageDirectory.get());
+}
+
</ins><span class="cx"> String WebContext::platformDefaultDiskCacheDirectory() const
</span><span class="cx"> {
</span><span class="cx">     GUniquePtr&lt;char&gt; diskCacheDirectory(g_build_filename(g_get_user_cache_dir(), g_get_prgname(), nullptr));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @&quot;WebKitKerningAndLigaturesEnabledByDefault&quot;;
</span><span class="cx"> NSString *WebKitJSCJITEnabledDefaultsKey = @&quot;WebKitJSCJITEnabledDefaultsKey&quot;;
</span><span class="cx"> NSString *WebKitJSCFTLJITEnabledDefaultsKey = @&quot;WebKitJSCFTLJITEnabledDefaultsKey&quot;;
</span><ins>+NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @&quot;WebKitMediaKeysStorageDirectory&quot;;
</ins><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @&quot;NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification&quot;;
</span><span class="lines">@@ -379,6 +380,14 @@
</span><span class="cx">     return stringByResolvingSymlinksInPath([localStorageDirectory stringByStandardizingPath]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String WebContext::platformDefaultMediaKeysStorageDirectory()
+{
+    NSString *mediaKeysStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaKeysStorageDirectoryDefaultsKey];
+    if (!mediaKeysStorageDirectory || ![mediaKeysStorageDirectory isKindOfClass:[NSString class]])
+        mediaKeysStorageDirectory = @&quot;~/Library/WebKit/MediaKeys&quot;;
+    return stringByResolvingSymlinksInPath([mediaKeysStorageDirectory stringByStandardizingPath]);
+}
+
</ins><span class="cx"> bool WebContext::omitPDFSupport()
</span><span class="cx"> {
</span><span class="cx">     // Since this is a &quot;secret default&quot; we don't bother registering it.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -1581,6 +1581,8 @@
</span><span class="cx">                 C5E1AFEF16B21029006CC1F2 /* APIWebArchiveResource.h in Headers */ = {isa = PBXBuildFile; fileRef = BC329D9F16ACD47800316DE2 /* APIWebArchiveResource.h */; };
</span><span class="cx">                 C5FA1ED318E1062200B3F402 /* WKAirPlayRoutePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = C5FA1ED118E1062200B3F402 /* WKAirPlayRoutePicker.h */; };
</span><span class="cx">                 C5FA1ED418E1062200B3F402 /* WKAirPlayRoutePicker.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5FA1ED218E1062200B3F402 /* WKAirPlayRoutePicker.mm */; };
</span><ins>+                CD003A5219D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD003A5019D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp */; };
+                CD003A5319D49B5D005ABCE0 /* WebMediaKeyStorageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD003A5119D49B5D005ABCE0 /* WebMediaKeyStorageManager.h */; };
</ins><span class="cx">                 CD5C66A0134B9D38004FE2A8 /* InjectedBundlePageFullScreenClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5C669E134B9D36004FE2A8 /* InjectedBundlePageFullScreenClient.cpp */; };
</span><span class="cx">                 CD5C66A1134B9D38004FE2A8 /* InjectedBundlePageFullScreenClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5C669F134B9D37004FE2A8 /* InjectedBundlePageFullScreenClient.h */; };
</span><span class="cx">                 CD67D30E15C08F9A00843ADF /* InjectedBundlePageDiagnosticLoggingClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD67D30815C07BE000843ADF /* InjectedBundlePageDiagnosticLoggingClient.cpp */; };
</span><span class="lines">@@ -3672,6 +3674,8 @@
</span><span class="cx">                 C59C4A5718B81174007BDCB6 /* AssistedNodeInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssistedNodeInformation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C5FA1ED118E1062200B3F402 /* WKAirPlayRoutePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKAirPlayRoutePicker.h; path = ios/forms/WKAirPlayRoutePicker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C5FA1ED218E1062200B3F402 /* WKAirPlayRoutePicker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKAirPlayRoutePicker.mm; path = ios/forms/WKAirPlayRoutePicker.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                CD003A5019D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebMediaKeyStorageManager.cpp; path = MediaCache/WebMediaKeyStorageManager.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                CD003A5119D49B5D005ABCE0 /* WebMediaKeyStorageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebMediaKeyStorageManager.h; path = MediaCache/WebMediaKeyStorageManager.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 CD5C669E134B9D36004FE2A8 /* InjectedBundlePageFullScreenClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageFullScreenClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5C669F134B9D37004FE2A8 /* InjectedBundlePageFullScreenClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageFullScreenClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD67D30815C07BE000843ADF /* InjectedBundlePageDiagnosticLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageDiagnosticLoggingClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4972,6 +4976,8 @@
</span><span class="cx">                                 33D3A3BE133960B000709BE4 /* WebMediaCacheManager.cpp */,
</span><span class="cx">                                 33D3A3BF133960B000709BE4 /* WebMediaCacheManager.h */,
</span><span class="cx">                                 33D3A3C0133960B000709BE4 /* WebMediaCacheManager.messages.in */,
</span><ins>+                                CD003A5019D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp */,
+                                CD003A5119D49B5D005ABCE0 /* WebMediaKeyStorageManager.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = MediaCache;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -7070,6 +7076,7 @@
</span><span class="cx">                                 37BEC4E119491486008B4286 /* CompletionHandlerCallChecker.h in Headers */,
</span><span class="cx">                                 BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */,
</span><span class="cx">                                 1A5B1C5518987EDF004FCF9B /* WebDocumentLoader.h in Headers */,
</span><ins>+                                CD003A5319D49B5D005ABCE0 /* WebMediaKeyStorageManager.h in Headers */,
</ins><span class="cx">                                 E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
</span><span class="cx">                                 51BA24441858EE3000EA2811 /* AsyncTask.h in Headers */,
</span><span class="cx">                                 7C85FD8019341665000177C4 /* WebPreferencesKeys.h in Headers */,
</span><span class="lines">@@ -9426,6 +9433,7 @@
</span><span class="cx">                                 BC407601124FF0270068F20A /* WKNumber.cpp in Sources */,
</span><span class="cx">                                 7CD5EBB81746A15B000C1C45 /* WKObjCTypeWrapperRef.mm in Sources */,
</span><span class="cx">                                 1ABC3DF51899E437004F0626 /* NavigationState.mm in Sources */,
</span><ins>+                                CD003A5219D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp in Sources */,
</ins><span class="cx">                                 BC85806312B8505700EDEB2E /* WKOpenPanelParameters.cpp in Sources */,
</span><span class="cx">                                 BC85806212B8505700EDEB2E /* WKOpenPanelResultListener.cpp in Sources */,
</span><span class="cx">                                 3F418EFB1887BD97002795FD /* WebVideoFullscreenManagerProxyMessageReceiver.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessMediaCacheWebMediaKeyStorageManagercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp (0 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -0,0 +1,134 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebMediaKeyStorageManager.h&quot;
+
+#include &quot;SecurityOriginData.h&quot;
+#include &quot;WebProcessCreationParameters.h&quot;
+#include &lt;WebCore/FileSystem.h&gt;
+#include &lt;WebCore/SecurityOrigin.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebMediaKeyStorageManager::initialize(const WebProcessCreationParameters &amp;parameters)
+{
+    ASSERT(!parameters.mediaKeyStorageDirectory.isEmpty());
+    m_mediaKeyStorageDirectory = parameters.mediaKeyStorageDirectory;
+}
+
+const char* WebMediaKeyStorageManager::supplementName()
+{
+    return &quot;WebMediaKeyStorageManager&quot;;
+}
+
+String WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin(const SecurityOriginData&amp; originData)
+{
+    if (!m_mediaKeyStorageDirectory)
+        return emptyString();
+
+    return pathByAppendingComponent(m_mediaKeyStorageDirectory, originData.securityOrigin()-&gt;databaseIdentifier());
+}
+
+Vector&lt;SecurityOriginData&gt; WebMediaKeyStorageManager::getMediaKeyOrigins()
+{
+    Vector&lt;SecurityOriginData&gt; results;
+
+    if (m_mediaKeyStorageDirectory.isEmpty())
+        return results;
+
+    Vector&lt;String&gt; originPaths = listDirectory(m_mediaKeyStorageDirectory, &quot;*&quot;);
+    for (const auto&amp; originPath : originPaths) {
+        URL url;
+        url.setProtocol(ASCIILiteral(&quot;file&quot;));
+        url.setPath(originPath);
+
+        String mediaKeyIdentifier = url.lastPathComponent();
+
+        RefPtr&lt;SecurityOrigin&gt; securityOrigin = SecurityOrigin::maybeCreateFromDatabaseIdentifier(mediaKeyIdentifier);
+        if (!securityOrigin)
+            continue;
+
+        results.append(SecurityOriginData::fromSecurityOrigin(securityOrigin.get()));
+    }
+
+    return results;
+}
+
+static void removeAllMediaKeyStorageForOriginPath(const String&amp; originPath, double startDate, double endDate)
+{
+    Vector&lt;String&gt; mediaKeyPaths = listDirectory(originPath, &quot;*&quot;);
+
+    for (const auto&amp; mediaKeyPath : mediaKeyPaths) {
+        String mediaKeyFile = pathByAppendingComponent(mediaKeyPath, &quot;SecureStop.plist&quot;);
+
+        if (!fileExists(mediaKeyFile))
+            continue;
+
+        time_t modTime;
+        getFileModificationTime(mediaKeyFile, modTime);
+
+        if (modTime &lt; startDate || modTime &gt; endDate)
+            continue;
+
+        deleteFile(mediaKeyFile);
+        deleteEmptyDirectory(mediaKeyPath);
+    }
+    
+    deleteEmptyDirectory(originPath);
+}
+
+void WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin(const SecurityOriginData&amp; originData)
+{
+    if (m_mediaKeyStorageDirectory.isEmpty())
+        return;
+
+    String originPath = mediaKeyStorageDirectoryForOrigin(originData);
+    removeAllMediaKeyStorageForOriginPath(originPath, std::numeric_limits&lt;double&gt;::lowest(), std::numeric_limits&lt;double&gt;::max());
+}
+
+void WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates(double startDate, double endDate)
+{
+    if (m_mediaKeyStorageDirectory.isEmpty())
+        return;
+
+    Vector&lt;String&gt; originPaths = listDirectory(m_mediaKeyStorageDirectory, &quot;*&quot;);
+    for (auto&amp; originPath : originPaths)
+        removeAllMediaKeyStorageForOriginPath(originPath, startDate, endDate);
+}
+
+void WebMediaKeyStorageManager::deleteAllMediaKeyEntries()
+{
+    if (m_mediaKeyStorageDirectory.isEmpty())
+        return;
+
+    Vector&lt;String&gt; originPaths = listDirectory(m_mediaKeyStorageDirectory, &quot;*&quot;);
+    for (auto&amp; originPath : originPaths)
+        removeAllMediaKeyStorageForOriginPath(originPath, std::numeric_limits&lt;double&gt;::lowest(), std::numeric_limits&lt;double&gt;::max());
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessMediaCacheWebMediaKeyStorageManagerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.h (0 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/MediaCache/WebMediaKeyStorageManager.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef WebMediaKeyStorageManager_h
+#define WebMediaKeyStorageManager_h
+
+#include &quot;WKOriginDataManager.h&quot;
+#include &quot;WebProcessSupplement.h&quot;
+#include &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+struct SecurityOriginData;
+class WebProcess;
+
+class WebMediaKeyStorageManager : public WebProcessSupplement {
+    WTF_MAKE_NONCOPYABLE(WebMediaKeyStorageManager);
+public:
+    explicit WebMediaKeyStorageManager(WebProcess*) { }
+    virtual ~WebMediaKeyStorageManager() { }
+
+    static const char* supplementName();
+
+    const String&amp; mediaKeyStorageDirectory() const { return m_mediaKeyStorageDirectory; }
+    String mediaKeyStorageDirectoryForOrigin(const SecurityOriginData&amp;);
+
+    Vector&lt;SecurityOriginData&gt; getMediaKeyOrigins();
+    void deleteMediaKeyEntriesForOrigin(const SecurityOriginData&amp;);
+    void deleteMediaKeyEntriesModifiedBetweenDates(double startDate, double endDate);
+    void deleteAllMediaKeyEntries();
+
+private:
+    virtual void initialize(const WebProcessCreationParameters&amp;);
+
+    String m_mediaKeyStorageDirectory;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNotificationsNotificationPermissionRequestManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LEGACY_NOTIFICATIONS)
</span><del>-void NotificationPermissionRequestManager::startRequest(SecurityOrigin* origin, PassRefPtr&lt;VoidCallback&gt; callback)
</del><ins>+void NotificationPermissionRequestManager::startRequest(SecurityOrigin* origin, PassRefPtr&lt;WebCore::VoidCallback&gt; callback)
</ins><span class="cx"> {
</span><span class="cx">     NotificationClient::Permission permission = permissionLevel(origin);
</span><span class="cx">     if (permission != NotificationClient::PermissionNotAllowed) {
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">     WebProcess::shared().supplement&lt;WebNotificationManager&gt;()-&gt;didUpdateNotificationDecision(origin-&gt;toString(), allowed);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LEGACY_NOTIFICATIONS)
</span><del>-    RefPtr&lt;VoidCallback&gt; voidCallback = m_idToVoidCallbackMap.take(requestID);
</del><ins>+    RefPtr&lt;WebCore::VoidCallback&gt; voidCallback = m_idToVoidCallbackMap.take(requestID);
</ins><span class="cx">     if (voidCallback) {
</span><span class="cx">         voidCallback-&gt;handleEvent();
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebNotificationClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LEGACY_NOTIFICATIONS)
</span><del>-void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr&lt;VoidCallback&gt; callback)
</del><ins>+void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr&lt;WebCore::VoidCallback&gt; callback)
</ins><span class="cx"> {
</span><span class="cx">     m_page-&gt;notificationPermissionRequestManager()-&gt;startRequest(context-&gt;securityOrigin(), callback);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -48,7 +48,9 @@
</span><span class="cx"> #include &quot;WebGeolocationManager.h&quot;
</span><span class="cx"> #include &quot;WebIconDatabaseProxy.h&quot;
</span><span class="cx"> #include &quot;WebMediaCacheManager.h&quot;
</span><ins>+#include &quot;WebMediaKeyStorageManager.h&quot;
</ins><span class="cx"> #include &quot;WebMemorySampler.h&quot;
</span><ins>+#include &quot;WebOriginDataManager.h&quot;
</ins><span class="cx"> #include &quot;WebPage.h&quot;
</span><span class="cx"> #include &quot;WebPageCreationParameters.h&quot;
</span><span class="cx"> #include &quot;WebPageGroupProxyMessages.h&quot;
</span><span class="lines">@@ -174,6 +176,7 @@
</span><span class="cx">     , m_hasRichContentServices(false)
</span><span class="cx"> #endif
</span><span class="cx">     , m_nonVisibleProcessCleanupTimer(this, &amp;WebProcess::nonVisibleProcessCleanupTimerFired)
</span><ins>+    , m_webOriginDataManager(std::make_unique&lt;WebOriginDataManager&gt;(*this, *this))
</ins><span class="cx"> {
</span><span class="cx">     // Initialize our platform strategies.
</span><span class="cx">     WebPlatformStrategies::initialize();
</span><span class="lines">@@ -198,6 +201,9 @@
</span><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx">     addSupplement&lt;WebBatteryManager&gt;();
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+    addSupplement&lt;WebMediaKeyStorageManager&gt;();
+#endif
</ins><span class="cx">     m_plugInAutoStartOriginHashes.add(SessionID::defaultSessionID(), HashMap&lt;unsigned, double&gt;());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1246,4 +1252,71 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+void WebProcess::getOrigins(WKOriginDataTypes types, std::function&lt;void(const Vector&lt;SecurityOriginData&gt;&amp;)&gt; completion)
+{
+    if (!(types &amp; kWKWebSQLDatabaseOriginData)) {
+        completion(Vector&lt;SecurityOriginData&gt;());
+        return;
+    }
+
+    WebMediaKeyStorageManager* manager = supplement&lt;WebMediaKeyStorageManager&gt;();
+    if (!manager) {
+        completion(Vector&lt;SecurityOriginData&gt;());
+        return;
+    }
+
+    completion(manager-&gt;getMediaKeyOrigins());
+}
+
+void WebProcess::deleteEntriesForOrigin(WKOriginDataTypes types, const SecurityOriginData&amp; origin, std::function&lt;void()&gt; completion)
+{
+    if (!(types &amp; kWKWebSQLDatabaseOriginData)) {
+        completion();
+        return;
+    }
+
+    WebMediaKeyStorageManager* manager = supplement&lt;WebMediaKeyStorageManager&gt;();
+    if (!manager) {
+        completion();
+        return;
+    }
+
+    manager-&gt;deleteMediaKeyEntriesForOrigin(origin);
+    completion();
+}
+
+void WebProcess::deleteEntriesModifiedBetweenDates(WKOriginDataTypes types, double startDate, double endDate, std::function&lt;void()&gt; completion)
+{
+    if (!(types &amp; kWKWebSQLDatabaseOriginData)) {
+        completion();
+        return;
+    }
+
+    WebMediaKeyStorageManager* manager = supplement&lt;WebMediaKeyStorageManager&gt;();
+    if (!manager) {
+        completion();
+        return;
+    }
+
+    manager-&gt;deleteMediaKeyEntriesModifiedBetweenDates(startDate, endDate);
+    completion();
+}
+
+void WebProcess::deleteAllEntries(WKOriginDataTypes types, std::function&lt;void()&gt; completion)
+{
+    if (!(types &amp; kWKWebSQLDatabaseOriginData)) {
+        completion();
+        return;
+    }
+    
+    WebMediaKeyStorageManager* manager = supplement&lt;WebMediaKeyStorageManager&gt;();
+    if (!manager) {
+        completion();
+        return;
+    }
+
+    manager-&gt;deleteAllMediaKeyEntries();
+    completion();
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;TextCheckerState.h&quot;
</span><span class="cx"> #include &quot;ViewUpdateDispatcher.h&quot;
</span><span class="cx"> #include &quot;VisitedLinkTable.h&quot;
</span><ins>+#include &quot;WebOriginDataManagerSupplement.h&quot;
</ins><span class="cx"> #include &lt;WebCore/SessionIDHash.h&gt;
</span><span class="cx"> #include &lt;WebCore/Timer.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="lines">@@ -69,6 +70,7 @@
</span><span class="cx"> class WebConnectionToUIProcess;
</span><span class="cx"> class WebFrame;
</span><span class="cx"> class WebIconDatabaseProxy;
</span><ins>+class WebOriginDataManager;
</ins><span class="cx"> class WebPage;
</span><span class="cx"> class WebPageGroupProxy;
</span><span class="cx"> class WebProcessSupplement;
</span><span class="lines">@@ -86,7 +88,7 @@
</span><span class="cx"> class WebToDatabaseProcessConnection;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-class WebProcess : public ChildProcess, private DownloadManager::Client {
</del><ins>+class WebProcess : public ChildProcess, public WebOriginDataManagerSupplement, private DownloadManager::Client {
</ins><span class="cx">     friend class NeverDestroyed&lt;DownloadManager&gt;;
</span><span class="cx"> public:
</span><span class="cx">     static WebProcess&amp; shared();
</span><span class="lines">@@ -288,6 +290,12 @@
</span><span class="cx">     // Implemented in generated WebProcessMessageReceiver.cpp
</span><span class="cx">     void didReceiveWebProcessMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</span><span class="cx"> 
</span><ins>+    // WebOriginDataManagerSupplement
+    virtual void getOrigins(WKOriginDataTypes, std::function&lt;void(const Vector&lt;SecurityOriginData&gt;&amp;)&gt; completion) override;
+    virtual void deleteEntriesForOrigin(WKOriginDataTypes, const SecurityOriginData&amp;, std::function&lt;void()&gt; completion) override;
+    virtual void deleteEntriesModifiedBetweenDates(WKOriginDataTypes, double startDate, double endDate, std::function&lt;void()&gt; completion) override;
+    virtual void deleteAllEntries(WKOriginDataTypes, std::function&lt;void()&gt; completion) override;
+
</ins><span class="cx">     RefPtr&lt;WebConnectionToUIProcess&gt; m_webConnection;
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;uint64_t, RefPtr&lt;WebPage&gt;&gt; m_pageMap;
</span><span class="lines">@@ -353,6 +361,8 @@
</span><span class="cx"> 
</span><span class="cx">     HashSet&lt;uint64_t&gt; m_pagesInWindows;
</span><span class="cx">     WebCore::Timer&lt;WebProcess&gt; m_nonVisibleProcessCleanupTimer;
</span><ins>+
+    std::unique_ptr&lt;WebOriginDataManager&gt; m_webOriginDataManager;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (175287 => 175288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-10-29 00:13:17 UTC (rev 175287)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-10-29 00:18:08 UTC (rev 175288)
</span><span class="lines">@@ -159,6 +159,7 @@
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.webSQLDatabaseDirectoryExtensionHandle);
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.applicationCacheDirectoryExtensionHandle);
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.diskCacheDirectoryExtensionHandle);
</span><ins>+    SandboxExtension::consumePermanently(parameters.mediaKeyStorageDirectoryExtensionHandle);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.cookieStorageDirectoryExtensionHandle);
</span><span class="cx">     SandboxExtension::consumePermanently(parameters.openGLCacheDirectoryExtensionHandle);
</span></span></pre>
</div>
</div>

</body>
</html>