<!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>[164611] trunk/Source</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/164611">164611</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-24 14:48:56 -0800 (Mon, 24 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Create SessionID value-style class for session IDs.
https://bugs.webkit.org/show_bug.cgi?id=129141

Source/WebCore:

Patch by Martin Hock &lt;mhock@apple.com&gt; on 2014-02-24
Reviewed by Brady Eidson.

* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp: Add SessionID member.
(WebCore::Page::Page):
(WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
* page/Page.h:
(WebCore::Page::setSessionID):
* page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
(WebCore::SessionID::SessionID):
(WebCore::SessionID::isValid): Not empty.
(WebCore::SessionID::isEphemeral):
(WebCore::SessionID::sessionID):
(WebCore::SessionID::operator==): Value-based equality.
(WebCore::SessionID::operator!=):
(WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
(WebCore::SessionID::defaultSessionID):
(WebCore::SessionID::legacyPrivateSessionID):
* page/SessionIDHash.h:
(WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
(WTF::SessionIDHash::equal):
(WTF::HashTraits&lt;WebCore::SessionID&gt;::emptyValue): Equal to emptySessionID.
(WTF::HashTraits&lt;WebCore::SessionID&gt;::constructDeletedValue): -1 value.
(WTF::HashTraits&lt;WebCore::SessionID&gt;::isDeletedValue):

Source/WebKit2:

The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.

Patch by Martin Hock &lt;mhock@apple.com&gt; on 2014-02-24
Reviewed by Brady Eidson.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
(WebKit::NetworkProcess::destroyPrivateBrowsingSession):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::storageSessionToID):
(WebKit::SessionTracker::sessionMap):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h: Move code to SessionID class.
* Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
(IPC::ArgumentCoder&lt;SessionID&gt;::encode):
(IPC::ArgumentCoder&lt;SessionID&gt;::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::defaultSession):
(API::Session::legacyPrivateSession):
(API::Session::Session):
(API::Session::isEphemeral):
(API::Session::getID):
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
* WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sessionID):
(WebKit::WebPage::isUsingEphemeralSession):
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcessh">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcessmessagesin">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth">trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm">trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesssoupRemoteNetworkingContextSoupcpp">trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedNetworkNetworkResourceLoadParameterscpp">trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedNetworkNetworkResourceLoadParametersh">trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h</a></li>
<li><a href="#trunkSourceWebKit2SharedSessionTrackercpp">trunk/Source/WebKit2/Shared/SessionTracker.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedSessionTrackerh">trunk/Source/WebKit2/Shared/SessionTracker.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacCookieStorageShimmm">trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPISessioncpp">trunk/Source/WebKit2/UIProcess/APISession.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPISessionh">trunk/Source/WebKit2/UIProcess/APISession.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="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContexth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContextmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContextcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContexth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</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="#trunkSourceWebKit2WebProcessWebProcessmessagesin">trunk/Source/WebKit2/WebProcess/WebProcess.messages.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageSessionIDh">trunk/Source/WebCore/page/SessionID.h</a></li>
<li><a href="#trunkSourceWebCorepageSessionIDHashh">trunk/Source/WebCore/page/SessionIDHash.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/ChangeLog        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-02-24  Martin Hock  &lt;mhock@apple.com&gt;
+
+        Create SessionID value-style class for session IDs.
+        https://bugs.webkit.org/show_bug.cgi?id=129141
+
+        Reviewed by Brady Eidson.
+
+        * GNUmakefile.list.am:
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/Page.cpp: Add SessionID member.
+        (WebCore::Page::Page):
+        (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
+        * page/Page.h:
+        (WebCore::Page::setSessionID):
+        * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
+        (WebCore::SessionID::SessionID):
+        (WebCore::SessionID::isValid): Not empty.
+        (WebCore::SessionID::isEphemeral):
+        (WebCore::SessionID::sessionID):
+        (WebCore::SessionID::operator==): Value-based equality.
+        (WebCore::SessionID::operator!=):
+        (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
+        (WebCore::SessionID::defaultSessionID):
+        (WebCore::SessionID::legacyPrivateSessionID):
+        * page/SessionIDHash.h:
+        (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
+        (WTF::SessionIDHash::equal):
+        (WTF::HashTraits&lt;WebCore::SessionID&gt;::emptyValue): Equal to emptySessionID.
+        (WTF::HashTraits&lt;WebCore::SessionID&gt;::constructDeletedValue): -1 value.
+        (WTF::HashTraits&lt;WebCore::SessionID&gt;::isDeletedValue):
+
</ins><span class="cx"> 2014-02-24  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -4181,6 +4181,7 @@
</span><span class="cx">         Source/WebCore/page/SecurityOriginHash.h \
</span><span class="cx">         Source/WebCore/page/SecurityPolicy.cpp \
</span><span class="cx">         Source/WebCore/page/SecurityPolicy.h \
</span><ins>+        Source/WebCore/page/SessionID.h \
</ins><span class="cx">         Source/WebCore/page/Settings.cpp \
</span><span class="cx">         Source/WebCore/page/Settings.h \
</span><span class="cx">         Source/WebCore/page/SpatialNavigation.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -1001,6 +1001,7 @@
</span><span class="cx"> __ZN7WebCore4Page11PageClientsD1Ev
</span><span class="cx"> __ZN7WebCore4Page12setGroupNameERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore4Page12setIsVisibleEb
</span><ins>+__ZN7WebCore4Page12setSessionIDENS_9SessionIDE
</ins><span class="cx"> __ZN7WebCore4Page12setViewStateEj
</span><span class="cx"> __ZN7WebCore4Page13rangeOfStringERKN3WTF6StringEPNS_5RangeEj
</span><span class="cx"> __ZN7WebCore4Page13setIsInWindowEb
</span><span class="lines">@@ -1740,6 +1741,7 @@
</span><span class="cx"> __ZNK7WebCore4Page34inLowQualityImageInterpolationModeEv
</span><span class="cx"> __ZNK7WebCore4Page9groupNameEv
</span><span class="cx"> __ZNK7WebCore4Page9pageCountEv
</span><ins>+__ZNK7WebCore4Page9sessionIDEv
</ins><span class="cx"> __ZNK7WebCore5Color10serializedEv
</span><span class="cx"> __ZNK7WebCore5Color7getRGBAERdS1_S1_S1_
</span><span class="cx"> __ZNK7WebCore5Color7getRGBAERfS1_S1_S1_
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -2215,6 +2215,7 @@
</span><span class="cx">                 75415D5A129AB2D2003AD669 /* JSSpeechInputResultList.h in Headers */ = {isa = PBXBuildFile; fileRef = 75415D54129AB2D2003AD669 /* JSSpeechInputResultList.h */; };
</span><span class="cx">                 7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
</span><span class="cx">                 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */; };
</span><ins>+                756B2CE118B7101600FECFAA /* SessionID.h in Headers */ = {isa = PBXBuildFile; fileRef = 756B2CE018B7101600FECFAA /* SessionID.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7578F90C11DDF26900D933C5 /* SpeechInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90911DDF26900D933C5 /* SpeechInput.h */; };
</span><span class="cx">                 7578F90D11DDF26900D933C5 /* SpeechInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */; };
</span><span class="cx">                 7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */; };
</span><span class="lines">@@ -2225,6 +2226,7 @@
</span><span class="cx">                 75793ED30D0CE85B007FC0AC /* DOMMessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793ED00D0CE85B007FC0AC /* DOMMessageEvent.h */; };
</span><span class="cx">                 75793ED40D0CE85B007FC0AC /* DOMMessageEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75793ED10D0CE85B007FC0AC /* DOMMessageEvent.mm */; };
</span><span class="cx">                 75793ED50D0CE85B007FC0AC /* DOMMessageEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793ED20D0CE85B007FC0AC /* DOMMessageEventInternal.h */; };
</span><ins>+                75DCC7B818B81C8800A57128 /* SessionIDHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 75DCC7B718B81C8800A57128 /* SessionIDHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7633A72613D8B33A008501B6 /* LocaleToScriptMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */; };
</span><span class="cx">                 7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */; };
</span><span class="cx">                 76808B50159DADFA002B5233 /* JSHTMLDialogElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 76808B4E159DADFA002B5233 /* JSHTMLDialogElement.h */; };
</span><span class="lines">@@ -9154,6 +9156,7 @@
</span><span class="cx">                 75415D54129AB2D2003AD669 /* JSSpeechInputResultList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechInputResultList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineRecordFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                756B2CE018B7101600FECFAA /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionID.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7578F90911DDF26900D933C5 /* SpeechInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInput.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9166,6 +9169,7 @@
</span><span class="cx">                 75793ED10D0CE85B007FC0AC /* DOMMessageEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMMessageEvent.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 75793ED20D0CE85B007FC0AC /* DOMMessageEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMessageEventInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 758978EB127090D60076D5A9 /* SpeechInputResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                75DCC7B718B81C8800A57128 /* SessionIDHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionIDHash.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocaleToScriptMapping.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocaleToScriptMappingDefault.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 76808B4E159DADFA002B5233 /* JSHTMLDialogElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDialogElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16186,6 +16190,8 @@
</span><span class="cx">                                 BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */,
</span><span class="cx">                                 974D2DA2146A535D00D51F8B /* SecurityPolicy.cpp */,
</span><span class="cx">                                 974D2DA3146A535D00D51F8B /* SecurityPolicy.h */,
</span><ins>+                                756B2CE018B7101600FECFAA /* SessionID.h */,
+                                75DCC7B718B81C8800A57128 /* SessionIDHash.h */,
</ins><span class="cx">                                 14C9A5E90B3D105F005A0232 /* Settings.cpp */,
</span><span class="cx">                                 F587863A02DE3A1401EA4122 /* Settings.h */,
</span><span class="cx">                                 BC59DEF8169DEDC30016AC34 /* Settings.in */,
</span><span class="lines">@@ -22730,6 +22736,7 @@
</span><span class="cx">                                 FD31601D12B0267600C1A359 /* AudioParam.h in Headers */,
</span><span class="cx">                                 FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */,
</span><span class="cx">                                 FD31602012B0267600C1A359 /* AudioProcessingEvent.h in Headers */,
</span><ins>+                                75DCC7B818B81C8800A57128 /* SessionIDHash.h in Headers */,
</ins><span class="cx">                                 FD31608412B026F700C1A359 /* AudioProcessor.h in Headers */,
</span><span class="cx">                                 FD31608612B026F700C1A359 /* AudioResampler.h in Headers */,
</span><span class="cx">                                 FD31608812B026F700C1A359 /* AudioResamplerKernel.h in Headers */,
</span><span class="lines">@@ -23934,6 +23941,7 @@
</span><span class="cx">                                 41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */,
</span><span class="cx">                                 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */,
</span><span class="cx">                                 F3D4C47912E07663003DA150 /* InspectorDOMDebuggerAgent.h in Headers */,
</span><ins>+                                756B2CE118B7101600FECFAA /* SessionID.h in Headers */,
</ins><span class="cx">                                 7A74ECBB101839A600BF939E /* InspectorDOMStorageAgent.h in Headers */,
</span><span class="cx">                                 227777601345DEA9008EA455 /* InspectorForwarding.h in Headers */,
</span><span class="cx">                                 F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/page/Page.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -181,6 +181,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
</span><span class="cx">     , m_framesHandlingBeforeUnloadEvent(0)
</span><ins>+    , m_sessionID(SessionID::emptySessionID())
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_editorClient);
</span><span class="cx"> 
</span><span class="lines">@@ -1493,6 +1494,23 @@
</span><span class="cx">         m_userContentController-&gt;addPage(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+SessionID Page::sessionID() const
+{
+    if (m_sessionID.isValid())
+        return m_sessionID;
+
+    if (settings().privateBrowsingEnabled())
+        return SessionID::legacyPrivateSessionID();
+
+    return SessionID::defaultSessionID();
+}
+
+void Page::setSessionID(SessionID sessionID)
+{
+    ASSERT(sessionID.isValid());
+    m_sessionID = sessionID;
+}
+
</ins><span class="cx"> Page::PageClients::PageClients()
</span><span class="cx">     : alternativeTextClient(nullptr)
</span><span class="cx">     , chromeClient(nullptr)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebCore/page/Page.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;Pagination.h&quot;
</span><span class="cx"> #include &quot;PlatformScreen.h&quot;
</span><span class="cx"> #include &quot;Region.h&quot;
</span><ins>+#include &quot;SessionID.h&quot;
</ins><span class="cx"> #include &quot;Supplementable.h&quot;
</span><span class="cx"> #include &quot;ViewState.h&quot;
</span><span class="cx"> #include &quot;ViewportArguments.h&quot;
</span><span class="lines">@@ -397,6 +398,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setUserContentController(UserContentController*);
</span><span class="cx">     UserContentController* userContentController() { return m_userContentController.get(); }
</span><ins>+    SessionID sessionID() const;
+    void setSessionID(SessionID);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void initGroup();
</span><span class="lines">@@ -537,6 +540,8 @@
</span><span class="cx">     unsigned m_framesHandlingBeforeUnloadEvent;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;UserContentController&gt; m_userContentController;
</span><ins>+
+    SessionID m_sessionID;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline PageGroup&amp; Page::group()
</span></span></pre></div>
<a id="trunkSourceWebCorepageSessionIDhfromrev164609trunkSourceWebKit2UIProcessAPISessionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/SessionID.h (from rev 164609, trunk/Source/WebKit2/UIProcess/APISession.h) (0 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SessionID.h                                (rev 0)
+++ trunk/Source/WebCore/page/SessionID.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -0,0 +1,52 @@
</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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 SessionID_h
+#define SessionID_h
+
+namespace WebCore {
+
+class SessionID {
+public:
+    SessionID()
+        : SessionID(emptySessionID()) { }
+    explicit SessionID(uint64_t sessionID)
+        : m_sessionID(sessionID) { }
+    bool isValid() const { return *this != emptySessionID(); }
+    bool isEphemeral() const { return *this != defaultSessionID(); }
+    uint64_t sessionID() const { return m_sessionID; }
+    bool operator==(SessionID sessionID) const { return m_sessionID == sessionID.m_sessionID; }
+    bool operator!=(SessionID sessionID) const { return m_sessionID != sessionID.m_sessionID; }
+
+    static SessionID emptySessionID() { return SessionID(0); }
+    static SessionID defaultSessionID() { return SessionID(1); }
+    static SessionID legacyPrivateSessionID() { return SessionID(2); }
+private:
+    uint64_t m_sessionID;
+};
+
+} // namespace WebCore
+
+#endif // SessionID_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepageSessionIDHashhfromrev164609trunkSourceWebKit2UIProcessAPISessionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/SessionIDHash.h (from rev 164609, trunk/Source/WebKit2/UIProcess/APISession.h) (0 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SessionIDHash.h                                (rev 0)
+++ trunk/Source/WebCore/page/SessionIDHash.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -0,0 +1,54 @@
</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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 SessionIDHash_h
+#define SessionIDHash_h
+
+#include &quot;SessionID.h&quot;
+#include &lt;wtf/HashFunctions.h&gt;
+#include &lt;wtf/HashTraits.h&gt;
+
+namespace WTF {
+
+// The empty value is emptySessionID(), the deleted value is (-1)
+struct SessionIDHash {
+    static unsigned hash(const WebCore::SessionID&amp; p) { return (unsigned)p.sessionID(); }
+    static bool equal(const WebCore::SessionID&amp; a, const WebCore::SessionID&amp; b) { return a == b; }
+    static const bool safeToCompareToEmptyOrDeleted = true;
+};
+template&lt;&gt; struct HashTraits&lt;WebCore::SessionID&gt; : GenericHashTraits&lt;WebCore::SessionID&gt; {
+    static const bool needsDestruction = false;
+    static WebCore::SessionID emptyValue() { return WebCore::SessionID::emptySessionID(); }
+
+    static void constructDeletedValue(WebCore::SessionID&amp; slot) { slot = WebCore::SessionID(-2); }
+    static bool isDeletedValue(const WebCore::SessionID&amp; slot) { return slot == WebCore::SessionID(-2); }
+};
+template&lt;&gt; struct DefaultHash&lt;WebCore::SessionID&gt; {
+    typedef SessionIDHash Hash;
+};
+
+}
+
+#endif // SessionIDHash_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -1,3 +1,95 @@
</span><ins>+2014-02-24  Martin Hock  &lt;mhock@apple.com&gt;
+
+        Create SessionID value-style class for session IDs.
+        https://bugs.webkit.org/show_bug.cgi?id=129141
+
+        The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
+
+        Reviewed by Brady Eidson.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::storageSession):
+        (WebKit::NetworkConnectionToWebProcess::startDownload):
+        (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
+        (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
+        (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
+        (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
+        (WebKit::NetworkConnectionToWebProcess::getRawCookies):
+        (WebKit::NetworkConnectionToWebProcess::deleteCookie):
+        * NetworkProcess/NetworkConnectionToWebProcess.h:
+        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
+        (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/RemoteNetworkingContext.h:
+        * NetworkProcess/mac/RemoteNetworkingContext.mm:
+        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
+        * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
+        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
+        * Shared/Network/NetworkResourceLoadParameters.cpp:
+        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
+        * Shared/Network/NetworkResourceLoadParameters.h:
+        * Shared/SessionTracker.cpp:
+        (WebKit::staticSessionMap):
+        (WebKit::storageSessionToID):
+        (WebKit::SessionTracker::sessionMap):
+        (WebKit::SessionTracker::session):
+        (WebKit::SessionTracker::sessionID):
+        (WebKit::SessionTracker::setSession):
+        (WebKit::SessionTracker::destroySession):
+        * Shared/SessionTracker.h: Move code to SessionID class.
+        * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
+        (IPC::ArgumentCoder&lt;SessionID&gt;::encode):
+        (IPC::ArgumentCoder&lt;SessionID&gt;::decode):
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/mac/CookieStorageShim.mm:
+        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
+        * UIProcess/APISession.cpp:
+        (API::generateID):
+        (API::Session::defaultSession):
+        (API::Session::legacyPrivateSession):
+        (API::Session::Session):
+        (API::Session::isEphemeral):
+        (API::Session::getID):
+        * UIProcess/APISession.h:
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
+        (WebKit::WebContext::createNewWebProcess):
+        * UIProcess/WebContext.h:
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::sessionID):
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
+        * WebProcess/Network/WebResourceLoadScheduler.cpp:
+        (WebKit::WebResourceLoadScheduler::scheduleLoad):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::loadResourceSynchronously):
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
+        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+        (WebKit::WebFrameNetworkingContext::storageSession):
+        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
+        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+        (WebKit::WebFrameNetworkingContext::storageSession):
+        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
+        * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::sessionID):
+        (WebKit::WebPage::isUsingEphemeralSession):
+        (WebKit::WebPage::setSessionID):
+        (WebKit::WebPage::updatePreferences):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::ensurePrivateBrowsingSession):
+        (WebKit::WebProcess::destroyPrivateBrowsingSession):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
</ins><span class="cx"> 2014-02-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove PDFViewController.*, which is unused
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &lt;WebCore/PlatformCookieJar.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceLoaderOptions.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -148,9 +149,9 @@
</span><span class="cx">     m_serialLoadingEnabled = enabled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static NetworkStorageSession&amp; storageSession(uint64_t sessionID)
</del><ins>+static NetworkStorageSession&amp; storageSession(SessionID sessionID)
</ins><span class="cx"> {
</span><del>-    if (SessionTracker::isEphemeralID(sessionID)) {
</del><ins>+    if (sessionID.isEphemeral()) {
</ins><span class="cx">         NetworkStorageSession* privateSession = SessionTracker::session(sessionID);
</span><span class="cx">         if (privateSession)
</span><span class="cx">             return *privateSession;
</span><span class="lines">@@ -161,7 +162,7 @@
</span><span class="cx">     return NetworkStorageSession::defaultStorageSession();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::startDownload(uint64_t sessionID, uint64_t downloadID, const ResourceRequest&amp; request)
</del><ins>+void NetworkConnectionToWebProcess::startDownload(SessionID sessionID, uint64_t downloadID, const ResourceRequest&amp; request)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Do something with the session ID.
</span><span class="cx">     NetworkProcess::shared().downloadManager().startDownload(downloadID, request);
</span><span class="lines">@@ -183,32 +184,32 @@
</span><span class="cx">     loader-&gt;didConvertHandleToDownload();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::cookiesForDOM(uint64_t sessionID, const URL&amp; firstParty, const URL&amp; url, String&amp; result)
</del><ins>+void NetworkConnectionToWebProcess::cookiesForDOM(SessionID sessionID, const URL&amp; firstParty, const URL&amp; url, String&amp; result)
</ins><span class="cx"> {
</span><span class="cx">     result = WebCore::cookiesForDOM(storageSession(sessionID), firstParty, url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::setCookiesFromDOM(uint64_t sessionID, const URL&amp; firstParty, const URL&amp; url, const String&amp; cookieString)
</del><ins>+void NetworkConnectionToWebProcess::setCookiesFromDOM(SessionID sessionID, const URL&amp; firstParty, const URL&amp; url, const String&amp; cookieString)
</ins><span class="cx"> {
</span><span class="cx">     WebCore::setCookiesFromDOM(storageSession(sessionID), firstParty, url, cookieString);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::cookiesEnabled(uint64_t sessionID, const URL&amp; firstParty, const URL&amp; url, bool&amp; result)
</del><ins>+void NetworkConnectionToWebProcess::cookiesEnabled(SessionID sessionID, const URL&amp; firstParty, const URL&amp; url, bool&amp; result)
</ins><span class="cx"> {
</span><span class="cx">     result = WebCore::cookiesEnabled(storageSession(sessionID), firstParty, url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(uint64_t sessionID, const URL&amp; firstParty, const URL&amp; url, String&amp; result)
</del><ins>+void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(SessionID sessionID, const URL&amp; firstParty, const URL&amp; url, String&amp; result)
</ins><span class="cx"> {
</span><span class="cx">     result = WebCore::cookieRequestHeaderFieldValue(storageSession(sessionID), firstParty, url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::getRawCookies(uint64_t sessionID, const URL&amp; firstParty, const URL&amp; url, Vector&lt;Cookie&gt;&amp; result)
</del><ins>+void NetworkConnectionToWebProcess::getRawCookies(SessionID sessionID, const URL&amp; firstParty, const URL&amp; url, Vector&lt;Cookie&gt;&amp; result)
</ins><span class="cx"> {
</span><span class="cx">     WebCore::getRawCookies(storageSession(sessionID), firstParty, url, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::deleteCookie(uint64_t sessionID, const URL&amp; url, const String&amp; cookieName)
</del><ins>+void NetworkConnectionToWebProcess::deleteCookie(SessionID sessionID, const URL&amp; url, const String&amp; cookieName)
</ins><span class="cx"> {
</span><span class="cx">     WebCore::deleteCookie(storageSession(sessionID), url, cookieName);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -76,15 +76,15 @@
</span><span class="cx">     void crossOriginRedirectReceived(ResourceLoadIdentifier, const WebCore::URL&amp; redirectURL);
</span><span class="cx">     void servePendingRequests(uint32_t resourceLoadPriority);
</span><span class="cx">     void setSerialLoadingEnabled(bool);
</span><del>-    void startDownload(uint64_t sessionID, uint64_t downloadID, const WebCore::ResourceRequest&amp;);
</del><ins>+    void startDownload(WebCore::SessionID, uint64_t downloadID, const WebCore::ResourceRequest&amp;);
</ins><span class="cx">     void convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const WebCore::ResourceRequest&amp;, const WebCore::ResourceResponse&amp;);
</span><span class="cx"> 
</span><del>-    void cookiesForDOM(uint64_t sessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, String&amp; result);
-    void setCookiesFromDOM(uint64_t sessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, const String&amp;);
-    void cookiesEnabled(uint64_t sessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, bool&amp; result);
-    void cookieRequestHeaderFieldValue(uint64_t sessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, String&amp; result);
-    void getRawCookies(uint64_t sessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;);
-    void deleteCookie(uint64_t sessionID, const WebCore::URL&amp;, const String&amp; cookieName);
</del><ins>+    void cookiesForDOM(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, String&amp; result);
+    void setCookiesFromDOM(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, const String&amp;);
+    void cookiesEnabled(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, bool&amp; result);
+    void cookieRequestHeaderFieldValue(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, String&amp; result);
+    void getRawCookies(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;);
+    void deleteCookie(WebCore::SessionID, const WebCore::URL&amp;, const String&amp; cookieName);
</ins><span class="cx"> 
</span><span class="cx">     void registerBlobURL(const WebCore::URL&amp;, const BlobRegistrationData&amp;);
</span><span class="cx">     void registerBlobURLFromURL(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -32,15 +32,15 @@
</span><span class="cx">     
</span><span class="cx">     SetSerialLoadingEnabled(bool enabled) -&gt; ()
</span><span class="cx"> 
</span><del>-    StartDownload(uint64_t sessionID, uint64_t downloadID, WebCore::ResourceRequest request)
</del><ins>+    StartDownload(WebCore::SessionID sessionID, uint64_t downloadID, WebCore::ResourceRequest request)
</ins><span class="cx">     ConvertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
</span><span class="cx"> 
</span><del>-    CookiesForDOM(uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (String result)
-    SetCookiesFromDOM(uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url, String cookieString)
-    CookiesEnabled(uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (bool enabled)
-    CookieRequestHeaderFieldValue(uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (String result)
-    GetRawCookies(uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (Vector&lt;WebCore::Cookie&gt; cookies)
-    DeleteCookie(uint64_t sessionID, WebCore::URL url, String cookieName)
</del><ins>+    CookiesForDOM(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (String result)
+    SetCookiesFromDOM(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url, String cookieString)
+    CookiesEnabled(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (bool enabled)
+    CookieRequestHeaderFieldValue(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (String result)
+    GetRawCookies(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (Vector&lt;WebCore::Cookie&gt; cookies)
+    DeleteCookie(WebCore::SessionID sessionID, WebCore::URL url, String cookieName)
</ins><span class="cx"> 
</span><span class="cx">     RegisterBlobURL(WebCore::URL url, WebKit::BlobRegistrationData data)
</span><span class="cx">     RegisterBlobURLFromURL(WebCore::URL url, WebCore::URL srcURL)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include &quot;WebCookieManager.h&quot;
</span><span class="cx"> #include &lt;WebCore/Logging.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -163,7 +164,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions)
</span><span class="cx">     if (parameters.privateBrowsingEnabled)
</span><del>-        RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionTracker::legacyPrivateSessionID);
</del><ins>+        RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
</ins><span class="cx"> 
</span><span class="cx">     if (parameters.shouldUseTestingNetworkSession)
</span><span class="cx">         NetworkStorageSession::switchToNewTestingSession();
</span><span class="lines">@@ -214,12 +215,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void NetworkProcess::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx">     RemoteNetworkingContext::ensurePrivateBrowsingSession(sessionID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::destroyPrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void NetworkProcess::destroyPrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx">     SessionTracker::destroySession(sessionID);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;DownloadManager.h&quot;
</span><span class="cx"> #include &quot;MessageReceiverMap.h&quot;
</span><span class="cx"> #include &quot;NetworkResourceLoadScheduler.h&quot;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -104,8 +105,8 @@
</span><span class="cx">     void didReceiveNetworkProcessMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</span><span class="cx">     void initializeNetworkProcess(const NetworkProcessCreationParameters&amp;);
</span><span class="cx">     void createNetworkConnectionToWebProcess();
</span><del>-    void ensurePrivateBrowsingSession(uint64_t sessionID);
-    void destroyPrivateBrowsingSession(uint64_t sessionID);
</del><ins>+    void ensurePrivateBrowsingSession(WebCore::SessionID);
+    void destroyPrivateBrowsingSession(WebCore::SessionID);
</ins><span class="cx">     void downloadRequest(uint64_t downloadID, const WebCore::ResourceRequest&amp;);
</span><span class="cx">     void cancelDownload(uint64_t downloadID);
</span><span class="cx">     void setCacheModel(uint32_t);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx">     UserPreferredLanguagesChanged(Vector&lt;String&gt; languages)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    EnsurePrivateBrowsingSession(uint64_t sessionID)
-    DestroyPrivateBrowsingSession(uint64_t sessionID)
</del><ins>+    EnsurePrivateBrowsingSession(WebCore::SessionID sessionID)
+    DestroyPrivateBrowsingSession(WebCore::SessionID sessionID)
</ins><span class="cx"> 
</span><span class="cx">     DownloadRequest(uint64_t downloadID, WebCore::ResourceRequest request)
</span><span class="cx">     CancelDownload(uint64_t downloadID)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &lt;WebCore/ResourceHandleClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceLoaderOptions.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -173,7 +174,7 @@
</span><span class="cx">     ResourceLoadIdentifier m_identifier;
</span><span class="cx">     uint64_t m_webPageID;
</span><span class="cx">     uint64_t m_webFrameID;
</span><del>-    uint64_t m_sessionID;
</del><ins>+    WebCore::SessionID m_sessionID;
</ins><span class="cx">     WebCore::ResourceRequest m_request;
</span><span class="cx">     WebCore::ResourceLoadPriority m_priority;
</span><span class="cx">     WebCore::ContentSniffingPolicy m_contentSniffingPolicy;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -28,24 +28,25 @@
</span><span class="cx"> #define RemoteNetworkingContext_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/NetworkingContext.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class RemoteNetworkingContext final : public WebCore::NetworkingContext {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;RemoteNetworkingContext&gt; create(uint64_t sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
</del><ins>+    static PassRefPtr&lt;RemoteNetworkingContext&gt; create(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new RemoteNetworkingContext(sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect));
</span><span class="cx">     }
</span><span class="cx">     virtual ~RemoteNetworkingContext();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Remove platform-specific code and use SessionTracker.
</span><del>-    static void ensurePrivateBrowsingSession(uint64_t sessionID);
</del><ins>+    static void ensurePrivateBrowsingSession(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx">     virtual bool shouldClearReferrerOnHTTPSToHTTPRedirect() const override { return m_shouldClearReferrerOnHTTPSToHTTPRedirect; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    RemoteNetworkingContext(uint64_t sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
</del><ins>+    RemoteNetworkingContext(WebCore::SessionID sessionID, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
</ins><span class="cx">         : m_sessionID(sessionID)
</span><span class="cx">         , m_shouldClearReferrerOnHTTPSToHTTPRedirect(shouldClearReferrerOnHTTPSToHTTPRedirect)
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx">     virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&amp;) const override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    uint64_t m_sessionID;
</del><ins>+    WebCore::SessionID m_sessionID;
</ins><span class="cx">     bool m_shouldClearReferrerOnHTTPSToHTTPRedirect;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -77,15 +77,15 @@
</span><span class="cx">     return WebKit::blockedError(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><del>-    ASSERT(SessionTracker::isEphemeralID(sessionID));
</del><ins>+    ASSERT(sessionID.isEphemeral());
</ins><span class="cx"> 
</span><span class="cx">     if (SessionTracker::session(sessionID))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!SessionTracker::getIdentifierBase().isNull());
</span><del>-    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(SessionTracker::getIdentifierBase() + '.' + String::number(sessionID)));
</del><ins>+    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(SessionTracker::getIdentifierBase() + '.' + String::number(sessionID.sessionID())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesssoupRemoteNetworkingContextSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNetworkNetworkResourceLoadParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     : identifier(0)
</span><span class="cx">     , webPageID(0)
</span><span class="cx">     , webFrameID(0)
</span><del>-    , sessionID(0)
</del><ins>+    , sessionID(SessionID::emptySessionID())
</ins><span class="cx">     , priority(ResourceLoadPriorityVeryLow)
</span><span class="cx">     , contentSniffingPolicy(SniffContent)
</span><span class="cx">     , allowStoredCredentials(DoNotAllowStoredCredentials)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNetworkNetworkResourceLoadParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &lt;WebCore/ResourceHandle.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceLoaderOptions.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> 
</span><span class="lines">@@ -52,7 +53,7 @@
</span><span class="cx">     ResourceLoadIdentifier identifier;
</span><span class="cx">     uint64_t webPageID;
</span><span class="cx">     uint64_t webFrameID;
</span><del>-    uint64_t sessionID;
</del><ins>+    WebCore::SessionID sessionID;
</ins><span class="cx">     WebCore::ResourceRequest request;
</span><span class="cx">     SandboxExtension::HandleArray requestBodySandboxExtensions; // Created automatically for the sender.
</span><span class="cx">     SandboxExtension::Handle resourceSandboxExtension; // Created automatically for the sender.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedSessionTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/SessionTracker.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/SessionTracker.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/SessionTracker.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -33,22 +33,19 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-const uint64_t SessionTracker::defaultSessionID;
-const uint64_t SessionTracker::legacyPrivateSessionID;
-
-static HashMap&lt;uint64_t, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&amp; staticSessionMap()
</del><ins>+static HashMap&lt;SessionID, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&amp; staticSessionMap()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    static NeverDestroyed&lt;HashMap&lt;uint64_t, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&gt; map;
</del><ins>+    static NeverDestroyed&lt;HashMap&lt;SessionID, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&gt; map;
</ins><span class="cx">     return map.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashMap&lt;const NetworkStorageSession*, uint64_t&gt;&amp; storageSessionToID()
</del><ins>+static HashMap&lt;const NetworkStorageSession*, SessionID&gt;&amp; storageSessionToID()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    static NeverDestroyed&lt;HashMap&lt;const NetworkStorageSession*, uint64_t&gt;&gt; map;
</del><ins>+    static NeverDestroyed&lt;HashMap&lt;const NetworkStorageSession*, SessionID&gt;&gt; map;
</ins><span class="cx">     return map.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -60,7 +57,7 @@
</span><span class="cx">     return base;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const HashMap&lt;uint64_t, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&amp; SessionTracker::sessionMap()
</del><ins>+const HashMap&lt;SessionID, std::unique_ptr&lt;NetworkStorageSession&gt;&gt;&amp; SessionTracker::sessionMap()
</ins><span class="cx"> {
</span><span class="cx">     return staticSessionMap();
</span><span class="cx"> }
</span><span class="lines">@@ -70,28 +67,28 @@
</span><span class="cx">     return identifierBase();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NetworkStorageSession* SessionTracker::session(uint64_t sessionID)
</del><ins>+NetworkStorageSession* SessionTracker::session(SessionID sessionID)
</ins><span class="cx"> {
</span><del>-    if (sessionID == defaultSessionID)
</del><ins>+    if (sessionID == SessionID::defaultSessionID())
</ins><span class="cx">         return &amp;NetworkStorageSession::defaultStorageSession();
</span><span class="cx">     return staticSessionMap().get(sessionID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t SessionTracker::sessionID(const NetworkStorageSession&amp; session)
</del><ins>+SessionID SessionTracker::sessionID(const NetworkStorageSession&amp; session)
</ins><span class="cx"> {
</span><span class="cx">     if (&amp;session == &amp;NetworkStorageSession::defaultStorageSession())
</span><del>-        return defaultSessionID;
</del><ins>+        return SessionID::defaultSessionID();
</ins><span class="cx">     return storageSessionToID().get(&amp;session);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SessionTracker::setSession(uint64_t sessionID, std::unique_ptr&lt;NetworkStorageSession&gt; session)
</del><ins>+void SessionTracker::setSession(SessionID sessionID, std::unique_ptr&lt;NetworkStorageSession&gt; session)
</ins><span class="cx"> {
</span><del>-    ASSERT(sessionID != defaultSessionID);
</del><ins>+    ASSERT(sessionID != SessionID::defaultSessionID());
</ins><span class="cx">     storageSessionToID().set(session.get(), sessionID);
</span><span class="cx">     staticSessionMap().set(sessionID, std::move(session));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SessionTracker::destroySession(uint64_t sessionID)
</del><ins>+void SessionTracker::destroySession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx">     if (staticSessionMap().contains(sessionID)) {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedSessionTrackerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/SessionTracker.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/SessionTracker.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/SessionTracker.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define SessionTracker_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/NetworkStorageSession.h&gt;
</span><ins>+#include &lt;WebCore/SessionIDHash.h&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="lines">@@ -36,16 +37,13 @@
</span><span class="cx"> class SessionTracker {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(SessionTracker);
</span><span class="cx"> public:
</span><del>-    static const uint64_t defaultSessionID = 1;
-    static const uint64_t legacyPrivateSessionID = 2;
-    static bool isEphemeralID(uint64_t sessionID) { return sessionID != SessionTracker::defaultSessionID; }
</del><span class="cx">     // FIXME: sessionMap()'s returned map does not include default session.
</span><del>-    static const HashMap&lt;uint64_t, std::unique_ptr&lt;WebCore::NetworkStorageSession&gt;&gt;&amp; sessionMap();
</del><ins>+    static const HashMap&lt;WebCore::SessionID, std::unique_ptr&lt;WebCore::NetworkStorageSession&gt;&gt;&amp; sessionMap();
</ins><span class="cx">     static const String&amp; getIdentifierBase();
</span><del>-    static WebCore::NetworkStorageSession* session(uint64_t sessionID);
-    static uint64_t sessionID(const WebCore::NetworkStorageSession&amp;);
-    static void setSession(uint64_t sessionID, std::unique_ptr&lt;WebCore::NetworkStorageSession&gt;);
-    static void destroySession(uint64_t sessionID);
</del><ins>+    static WebCore::NetworkStorageSession* session(WebCore::SessionID);
+    static WebCore::SessionID sessionID(const WebCore::NetworkStorageSession&amp;);
+    static void setSession(WebCore::SessionID, std::unique_ptr&lt;WebCore::NetworkStorageSession&gt;);
+    static void destroySession(WebCore::SessionID);
</ins><span class="cx">     static void setIdentifierBase(const String&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include &lt;WebCore/ResourceResponse.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollingConstraints.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollingCoordinator.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/TextCheckerClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/TransformationMatrix.h&gt;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="lines">@@ -1880,6 +1881,23 @@
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx"> 
</span><ins>+#endif // ENABLE(INDEXED_DATABASE)
+
+void ArgumentCoder&lt;SessionID&gt;::encode(ArgumentEncoder&amp; encoder, const SessionID&amp; sessionID)
+{
+    encoder &lt;&lt; sessionID.sessionID();
+}
+
+bool ArgumentCoder&lt;SessionID&gt;::decode(ArgumentDecoder&amp; decoder, SessionID&amp; sessionID)
+{
+    uint64_t session;
+    if (!decoder.decode(session))
+        return false;
+
+    sessionID = SessionID(session);
+
+    return true;
+}
+
</ins><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> class ResourceError;
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> class ResourceResponse;
</span><ins>+class SessionID;
</ins><span class="cx"> class StickyPositionViewportConstraints;
</span><span class="cx"> class TextCheckingRequestData;
</span><span class="cx"> class TransformationMatrix;
</span><span class="lines">@@ -397,8 +398,14 @@
</span><span class="cx">     static void encode(ArgumentEncoder&amp;, const WebCore::IDBObjectStoreMetadata&amp;);
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::IDBObjectStoreMetadata&amp;);
</span><span class="cx"> };
</span><del>-#endif
</del><span class="cx"> 
</span><ins>+#endif // ENABLE(INDEXED_DATABASE)
+
+template&lt;&gt; struct ArgumentCoder&lt;WebCore::SessionID&gt; {
+    static void encode(ArgumentEncoder&amp;, const WebCore::SessionID&amp;);
+    static bool decode(ArgumentDecoder&amp;, WebCore::SessionID&amp;);
+};
+
</ins><span class="cx"> } // namespace IPC
</span><span class="cx"> 
</span><span class="cx"> #endif // WebCoreArgumentCoders_h
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacCookieStorageShimmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include &quot;CookieStorageShimLibrary.h&quot;
</span><span class="cx"> #include &quot;NetworkConnectionToWebProcess.h&quot;
</span><span class="cx"> #include &quot;NetworkProcessConnection.h&quot;
</span><del>-#include &quot;SessionTracker.h&quot;
</del><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;WebProcess.h&quot;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> {
</span><span class="cx">     String cookies;
</span><span class="cx">     URL firstPartyForCookiesURL;
</span><del>-    if (!WebProcess::shared().networkConnection()-&gt;connection()-&gt;sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionTracker::defaultSessionID, firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
</del><ins>+    if (!WebProcess::shared().networkConnection()-&gt;connection()-&gt;sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     if (cookies.isNull())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPISessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/APISession.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APISession.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/UIProcess/APISession.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    static uint64_t uniqueSessionID = WebKit::SessionTracker::legacyPrivateSessionID;
</del><ins>+    static uint64_t uniqueSessionID = WebCore::SessionID::legacyPrivateSessionID().sessionID();
</ins><span class="cx">     ASSERT(isEphemeral);
</span><span class="cx">     return ++uniqueSessionID;
</span><span class="cx"> }
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    static Session* defaultSession = new Session(false, WebKit::SessionTracker::defaultSessionID);
</del><ins>+    static Session* defaultSession = new Session(WebCore::SessionID::defaultSessionID());
</ins><span class="cx">     return *defaultSession;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -51,19 +51,17 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    static Session* legacyPrivateSession = new Session(true, WebKit::SessionTracker::legacyPrivateSessionID);
</del><ins>+    static Session* legacyPrivateSession = new Session(WebCore::SessionID::legacyPrivateSessionID());
</ins><span class="cx">     return *legacyPrivateSession;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Session::Session(bool isEphemeral)
</span><del>-    : m_isEphemeral(isEphemeral)
-    , m_sessionID(generateID(isEphemeral))
</del><ins>+    : m_sessionID(generateID(isEphemeral))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Session::Session(bool isEphemeral, uint64_t sessionID)
-    : m_isEphemeral(isEphemeral)
-    , m_sessionID(sessionID)
</del><ins>+Session::Session(WebCore::SessionID sessionID)
+    : m_sessionID(sessionID)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -75,10 +73,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool Session::isEphemeral() const
</span><span class="cx"> {
</span><del>-    return m_isEphemeral;
</del><ins>+    return m_sessionID.isEphemeral();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t Session::getID() const
</del><ins>+WebCore::SessionID Session::getID() const
</ins><span class="cx"> {
</span><span class="cx">     return m_sessionID;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPISessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/APISession.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APISession.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/UIProcess/APISession.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #define APISession_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><del>-#include &quot;SessionTracker.h&quot;
</del><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace API {
</span><span class="lines">@@ -39,14 +39,13 @@
</span><span class="cx">     static Session&amp; defaultSession();
</span><span class="cx">     static Session&amp; legacyPrivateSession();
</span><span class="cx">     bool isEphemeral() const;
</span><del>-    uint64_t getID() const;
</del><ins>+    WebCore::SessionID getID() const;
</ins><span class="cx">     virtual ~Session();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit Session(bool isEphemeral);
</span><del>-    Session(bool isEphemeral, uint64_t sessionID);
-    bool m_isEphemeral;
-    uint64_t m_sessionID;
</del><ins>+    explicit Session(WebCore::SessionID);
+    WebCore::SessionID m_sessionID;
</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 (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;MutableDictionary.h&quot;
</span><span class="cx"> #include &quot;SandboxExtension.h&quot;
</span><del>-#include &quot;SessionTracker.h&quot;
</del><span class="cx"> #include &quot;StatisticsData.h&quot;
</span><span class="cx"> #include &quot;TextChecker.h&quot;
</span><span class="cx"> #include &quot;WKContextPrivate.h&quot;
</span><span class="lines">@@ -63,6 +62,7 @@
</span><span class="cx"> #include &lt;WebCore/LinkHash.h&gt;
</span><span class="cx"> #include &lt;WebCore/Logging.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;runtime/JSCInlines.h&gt;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="lines">@@ -486,16 +486,16 @@
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx">     if (usesNetworkProcess() &amp;&amp; networkProcess()) {
</span><span class="cx">         if (privateBrowsingEnabled)
</span><del>-            networkProcess()-&gt;send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(SessionTracker::legacyPrivateSessionID), 0);
</del><ins>+            networkProcess()-&gt;send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
</ins><span class="cx">         else
</span><del>-            networkProcess()-&gt;send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(SessionTracker::legacyPrivateSessionID), 0);
</del><ins>+            networkProcess()-&gt;send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
</ins><span class="cx">     }
</span><span class="cx"> #endif // ENABLED(NETWORK_PROCESS)
</span><span class="cx"> 
</span><span class="cx">     if (privateBrowsingEnabled)
</span><del>-        sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionTracker::legacyPrivateSessionID));
</del><ins>+        sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
</ins><span class="cx">     else
</span><del>-        sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession(SessionTracker::legacyPrivateSessionID));
</del><ins>+        sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void (*s_invalidMessageCallback)(WKStringRef messageName);
</span><span class="lines">@@ -625,7 +625,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (WebPreferences::anyPagesAreUsingPrivateBrowsing())
</span><del>-        process-&gt;send(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionTracker::legacyPrivateSessionID), 0);
</del><ins>+        process-&gt;send(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
</ins><span class="cx"> 
</span><span class="cx">     m_processes.append(process);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #include &quot;WebDownloadClient.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/LinkHash.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -306,7 +307,7 @@
</span><span class="cx">     static void willStartUsingPrivateBrowsing();
</span><span class="cx">     static void willStopUsingPrivateBrowsing();
</span><span class="cx"> 
</span><del>-    static bool isEphemeralSession(uint64_t sessionID);
</del><ins>+    static bool isEphemeralSession(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><span class="cx">     void setIgnoreTLSErrors(bool);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">     void setSession(API::Session&amp;);
</span><span class="cx"> 
</span><span class="cx">     uint64_t pageID() const { return m_pageID; }
</span><del>-    uint64_t sessionID() const { return m_session-&gt;getID(); }
</del><ins>+    WebCore::SessionID sessionID() const { return m_session-&gt;getID(); }
</ins><span class="cx"> 
</span><span class="cx">     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
</span><span class="cx">     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #include &lt;WebCore/ScriptController.h&gt;
</span><span class="cx"> #include &lt;WebCore/SecurityOrigin.h&gt;
</span><span class="cx"> #include &lt;WebCore/SecurityPolicy.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Settings.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserGestureIndicator.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -308,9 +309,9 @@
</span><span class="cx">     // FIXME (NetworkProcess): This test-only function doesn't work with NetworkProcess, &lt;https://bugs.webkit.org/show_bug.cgi?id=115274&gt;.
</span><span class="cx"> #if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
</span><span class="cx">     if (enabled)
</span><del>-        WebFrameNetworkingContext::ensurePrivateBrowsingSession(SessionTracker::legacyPrivateSessionID);
</del><ins>+        WebFrameNetworkingContext::ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
</ins><span class="cx">     else
</span><del>-        SessionTracker::destroySession(SessionTracker::legacyPrivateSessionID);
</del><ins>+        SessionTracker::destroySession(SessionID::legacyPrivateSessionID());
</ins><span class="cx"> #endif
</span><span class="cx">     const HashSet&lt;Page*&gt;&amp; pages = PageGroup::pageGroup(pageGroup-&gt;identifier())-&gt;pages();
</span><span class="cx">     for (HashSet&lt;Page*&gt;::iterator iter = pages.begin(); iter != pages.end(); ++iter)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &lt;WebCore/ReferrerPolicy.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceBuffer.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceLoader.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Settings.h&gt;
</span><span class="cx"> #include &lt;WebCore/SubresourceLoader.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="lines">@@ -118,7 +119,7 @@
</span><span class="cx">     loadParameters.identifier = identifier;
</span><span class="cx">     loadParameters.webPageID = webPage ? webPage-&gt;pageID() : 0;
</span><span class="cx">     loadParameters.webFrameID = webFrame ? webFrame-&gt;frameID() : 0;
</span><del>-    loadParameters.sessionID = webPage ? webPage-&gt;sessionID() : SessionTracker::defaultSessionID;
</del><ins>+    loadParameters.sessionID = webPage ? webPage-&gt;sessionID() : SessionID::defaultSessionID();
</ins><span class="cx">     loadParameters.request = resourceLoader-&gt;request();
</span><span class="cx">     loadParameters.priority = priority;
</span><span class="cx">     loadParameters.contentSniffingPolicy = contentSniffingPolicy;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #include &lt;WebCore/PlatformCookieJar.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformPasteboard.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceError.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/StorageNamespace.h&gt;
</span><span class="cx"> #include &lt;WebCore/SubframeLoader.h&gt;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="lines">@@ -263,7 +264,7 @@
</span><span class="cx">     loadParameters.identifier = resourceLoadIdentifier;
</span><span class="cx">     loadParameters.webPageID = webPage ? webPage-&gt;pageID() : 0;
</span><span class="cx">     loadParameters.webFrameID = webFrame ? webFrame-&gt;frameID() : 0;
</span><del>-    loadParameters.sessionID = webPage ? webPage-&gt;sessionID() : SessionTracker::defaultSessionID;
</del><ins>+    loadParameters.sessionID = webPage ? webPage-&gt;sessionID() : SessionID::defaultSessionID();
</ins><span class="cx">     loadParameters.request = request;
</span><span class="cx">     loadParameters.priority = ResourceLoadPriorityHighest;
</span><span class="cx">     loadParameters.contentSniffingPolicy = SniffContent;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;HTTPCookieAcceptPolicy.h&quot;
</span><span class="cx"> #include &quot;WebFrame.h&quot;
</span><span class="cx"> #include &lt;WebCore/FrameNetworkingContext.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -40,7 +41,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: remove platform-specific code and use SessionTracker
</span><del>-    static void ensurePrivateBrowsingSession(uint64_t sessionID);
</del><ins>+    static void ensurePrivateBrowsingSession(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx">     static void setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -42,9 +42,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx">     
</span><del>-void WebFrameNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void WebFrameNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><del>-    ASSERT(SessionTracker::isEphemeralID(sessionID));
</del><ins>+    ASSERT(sessionID.isEphemeral());
</ins><span class="cx"> 
</span><span class="cx">     if (SessionTracker::session(sessionID))
</span><span class="cx">         return;
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     else
</span><span class="cx">         base = SessionTracker::getIdentifierBase();
</span><span class="cx"> 
</span><del>-    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(base + '.' + String::number(sessionID)));
</del><ins>+    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(base + '.' + String::number(sessionID.sessionID())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy policy)
</span><span class="lines">@@ -101,10 +101,7 @@
</span><span class="cx"> NetworkStorageSession&amp; WebFrameNetworkingContext::storageSession() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><del>-
-    if (frame())
-        return *SessionTracker::session(webFrameLoaderClient()-&gt;webFrame()-&gt;page()-&gt;sessionID());
-    return NetworkStorageSession::defaultStorageSession();
</del><ins>+    return *SessionTracker::session(frame() ? frame()-&gt;page()-&gt;sessionID() : SessionID::defaultSessionID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;SessionTracker.h&quot;
</span><span class="cx"> #include &quot;WebFrame.h&quot;
</span><span class="cx"> #include &quot;WebPage.h&quot;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Settings.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -37,14 +38,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-void WebFrameNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void WebFrameNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     if (SessionTracker::session(sessionID))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(String::number(sessionID)));
</del><ins>+    SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(String::number(sessionID.sessionID())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebFrameNetworkingContext::WebFrameNetworkingContext(WebFrame* frame)
</span><span class="lines">@@ -55,7 +56,7 @@
</span><span class="cx"> NetworkStorageSession&amp; WebFrameNetworkingContext::storageSession() const
</span><span class="cx"> {
</span><span class="cx">     if (frame() &amp;&amp; frame()-&gt;settings().privateBrowsingEnabled())
</span><del>-        return *SessionTracker::session(SessionTracker::legacyPrivateSessionID);
</del><ins>+        return *SessionTracker::session(SessionID::legacyPrivateSessionID());
</ins><span class="cx"> 
</span><span class="cx">     return NetworkStorageSession::defaultStorageSession();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportsoupWebFrameNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #define WebFrameNetworkingContext_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/FrameNetworkingContext.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -42,7 +43,7 @@
</span><span class="cx">         return adoptRef(new WebFrameNetworkingContext(frame));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static void ensurePrivateBrowsingSession(uint64_t sessionID);
</del><ins>+    static void ensurePrivateBrowsingSession(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx">     WebFrameLoaderClient* webFrameLoaderClient() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx"> #include &lt;WebCore/SchemeRegistry.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScriptController.h&gt;
</span><span class="cx"> #include &lt;WebCore/SerializedScriptValue.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Settings.h&gt;
</span><span class="cx"> #include &lt;WebCore/ShadowRoot.h&gt;
</span><span class="cx"> #include &lt;WebCore/SharedBuffer.h&gt;
</span><span class="lines">@@ -226,7 +227,6 @@
</span><span class="cx"> 
</span><span class="cx"> WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters&amp; parameters)
</span><span class="cx">     : m_pageID(pageID)
</span><del>-    , m_sessionID(0)
</del><span class="cx">     , m_viewSize(parameters.viewSize)
</span><span class="cx">     , m_hasSeenPlugin(false)
</span><span class="cx">     , m_useFixedLayout(false)
</span><span class="lines">@@ -2106,23 +2106,23 @@
</span><span class="cx">         pluginView-&gt;setLayerHostingMode(m_layerHostingMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPage::sessionID() const
</del><ins>+SessionID WebPage::sessionID() const
</ins><span class="cx"> {
</span><del>-    if (m_sessionID)
-        return m_sessionID;
</del><ins>+    if (m_page-&gt;sessionID().isValid())
+        return m_page-&gt;sessionID();
</ins><span class="cx"> 
</span><del>-    return m_page-&gt;settings().privateBrowsingEnabled() ? SessionTracker::legacyPrivateSessionID : SessionTracker::defaultSessionID;
</del><ins>+    return m_page-&gt;settings().privateBrowsingEnabled() ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPage::isUsingEphemeralSession() const
</span><span class="cx"> {
</span><del>-    return SessionTracker::isEphemeralID(sessionID());
</del><ins>+    return sessionID().isEphemeral();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::setSessionID(uint64_t sessionID)
</del><ins>+void WebPage::setSessionID(SessionID sessionID)
</ins><span class="cx"> {
</span><del>-    m_sessionID = sessionID;
-    if (SessionTracker::isEphemeralID(sessionID))
</del><ins>+    m_page-&gt;setSessionID(sessionID);
+    if (sessionID.isEphemeral())
</ins><span class="cx">         WebProcess::shared().ensurePrivateBrowsingSession(sessionID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2428,8 +2428,8 @@
</span><span class="cx">     settings.setLocalStorageEnabled(store.getBoolValueForKey(WebPreferencesKey::localStorageEnabledKey()));
</span><span class="cx">     settings.setXSSAuditorEnabled(store.getBoolValueForKey(WebPreferencesKey::xssAuditorEnabledKey()));
</span><span class="cx">     settings.setFrameFlatteningEnabled(store.getBoolValueForKey(WebPreferencesKey::frameFlatteningEnabledKey()));
</span><del>-    if (m_sessionID)
-        settings.setPrivateBrowsingEnabled(SessionTracker::isEphemeralID(m_sessionID));
</del><ins>+    if (m_page-&gt;sessionID().isValid())
+        settings.setPrivateBrowsingEnabled(m_page-&gt;sessionID().isEphemeral());
</ins><span class="cx">     else
</span><span class="cx">         settings.setPrivateBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::privateBrowsingEnabledKey()));
</span><span class="cx">     settings.setDeveloperExtrasEnabled(store.getBoolValueForKey(WebPreferencesKey::developerExtrasEnabledKey()));
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -186,9 +186,9 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::Page* corePage() const { return m_page.get(); }
</span><span class="cx">     uint64_t pageID() const { return m_pageID; }
</span><del>-    uint64_t sessionID() const;
</del><ins>+    WebCore::SessionID sessionID() const;
</ins><span class="cx">     bool isUsingEphemeralSession() const;
</span><del>-    void setSessionID(uint64_t);
</del><ins>+    void setSessionID(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx">     void setSize(const WebCore::IntSize&amp;);
</span><span class="cx">     const WebCore::IntSize&amp; size() const { return m_viewSize; }
</span><span class="lines">@@ -908,7 +908,6 @@
</span><span class="cx">     void reportUsedFeatures();
</span><span class="cx"> 
</span><span class="cx">     uint64_t m_pageID;
</span><del>-    uint64_t m_sessionID;
</del><span class="cx"> 
</span><span class="cx">     OwnPtr&lt;WebCore::Page&gt; m_page;
</span><span class="cx">     RefPtr&lt;WebFrame&gt; m_mainFrame;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">     SetViewState(unsigned viewState, bool wantsDidUpdateViewState)
</span><span class="cx">     SetLayerHostingMode(unsigned layerHostingMode)
</span><span class="cx"> 
</span><del>-    SetSessionID(uint64_t sessionID)
</del><ins>+    SetSessionID(WebCore::SessionID sessionID)
</ins><span class="cx"> 
</span><span class="cx">     SetDrawsBackground(bool drawsBackground)
</span><span class="cx">     SetDrawsTransparentBackground(bool drawsTransparentBackground)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -465,14 +465,14 @@
</span><span class="cx">     m_fullKeyboardAccessEnabled = fullKeyboardAccessEnabled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebProcess::ensurePrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void WebProcess::ensurePrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
</span><span class="cx">     WebFrameNetworkingContext::ensurePrivateBrowsingSession(sessionID);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebProcess::destroyPrivateBrowsingSession(uint64_t sessionID)
</del><ins>+void WebProcess::destroyPrivateBrowsingSession(SessionID sessionID)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
</span><span class="cx">     SessionTracker::destroySession(sessionID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;TextCheckerState.h&quot;
</span><span class="cx"> #include &quot;VisitedLinkTable.h&quot;
</span><span class="cx"> #include &lt;WebCore/LinkHash.h&gt;
</span><ins>+#include &lt;WebCore/SessionID.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Timer.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="lines">@@ -163,8 +164,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setCacheModel(uint32_t);
</span><span class="cx"> 
</span><del>-    void ensurePrivateBrowsingSession(uint64_t sessionID);
-    void destroyPrivateBrowsingSession(uint64_t sessionID);
</del><ins>+    void ensurePrivateBrowsingSession(WebCore::SessionID);
+    void destroyPrivateBrowsingSession(WebCore::SessionID);
</ins><span class="cx"> 
</span><span class="cx">     void pageDidEnterWindow(uint64_t pageID);
</span><span class="cx">     void pageWillLeaveWindow(uint64_t pageID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.messages.in (164610 => 164611)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2014-02-24 22:48:54 UTC (rev 164610)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2014-02-24 22:48:56 UTC (rev 164611)
</span><span class="lines">@@ -55,8 +55,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Legacy private browsing session is per process. Individual pages or page groups may use the private session or the default one as appropriate.
</span><del>-    EnsurePrivateBrowsingSession(uint64_t sessionID)
-    DestroyPrivateBrowsingSession(uint64_t sessionID)
</del><ins>+    EnsurePrivateBrowsingSession(WebCore::SessionID sessionID)
+    DestroyPrivateBrowsingSession(WebCore::SessionID sessionID)
</ins><span class="cx"> 
</span><span class="cx">     # Plug-ins.
</span><span class="cx">     DidAddPlugInAutoStartOriginHash(uint32_t hash, double expirationTime)
</span></span></pre>
</div>
</div>

</body>
</html>