Web Inspector: Network resource identifier should have RequestId type and requestId...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 11:44:55 +0000 (11:44 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 11:44:55 +0000 (11:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=66061

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ConsoleMessage.h:
* inspector/IdentifiersFactory.cpp:
(WebCore::IdentifiersFactory::requestId):
* inspector/IdentifiersFactory.h:
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::markResourceAsCached):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::setInitialScriptContent):
(WebCore::InspectorResourceAgent::didReceiveScriptResponse):
(WebCore::InspectorResourceAgent::setInitialXHRContent):
(WebCore::InspectorResourceAgent::didReceiveXHRResponse):
(WebCore::InspectorResourceAgent::didCreateWebSocket):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::getResourceContent):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willSendResourceRequest):
(WebCore::InspectorTimelineAgent::willReceiveResourceData):
(WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
(WebCore::InspectorTimelineAgent::didFinishLoadingResource):
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::ResourceData):
(WebCore::NetworkResourcesData::resourceCreated):
(WebCore::NetworkResourcesData::responseReceived):
(WebCore::NetworkResourcesData::setResourceType):
(WebCore::NetworkResourcesData::resourceType):
(WebCore::NetworkResourcesData::setResourceContent):
(WebCore::NetworkResourcesData::maybeAddResourceData):
(WebCore::NetworkResourcesData::maybeDecodeDataToContent):
(WebCore::NetworkResourcesData::addCachedResource):
(WebCore::NetworkResourcesData::addResourceSharedBuffer):
(WebCore::NetworkResourcesData::data):
(WebCore::NetworkResourcesData::clear):
(WebCore::NetworkResourcesData::ensureNoDataForRequestId):
(WebCore::NetworkResourcesData::ensureFreeSpace):
* inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::ResourceData::requestId):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createResourceSendRequestData):
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
(WebCore::TimelineRecordFactory::createResourceFinishData):
(WebCore::TimelineRecordFactory::createReceiveResourceData):
* inspector/TimelineRecordFactory.h:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
* inspector/front-end/ExtensionAPI.js:
(WebInspector.injectedExtensionAPI.Resources.prototype.getHAR):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer):
(WebInspector.ExtensionServer.prototype._notifyResourceFinished):
(WebInspector.ExtensionServer.prototype._onGetHAR):
(WebInspector.ExtensionServer.prototype._requestId):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager.prototype.requestContent):
(WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
(WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
(WebInspector.NetworkDispatcher.prototype.responseReceived):
(WebInspector.NetworkDispatcher.prototype.dataReceived):
(WebInspector.NetworkDispatcher.prototype.loadingFinished):
(WebInspector.NetworkDispatcher.prototype.loadingFailed):
(WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
(WebInspector.NetworkDispatcher.prototype.webSocketCreated):
(WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
(WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
(WebInspector.NetworkDispatcher.prototype.webSocketClosed):
(WebInspector.NetworkDispatcher.prototype._appendRedirect):
(WebInspector.NetworkDispatcher.prototype._startResource):
(WebInspector.NetworkDispatcher.prototype._finishResource):
(WebInspector.NetworkDispatcher.prototype._createResource):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._appendResource):
(WebInspector.NetworkLogView.prototype._matchResource):
(WebInspector.NetworkLogView.prototype._updateSearchMatchedListAfterRequestIdChanged):
(WebInspector.NetworkLogView.prototype.performSearch):
* inspector/front-end/Resource.js:
(WebInspector.Resource):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._addRecordToTimeline):
(WebInspector.TimelinePanel.prototype._findParentRecord):
(WebInspector.TimelinePanel.FormattedRecord):

LayoutTests:

* http/tests/inspector/network/download.html:
* http/tests/inspector/network/x-frame-options-deny.html:
* inspector/timeline/timeline-load.html:
* inspector/timeline/timeline-network-resource-expected.txt:
* inspector/timeline/timeline-network-resource.html:
* inspector/timeline/timeline-test.js:
* platform/chromium/inspector/timeline/timeline-network-resource-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/download.html
LayoutTests/http/tests/inspector/network/x-frame-options-deny.html
LayoutTests/inspector/timeline/timeline-load.html
LayoutTests/inspector/timeline/timeline-network-resource-expected.txt
LayoutTests/inspector/timeline/timeline-network-resource.html
LayoutTests/inspector/timeline/timeline-test.js
LayoutTests/platform/chromium/inspector/timeline/timeline-network-resource-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/inspector/ConsoleMessage.cpp
Source/WebCore/inspector/ConsoleMessage.h
Source/WebCore/inspector/IdentifiersFactory.cpp
Source/WebCore/inspector/IdentifiersFactory.h
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorConsoleAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/NetworkResourcesData.cpp
Source/WebCore/inspector/NetworkResourcesData.h
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/TimelineRecordFactory.h
Source/WebCore/inspector/front-end/ConsoleView.js
Source/WebCore/inspector/front-end/ExtensionAPI.js
Source/WebCore/inspector/front-end/ExtensionServer.js
Source/WebCore/inspector/front-end/NetworkManager.js
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/inspector/front-end/TimelinePanel.js

index 10ba25d..9f4ba88 100644 (file)
@@ -1,3 +1,18 @@
+2011-08-12  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Network resource identifier should have RequestId type and requestId name in protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=66061
+
+        Reviewed by Pavel Feldman.
+
+        * http/tests/inspector/network/download.html:
+        * http/tests/inspector/network/x-frame-options-deny.html:
+        * inspector/timeline/timeline-load.html:
+        * inspector/timeline/timeline-network-resource-expected.txt:
+        * inspector/timeline/timeline-network-resource.html:
+        * inspector/timeline/timeline-test.js:
+        * platform/chromium/inspector/timeline/timeline-network-resource-expected.txt:
+
 2011-08-12  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Source/WebCore: Add HTMLUnknownElement interface as defined in
index e45c606..8b6e7e3 100644 (file)
@@ -16,9 +16,9 @@ function test()
     InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "loadingFinished", loadingFinished);
     InspectorTest.evaluateInPage("loadIFrameWithDownload()");
 
-    function responseReceived(identifier, time, resourceType, response)
+    function responseReceived(requestId, time, resourceType, response)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/download\.zzz/.exec(resource.url)) {
             InspectorTest.addResult("Received response for download.zzz");
             InspectorTest.addResult("SUCCESS");
@@ -26,16 +26,16 @@ function test()
         }
     }
 
-    function loadingFinished(identifier, finishTime)
+    function loadingFinished(requestId, finishTime)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/download\.zzz/.exec(resource.url))
             InspectorTest.completeTest();
     }
 
-    function loadingFailed(identifier, time, localizedDescription, canceled)
+    function loadingFailed(requestId, time, localizedDescription, canceled)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/download\.zzz/.exec(resource.url))
             InspectorTest.completeTest();
     }
index 0aaa9bf..877989f 100644 (file)
@@ -16,9 +16,9 @@ function test()
     InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "loadingFinished", loadingFinished);
     InspectorTest.evaluateInPage("loadIFrameWithDownload()");
 
-    function responseReceived(identifier, time, resourceType, response)
+    function responseReceived(requestId, time, resourceType, response)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/x-frame-options-deny\.cgi/.exec(resource.url)) {
             InspectorTest.addResult("Received response for x-frame-options-deny.cgi");
             InspectorTest.addResult("SUCCESS");
@@ -26,16 +26,16 @@ function test()
         }
     }
 
-    function loadingFinished(identifier, finishTime)
+    function loadingFinished(requestId, finishTime)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/x-frame-options-deny\.cgi/.exec(resource.url))
             InspectorTest.completeTest();
     }
 
-    function loadingFailed(identifier, time, localizedDescription, canceled)
+    function loadingFailed(requestId, time, localizedDescription, canceled)
     {
-        var resource = WebInspector.networkResourceById(identifier);
+        var resource = WebInspector.networkResourceById(requestId);
         if (/x-frame-options-deny\.cgi/.exec(resource.url))
             InspectorTest.completeTest();
     }
index 6dd04eb..8391fc3 100644 (file)
@@ -10,15 +10,15 @@ function test()
     InspectorTest.addSniffer(WebInspector.TimelineModel.prototype, "_loadNextChunk", loadNextChunk);
     InspectorFrontendHost.saveAs = saveAs;
     var data = [
-        {"startTime":1310749854316.8408,"data":{"identifier":43,"url":"http://www.webkit.org/","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":1819936,"totalHeapSize":7629120},
-        {"startTime":1310749855118.9329,"data":{"identifier":43,"statusCode":200,"mimeType":"text/html"},"children":[],"endTime":1310749855118.968,"type":"ResourceReceiveResponse","usedHeapSize":1819936,"totalHeapSize":7629120},
-        {"startTime":1310749855136.245,"data":{"identifier":44,"url":"http://www.webkit.org/css/main.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855136.655,"data":{"identifier":45,"url":"http://www.webkit.org/css/green.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855137.023,"data":{"identifier":46,"url":"http://www.webkit.org/css/blue.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855137.342,"data":{"identifier":47,"url":"http://www.webkit.org/css/yellow.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855137.656,"data":{"identifier":48,"url":"http://www.webkit.org/css/pink.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855137.989,"data":{"identifier":49,"url":"http://www.webkit.org/css/purple.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
-        {"startTime":1310749855138.308,"data":{"identifier":50,"url":"http://www.webkit.org/css/gray.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120}];
+        {"startTime":1310749854316.8408,"data":{"requestId":43,"url":"http://www.webkit.org/","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":1819936,"totalHeapSize":7629120},
+        {"startTime":1310749855118.9329,"data":{"requestId":43,"statusCode":200,"mimeType":"text/html"},"children":[],"endTime":1310749855118.968,"type":"ResourceReceiveResponse","usedHeapSize":1819936,"totalHeapSize":7629120},
+        {"startTime":1310749855136.245,"data":{"requestId":44,"url":"http://www.webkit.org/css/main.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855136.655,"data":{"requestId":45,"url":"http://www.webkit.org/css/green.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855137.023,"data":{"requestId":46,"url":"http://www.webkit.org/css/blue.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855137.342,"data":{"requestId":47,"url":"http://www.webkit.org/css/yellow.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855137.656,"data":{"requestId":48,"url":"http://www.webkit.org/css/pink.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855137.989,"data":{"requestId":49,"url":"http://www.webkit.org/css/purple.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120},
+        {"startTime":1310749855138.308,"data":{"requestId":50,"url":"http://www.webkit.org/css/gray.css","requestMethod":"GET"},"type":"ResourceSendRequest","usedHeapSize":2367192,"totalHeapSize":7629120}];
 
     WebInspector.panels.timeline._model._loadNextChunk(data, 0);
 
index 636c104..8b7a1ad 100644 (file)
@@ -7,7 +7,7 @@ ResourceSendRequest Properties:
 {
     startTime : <number>
     data : {
-        identifier : <string>
+        requestId : <string>
         url : <string>
         requestMethod : "GET"
     }
@@ -20,7 +20,7 @@ ResourceReceiveResponse Properties:
 {
     startTime : <number>
     data : {
-        identifier : <string>
+        requestId : <string>
         statusCode : 0
         mimeType : <string>
     }
@@ -35,7 +35,7 @@ ResourceFinish Properties:
 {
     startTime : <number>
     data : {
-        identifier : <string>
+        requestId : <string>
         didFail : false
     }
     type : "ResourceFinish"
index 3c18233..6f46bc3 100644 (file)
@@ -15,7 +15,7 @@ function performActions()
 
 function test()
 {
-    var resourceId;
+    var requestId;
     var scriptUrl = "timeline-network-resource.js";
 
     InspectorTest.startTimeline(step1);
@@ -55,7 +55,7 @@ function test()
     function printSend(record)
     {
         printRecord(record);
-        resourceId = record.data.identifier;
+        requestId = record.data.requestId;
         if (record.data.url === undefined) 
             InspectorTest.addResult("* No 'url' property in record");
         else if (record.data.url.indexOf(scriptUrl) === -1)
@@ -65,8 +65,8 @@ function test()
     function printReceive(record)
     {
         printRecord(record);
-        if (resourceId !== record.data.identifier)
-            InspectorTest.addResult("Didn't find matching resourceId: " + resourceId);
+        if (requestId !== record.data.requestId)
+            InspectorTest.addResult("Didn't find matching requestId: " + requestId);
         if (record.data.statusCode !== 0)
             InspectorTest.addResult("Response received status: " + record.data.statusCode);
     }
@@ -74,8 +74,8 @@ function test()
     function printFinish(record)
     {
         printRecord(record);
-        if (resourceId !== record.data.identifier)
-            InspectorTest.addResult("Didn't find matching resourceId: " + resourceId);
+        if (requestId !== record.data.requestId)
+            InspectorTest.addResult("Didn't find matching requestId: " + requestId);
         if (record.data.didFail)
             InspectorTest.addResult("Request failed.");
     }
index ce6a9c3..6c7c99d 100644 (file)
@@ -5,7 +5,7 @@ InspectorTest.timelineNonDeterministicProps = {
     children : 1,
     endTime : 1, 
     height : 1,
-    identifier : 1,
+    requestId : 1,
     startTime : 1,
     width : 1,
     stackTrace: 1,
index 561b4a4..ba238d1 100644 (file)
@@ -8,7 +8,7 @@ ResourceSendRequest Properties:
     startTime : <number>
     stackTrace : <object>
     data : {
-        identifier : <string>
+        requestId : <string>
         url : <string>
         requestMethod : "GET"
     }
@@ -21,7 +21,7 @@ ResourceReceiveResponse Properties:
 {
     startTime : <number>
     data : {
-        identifier : <string>
+        requestId : <string>
         statusCode : 0
         mimeType : <string>
     }
@@ -36,7 +36,7 @@ ResourceFinish Properties:
 {
     startTime : <number>
     data : {
-        identifier : <string>
+        requestId : <string>
         didFail : false
     }
     type : "ResourceFinish"
index ae60e37..be0feb3 100644 (file)
@@ -1,3 +1,105 @@
+2011-08-12  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Network resource identifier should have RequestId type and requestId name in protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=66061
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/ConsoleMessage.cpp:
+        (WebCore::ConsoleMessage::ConsoleMessage):
+        (WebCore::ConsoleMessage::addToFrontend):
+        * inspector/ConsoleMessage.h:
+        * inspector/IdentifiersFactory.cpp:
+        (WebCore::IdentifiersFactory::requestId):
+        * inspector/IdentifiersFactory.h:
+        * inspector/Inspector.json:
+        * inspector/InspectorConsoleAgent.cpp:
+        (WebCore::InspectorConsoleAgent::didReceiveResponse):
+        (WebCore::InspectorConsoleAgent::didFailLoading):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::willSendRequest):
+        (WebCore::InspectorResourceAgent::markResourceAsCached):
+        (WebCore::InspectorResourceAgent::didReceiveResponse):
+        (WebCore::InspectorResourceAgent::didReceiveData):
+        (WebCore::InspectorResourceAgent::didFinishLoading):
+        (WebCore::InspectorResourceAgent::didFailLoading):
+        (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
+        (WebCore::InspectorResourceAgent::setInitialScriptContent):
+        (WebCore::InspectorResourceAgent::didReceiveScriptResponse):
+        (WebCore::InspectorResourceAgent::setInitialXHRContent):
+        (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
+        (WebCore::InspectorResourceAgent::didCreateWebSocket):
+        (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
+        (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
+        (WebCore::InspectorResourceAgent::didCloseWebSocket):
+        (WebCore::InspectorResourceAgent::getResourceContent):
+        * inspector/InspectorResourceAgent.h:
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+        (WebCore::InspectorTimelineAgent::willReceiveResourceData):
+        (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
+        (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
+        * inspector/NetworkResourcesData.cpp:
+        (WebCore::NetworkResourcesData::ResourceData::ResourceData):
+        (WebCore::NetworkResourcesData::resourceCreated):
+        (WebCore::NetworkResourcesData::responseReceived):
+        (WebCore::NetworkResourcesData::setResourceType):
+        (WebCore::NetworkResourcesData::resourceType):
+        (WebCore::NetworkResourcesData::setResourceContent):
+        (WebCore::NetworkResourcesData::maybeAddResourceData):
+        (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
+        (WebCore::NetworkResourcesData::addCachedResource):
+        (WebCore::NetworkResourcesData::addResourceSharedBuffer):
+        (WebCore::NetworkResourcesData::data):
+        (WebCore::NetworkResourcesData::clear):
+        (WebCore::NetworkResourcesData::ensureNoDataForRequestId):
+        (WebCore::NetworkResourcesData::ensureFreeSpace):
+        * inspector/NetworkResourcesData.h:
+        (WebCore::NetworkResourcesData::ResourceData::requestId):
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createResourceSendRequestData):
+        (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
+        (WebCore::TimelineRecordFactory::createResourceFinishData):
+        (WebCore::TimelineRecordFactory::createReceiveResourceData):
+        * inspector/TimelineRecordFactory.h:
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
+        * inspector/front-end/ExtensionAPI.js:
+        (WebInspector.injectedExtensionAPI.Resources.prototype.getHAR):
+        * inspector/front-end/ExtensionServer.js:
+        (WebInspector.ExtensionServer):
+        (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
+        (WebInspector.ExtensionServer.prototype._onGetHAR):
+        (WebInspector.ExtensionServer.prototype._requestId):
+        * inspector/front-end/NetworkManager.js:
+        (WebInspector.NetworkManager.prototype.requestContent):
+        (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
+        (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
+        (WebInspector.NetworkDispatcher.prototype.responseReceived):
+        (WebInspector.NetworkDispatcher.prototype.dataReceived):
+        (WebInspector.NetworkDispatcher.prototype.loadingFinished):
+        (WebInspector.NetworkDispatcher.prototype.loadingFailed):
+        (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
+        (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
+        (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
+        (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
+        (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
+        (WebInspector.NetworkDispatcher.prototype._appendRedirect):
+        (WebInspector.NetworkDispatcher.prototype._startResource):
+        (WebInspector.NetworkDispatcher.prototype._finishResource):
+        (WebInspector.NetworkDispatcher.prototype._createResource):
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkLogView.prototype._appendResource):
+        (WebInspector.NetworkLogView.prototype._matchResource):
+        (WebInspector.NetworkLogView.prototype._updateSearchMatchedListAfterRequestIdChanged):
+        (WebInspector.NetworkLogView.prototype.performSearch):
+        * inspector/front-end/Resource.js:
+        (WebInspector.Resource):
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel.prototype._addRecordToTimeline):
+        (WebInspector.TimelinePanel.prototype._findParentRecord):
+        (WebInspector.TimelinePanel.FormattedRecord):
+
 2011-08-11  Hans Wennborg  <hans@chromium.org>
 
         IndexedDB: Object store records don't need to have keys in all indexes
index 545a909..0bc4ba1 100644 (file)
@@ -68,7 +68,7 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, c
 {
 }
 
-ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, const String& m, const String& responseUrl, const String& resourceId)
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, const String& m, const String& responseUrl, const String& requestId)
     : m_source(s)
     , m_type(t)
     , m_level(l)
@@ -76,7 +76,7 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, c
     , m_line(0)
     , m_url(responseUrl)
     , m_repeatCount(1)
-    , m_requestId(resourceId)
+    , m_requestId(requestId)
 {
 }
 
@@ -136,7 +136,7 @@ void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, Injecte
     jsonObj->setNumber("repeatCount", static_cast<int>(m_repeatCount));
     jsonObj->setString("text", m_message);
     if (m_type == NetworkErrorMessageType) 
-        jsonObj->setString("networkIdentifier", m_requestId);
+        jsonObj->setString("networkRequestId", m_requestId);
     if (m_arguments && m_arguments->argumentCount()) {
         InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(m_arguments->globalState());
         if (!injectedScript.hasNoValue()) {
index 32d0ad9..c0b2588 100644 (file)
@@ -53,7 +53,7 @@ class ConsoleMessage {
 public:
     ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, unsigned li, const String& u);
     ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
-    ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, const String& responseUrl, const String& resourceId);
+    ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, const String& responseUrl, const String& requestId);
     ~ConsoleMessage();
 
     void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*);
index 543def7..5c54730 100644 (file)
@@ -48,7 +48,7 @@ String IdentifiersFactory::createIdentifier()
 }
 
 // static
-String IdentifiersFactory::resourceId(unsigned long identifier)
+String IdentifiersFactory::requestId(unsigned long identifier)
 {
     return addProcessIdPrefixTo(String::number(identifier));
 }
index efa3ed4..b1a9c48 100644 (file)
@@ -36,7 +36,7 @@ class IdentifiersFactory {
 public:
     static void setProcessId(long processId) { s_processId = processId; }
     static String createIdentifier();
-    static String resourceId(unsigned long identifier);
+    static String requestId(unsigned long identifier);
 private:
     static String addProcessIdPrefixTo(const String& id);
 
index dacabca..5f5272f 100644 (file)
                     { "name": "url", "type": "string", "description": "JavaScript source url that created console message." },
                     { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
                     { "name": "text", "type": "string", "description": "Message text." },
-                    { "name": "networkIdentifier", "type": "integer", "optional": true, "description": "Identifier of the network request associated with the console message." },
+                    { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with the console message." },
                     { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "description": "Message parameters in case of the formatted message." },
                     { "name": "stackTrace", "$ref": "StackTrace", "description": "Stack trace for assert and error messages." }
                 ]
         "description": "Network domain allows tracking network activities of the page. It exposes information about HTTP and WebSocket requests and responses, their headers, bodies, timing, etc. It also allows getting the tree of the Frames on the page along with information about their resources.",
         "types": [
             {
+                "id": "RequestId",
+                "type": "string",
+                "description": "Unique request identifier."
+            },
+            {
                 "id": "ResourceTiming",
                 "type": "object",
                 "description": "Timing information for the request.",
                 "name": "getResourceContent",
                 "description": "Returns content of the given resource.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Identifier of the resource to get content for." }
+                    { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." }
                 ],
                 "returns": [
                     { "name": "content", "type": "string", "description": "Resource content." },
                 "name": "requestWillBeSent",
                 "description": "Fired when page is about to send HTTP request.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "frameId", "type": "string", "description": "Frame identifier." },
                     { "name": "loaderId", "type": "string", "description": "Loader identifier." },
                     { "name": "documentURL", "type": "string", "description": "URL of the document this resource is loaded for." },
                 "name": "resourceMarkedAsCached",
                 "description": "Fired when request is known to be served from disk cache.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." }
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                 ]
             },
             {
                 "name": "responseReceived",
                 "description": "Fired when HTTP response is available.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
                     { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
                     { "name": "response", "$ref": "ResourceResponse", "description": "Response data." }
                 "name": "dataReceived",
                 "description": "Fired when data chunk was received over the network.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
                     { "name": "dataLength", "type": "integer", "description": "Data chunk length." },
                     { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
                 "name": "loadingFinished",
                 "description": "Fired when HTTP request has finished loading.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." }
                 ]
             },
                 "name": "loadingFailed",
                 "description": "Fired when HTTP request has failed to load.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
                     { "name": "errorText", "type": "string", "description": "User friendly error message." },
                     { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }
                 "name": "resourceLoadedFromMemoryCache",
                 "description": "Fired when HTTP request has been served from memory cache.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "frameId", "type": "string", "description": "Frame identifier." },
                     { "name": "loaderId", "type": "string", "description": "Loader identifier." },
                     { "name": "documentURL", "type": "string", "description": "URL of the document this resource is loaded for." },
                 "name": "webSocketWillSendHandshakeRequest",
                 "description": "Fired when WebSocket is about to initiate handshake.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
                     { "name": "request", "type": "object", "description": "WebSocket request data." }
                 ]
                 "name": "webSocketHandshakeResponseReceived",
                 "description": "Fired when WebSocket handshake response becomes available.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." },
                     { "name": "response", "type": "object", "description": "WebSocket response data." }
                 ]
                 "name": "webSocketCreated",
                 "description": "Fired upon WebSocket creation.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "url", "type": "string", "description": "WebSocket request URL." }
                 ]
             },
                 "name": "webSocketClosed",
                 "description": "Fired when WebSocket is closed.",
                 "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
+                    { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
                     { "name": "timestamp", "type": "number", "description": "Timestamp." }
                 ]
             }
index e94bca9..a3f2c23 100644 (file)
@@ -226,8 +226,8 @@ void InspectorConsoleAgent::didReceiveResponse(unsigned long identifier, const R
 
     if (response.httpStatusCode() >= 400) {
         String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')';
-        String resourceId = IdentifiersFactory::resourceId(identifier);
-        addConsoleMessage(adoptPtr(new ConsoleMessage(OtherMessageSource, NetworkErrorMessageType, ErrorMessageLevel, message, response.url().string(), resourceId)));
+        String requestId = IdentifiersFactory::requestId(identifier);
+        addConsoleMessage(adoptPtr(new ConsoleMessage(OtherMessageSource, NetworkErrorMessageType, ErrorMessageLevel, message, response.url().string(), requestId)));
     }
 }
 
@@ -240,8 +240,8 @@ void InspectorConsoleAgent::didFailLoading(unsigned long identifier, const Resou
     String message = "Failed to load resource";
     if (!error.localizedDescription().isEmpty())
         message += ": " + error.localizedDescription();
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    addConsoleMessage(adoptPtr(new ConsoleMessage(OtherMessageSource, NetworkErrorMessageType, ErrorMessageLevel, message, error.failingURL(), resourceId)));
+    String requestId = IdentifiersFactory::requestId(identifier);
+    addConsoleMessage(adoptPtr(new ConsoleMessage(OtherMessageSource, NetworkErrorMessageType, ErrorMessageLevel, message, error.failingURL(), requestId)));
 }
 
 void InspectorConsoleAgent::setMonitoringXHREnabled(ErrorString*, bool enabled)
index 1ae7ad4..cbfbd01 100644 (file)
@@ -203,8 +203,8 @@ InspectorResourceAgent::~InspectorResourceAgent()
 
 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    m_resourcesData->resourceCreated(resourceId, m_pageAgent->loaderId(loader));
+    String requestId = IdentifiersFactory::requestId(identifier);
+    m_resourcesData->resourceCreated(requestId, m_pageAgent->loaderId(loader));
 
     RefPtr<InspectorObject> headers = m_state->getObject(ResourceAgentState::extraRequestHeaders);
 
@@ -233,17 +233,17 @@ void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
     else
         callStackValue = InspectorArray::create();
     RefPtr<InspectorObject> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
-    m_frontend->requestWillBeSent(resourceId, m_pageAgent->frameId(loader->frame()), m_pageAgent->loaderId(loader), loader->url().string(), buildObjectForResourceRequest(request), currentTime(), initiatorObject, callStackValue, buildObjectForResourceResponse(redirectResponse));
+    m_frontend->requestWillBeSent(requestId, m_pageAgent->frameId(loader->frame()), m_pageAgent->loaderId(loader), loader->url().string(), buildObjectForResourceRequest(request), currentTime(), initiatorObject, callStackValue, buildObjectForResourceResponse(redirectResponse));
 }
 
 void InspectorResourceAgent::markResourceAsCached(unsigned long identifier)
 {
-    m_frontend->resourceMarkedAsCached(IdentifiersFactory::resourceId(identifier));
+    m_frontend->resourceMarkedAsCached(IdentifiersFactory::requestId(identifier));
 }
 
 void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
+    String requestId = IdentifiersFactory::requestId(identifier);
     RefPtr<InspectorObject> resourceResponse = buildObjectForResourceResponse(response);
     InspectorPageAgent::ResourceType type = InspectorPageAgent::OtherResource;
     long cachedResourceSize = 0;
@@ -257,21 +257,21 @@ void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, Docume
             if (response.mimeType().isEmpty())
                 resourceResponse->setString("mimeType", cachedResource->response().mimeType());
 
-            m_resourcesData->addCachedResource(resourceId, cachedResource);
+            m_resourcesData->addCachedResource(requestId, cachedResource);
         }
         if (equalIgnoringFragmentIdentifier(response.url(), loader->frameLoader()->icon()->url()))
             type = InspectorPageAgent::ImageResource;
         else if (equalIgnoringFragmentIdentifier(response.url(), loader->url()) && type == InspectorPageAgent::OtherResource)
             type = InspectorPageAgent::DocumentResource;
-        else if (m_loadingXHRSynchronously || m_resourcesData->resourceType(resourceId) == InspectorPageAgent::XHRResource)
+        else if (m_loadingXHRSynchronously || m_resourcesData->resourceType(requestId) == InspectorPageAgent::XHRResource)
             type = InspectorPageAgent::XHRResource;
-        else if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::ScriptResource)
+        else if (m_resourcesData->resourceType(requestId) == InspectorPageAgent::ScriptResource)
             type = InspectorPageAgent::ScriptResource;
 
-        m_resourcesData->responseReceived(resourceId, m_pageAgent->frameId(loader->frame()), response);
+        m_resourcesData->responseReceived(requestId, m_pageAgent->frameId(loader->frame()), response);
     }
-    m_resourcesData->setResourceType(resourceId, type);
-    m_frontend->responseReceived(resourceId, currentTime(), InspectorPageAgent::resourceTypeString(type), resourceResponse);
+    m_resourcesData->setResourceType(requestId, type);
+    m_frontend->responseReceived(requestId, currentTime(), InspectorPageAgent::resourceTypeString(type), resourceResponse);
     // If we revalidated the resource and got Not modified, send content length following didReceiveResponse
     // as there will be no calls to didReceiveData from the network stack.
     if (cachedResourceSize && response.httpStatusCode() == 304)
@@ -280,34 +280,34 @@ void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, Docume
 
 void InspectorResourceAgent::didReceiveData(unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    if (data && m_resourcesData->resourceType(resourceId) == InspectorPageAgent::OtherResource)
-        m_resourcesData->maybeAddResourceData(resourceId, data, dataLength);
+    String requestId = IdentifiersFactory::requestId(identifier);
+    if (data && m_resourcesData->resourceType(requestId) == InspectorPageAgent::OtherResource)
+        m_resourcesData->maybeAddResourceData(requestId, data, dataLength);
 
-    m_frontend->dataReceived(resourceId, currentTime(), dataLength, encodedDataLength);
+    m_frontend->dataReceived(requestId, currentTime(), dataLength, encodedDataLength);
 }
 
 void InspectorResourceAgent::didFinishLoading(unsigned long identifier, DocumentLoader* loader, double finishTime)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::DocumentResource)
-        m_resourcesData->addResourceSharedBuffer(resourceId, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
+    String requestId = IdentifiersFactory::requestId(identifier);
+    if (m_resourcesData->resourceType(requestId) == InspectorPageAgent::DocumentResource)
+        m_resourcesData->addResourceSharedBuffer(requestId, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
 
-    m_resourcesData->maybeDecodeDataToContent(resourceId);
+    m_resourcesData->maybeDecodeDataToContent(requestId);
 
     if (!finishTime)
         finishTime = currentTime();
 
-    m_frontend->loadingFinished(resourceId, finishTime);
+    m_frontend->loadingFinished(requestId, finishTime);
 }
 
 void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLoader* loader, const ResourceError& error)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::DocumentResource)
-        m_resourcesData->addResourceSharedBuffer(resourceId, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
+    String requestId = IdentifiersFactory::requestId(identifier);
+    if (m_resourcesData->resourceType(requestId) == InspectorPageAgent::DocumentResource)
+        m_resourcesData->addResourceSharedBuffer(requestId, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
 
-    m_frontend->loadingFailed(resourceId, currentTime(), error.localizedDescription(), error.isCancellation());
+    m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescription(), error.isCancellation());
 }
 
 void InspectorResourceAgent::didLoadResourceFromMemoryCache(DocumentLoader* loader, CachedResource* resource)
@@ -315,32 +315,32 @@ void InspectorResourceAgent::didLoadResourceFromMemoryCache(DocumentLoader* load
     String loaderId = m_pageAgent->loaderId(loader);
     String frameId = m_pageAgent->frameId(loader->frame());
     unsigned long identifier = loader->frame()->page()->progress()->createUniqueIdentifier();
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    m_resourcesData->resourceCreated(resourceId, loaderId);
-    m_resourcesData->addCachedResource(resourceId, resource);
+    String requestId = IdentifiersFactory::requestId(identifier);
+    m_resourcesData->resourceCreated(requestId, loaderId);
+    m_resourcesData->addCachedResource(requestId, resource);
     RefPtr<InspectorObject> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
 
-    m_frontend->resourceLoadedFromMemoryCache(resourceId, frameId, loaderId, loader->url().string(), currentTime(), initiatorObject, buildObjectForCachedResource(*resource));
+    m_frontend->resourceLoadedFromMemoryCache(requestId, frameId, loaderId, loader->url().string(), currentTime(), initiatorObject, buildObjectForCachedResource(*resource));
 }
 
 void InspectorResourceAgent::setInitialScriptContent(unsigned long identifier, const String& sourceString)
 {
-    m_resourcesData->setResourceContent(IdentifiersFactory::resourceId(identifier), sourceString);
+    m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier), sourceString);
 }
 
 void InspectorResourceAgent::didReceiveScriptResponse(unsigned long identifier)
 {
-    m_resourcesData->setResourceType(IdentifiersFactory::resourceId(identifier), InspectorPageAgent::ScriptResource);
+    m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier), InspectorPageAgent::ScriptResource);
 }
 
 void InspectorResourceAgent::setInitialXHRContent(unsigned long identifier, const String& sourceString)
 {
-    m_resourcesData->setResourceContent(IdentifiersFactory::resourceId(identifier), sourceString);
+    m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier), sourceString);
 }
 
 void InspectorResourceAgent::didReceiveXHRResponse(unsigned long identifier)
 {
-    m_resourcesData->setResourceType(IdentifiersFactory::resourceId(identifier), InspectorPageAgent::XHRResource);
+    m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier), InspectorPageAgent::XHRResource);
 }
 
 void InspectorResourceAgent::willLoadXHRSynchronously()
@@ -421,7 +421,7 @@ static String createReadableStringFromBinary(const unsigned char* value, size_t
 
 void InspectorResourceAgent::didCreateWebSocket(unsigned long identifier, const KURL& requestURL)
 {
-    m_frontend->webSocketCreated(IdentifiersFactory::resourceId(identifier), requestURL.string());
+    m_frontend->webSocketCreated(IdentifiersFactory::requestId(identifier), requestURL.string());
 }
 
 void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long identifier, const WebSocketHandshakeRequest& request)
@@ -429,7 +429,7 @@ void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long ide
     RefPtr<InspectorObject> requestObject = InspectorObject::create();
     requestObject->setObject("headers", buildObjectForHeaders(request.headerFields()));
     requestObject->setString("requestKey3", createReadableStringFromBinary(request.key3().value, sizeof(request.key3().value)));
-    m_frontend->webSocketWillSendHandshakeRequest(IdentifiersFactory::resourceId(identifier), currentTime(), requestObject);
+    m_frontend->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(identifier), currentTime(), requestObject);
 }
 
 void InspectorResourceAgent::didReceiveWebSocketHandshakeResponse(unsigned long identifier, const WebSocketHandshakeResponse& response)
@@ -439,12 +439,12 @@ void InspectorResourceAgent::didReceiveWebSocketHandshakeResponse(unsigned long
     responseObject->setString("statusText", response.statusText());
     responseObject->setObject("headers", buildObjectForHeaders(response.headerFields()));
     responseObject->setString("challengeResponse", createReadableStringFromBinary(response.challengeResponse().value, sizeof(response.challengeResponse().value)));
-    m_frontend->webSocketHandshakeResponseReceived(IdentifiersFactory::resourceId(identifier), currentTime(), responseObject);
+    m_frontend->webSocketHandshakeResponseReceived(IdentifiersFactory::requestId(identifier), currentTime(), responseObject);
 }
 
 void InspectorResourceAgent::didCloseWebSocket(unsigned long identifier)
 {
-    m_frontend->webSocketClosed(IdentifiersFactory::resourceId(identifier), currentTime());
+    m_frontend->webSocketClosed(IdentifiersFactory::requestId(identifier), currentTime());
 }
 #endif // ENABLE(WEB_SOCKETS)
 
@@ -522,9 +522,9 @@ void InspectorResourceAgent::initializeBackgroundCollection()
     m_mockFrontend = adoptPtr(new InspectorFrontend::Network(m_inspectorFrontendProxy.get()));
 }
 
-void InspectorResourceAgent::getResourceContent(ErrorString* errorString, const String& resourceId, String* content, bool* base64Encoded)
+void InspectorResourceAgent::getResourceContent(ErrorString* errorString, const String& requestId, String* content, bool* base64Encoded)
 {
-    NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(resourceId);
+    NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(requestId);
     if (!resourceData) {
         *errorString = "No resource with given identifier found";
         return;
index 8c06ee0..cfdeb9e 100644 (file)
@@ -130,7 +130,7 @@ public:
     void disable(ErrorString*);
     void setUserAgentOverride(ErrorString*, const String& userAgent);
     void setExtraHeaders(ErrorString*, PassRefPtr<InspectorObject>);
-    void getResourceContent(ErrorString*, const String& resourceId, String* content, bool* base64Encoded);
+    void getResourceContent(ErrorString*, const String& requestId, String* content, bool* base64Encoded);
     void clearCache(ErrorString*, const String* const optionalPreservedLoaderId);
 
     void clearBrowserCache(ErrorString*);
index ba95f86..11aadf5 100644 (file)
@@ -290,8 +290,8 @@ void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, c
 {
     pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(WTF::currentTimeMS(), m_maxCallStackDepth);
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    record->setObject("data", TimelineRecordFactory::createResourceSendRequestData(resourceId, request));
+    String requestId = IdentifiersFactory::requestId(identifier);
+    record->setObject("data", TimelineRecordFactory::createResourceSendRequestData(requestId, request));
     record->setString("type", TimelineRecordType::ResourceSendRequest);
     setHeapSizeStatistic(record.get());
     m_frontend->eventRecorded(record.release());
@@ -299,8 +299,8 @@ void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, c
 
 void InspectorTimelineAgent::willReceiveResourceData(unsigned long identifier)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    pushCurrentRecord(TimelineRecordFactory::createReceiveResourceData(resourceId), TimelineRecordType::ResourceReceivedData);
+    String requestId = IdentifiersFactory::requestId(identifier);
+    pushCurrentRecord(TimelineRecordFactory::createReceiveResourceData(requestId), TimelineRecordType::ResourceReceivedData);
 }
 
 void InspectorTimelineAgent::didReceiveResourceData()
@@ -310,8 +310,8 @@ void InspectorTimelineAgent::didReceiveResourceData()
     
 void InspectorTimelineAgent::willReceiveResourceResponse(unsigned long identifier, const ResourceResponse& response)
 {
-    String resourceId = IdentifiersFactory::resourceId(identifier);
-    pushCurrentRecord(TimelineRecordFactory::createResourceReceiveResponseData(resourceId, response), TimelineRecordType::ResourceReceiveResponse);
+    String requestId = IdentifiersFactory::requestId(identifier);
+    pushCurrentRecord(TimelineRecordFactory::createResourceReceiveResponseData(requestId, response), TimelineRecordType::ResourceReceiveResponse);
 }
 
 void InspectorTimelineAgent::didReceiveResourceResponse()
@@ -321,7 +321,7 @@ void InspectorTimelineAgent::didReceiveResourceResponse()
 
 void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier, bool didFail, double finishTime)
 {
-    appendRecord(TimelineRecordFactory::createResourceFinishData(IdentifiersFactory::resourceId(identifier), didFail, finishTime * 1000), TimelineRecordType::ResourceFinish);
+    appendRecord(TimelineRecordFactory::createResourceFinishData(IdentifiersFactory::requestId(identifier), didFail, finishTime * 1000), TimelineRecordType::ResourceFinish);
 }
 
 void InspectorTimelineAgent::didTimeStamp(const String& message)
index 0393bde..532dbaa 100644 (file)
@@ -47,8 +47,8 @@ namespace WebCore {
 
 
 // ResourceData
-NetworkResourcesData::ResourceData::ResourceData(const String& resourceId, const String& loaderId)
-    : m_resourceId(resourceId)
+NetworkResourcesData::ResourceData::ResourceData(const String& requestId, const String& loaderId)
+    : m_requestId(requestId)
     , m_loaderId(loaderId)
     , m_isContentPurged(false)
     , m_type(InspectorPageAgent::OtherResource)
@@ -130,15 +130,15 @@ NetworkResourcesData::~NetworkResourcesData()
     clear();
 }
 
-void NetworkResourcesData::resourceCreated(const String& resourceId, const String& loaderId)
+void NetworkResourcesData::resourceCreated(const String& requestId, const String& loaderId)
 {
-    ensureNoDataForResourceId(resourceId);
-    m_resourceIdToResourceDataMap.set(resourceId, new ResourceData(resourceId, loaderId));
+    ensureNoDataForRequestId(requestId);
+    m_requestIdToResourceDataMap.set(requestId, new ResourceData(requestId, loaderId));
 }
 
-void NetworkResourcesData::responseReceived(const String& resourceId, const String& frameId, const ResourceResponse& response)
+void NetworkResourcesData::responseReceived(const String& requestId, const String& frameId, const ResourceResponse& response)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     resourceData->setFrameId(frameId);
@@ -146,25 +146,25 @@ void NetworkResourcesData::responseReceived(const String& resourceId, const Stri
     resourceData->createDecoder(response.mimeType(), response.textEncodingName());
 }
 
-void NetworkResourcesData::setResourceType(const String& resourceId, InspectorPageAgent::ResourceType type)
+void NetworkResourcesData::setResourceType(const String& requestId, InspectorPageAgent::ResourceType type)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     resourceData->setType(type);
 }
 
-InspectorPageAgent::ResourceType NetworkResourcesData::resourceType(const String& resourceId)
+InspectorPageAgent::ResourceType NetworkResourcesData::resourceType(const String& requestId)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return InspectorPageAgent::OtherResource;
     return resourceData->type();
 }
 
-void NetworkResourcesData::setResourceContent(const String& resourceId, const String& content)
+void NetworkResourcesData::setResourceContent(const String& requestId, const String& content)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     int dataLength = 2 * content.length();
@@ -173,15 +173,15 @@ void NetworkResourcesData::setResourceContent(const String& resourceId, const St
     if (resourceData->isContentPurged())
         return;
     if (ensureFreeSpace(dataLength) && !resourceData->isContentPurged()) {
-        m_resourceIdsDeque.append(resourceId);
+        m_requestIdsDeque.append(requestId);
         resourceData->setContent(content);
         m_contentSize += dataLength;
     }
 }
 
-void NetworkResourcesData::maybeAddResourceData(const String& resourceId, const char* data, int dataLength)
+void NetworkResourcesData::maybeAddResourceData(const String& requestId, const char* data, int dataLength)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     if (!resourceData->decoder())
@@ -191,15 +191,15 @@ void NetworkResourcesData::maybeAddResourceData(const String& resourceId, const
     if (resourceData->isContentPurged())
         return;
     if (ensureFreeSpace(dataLength) && !resourceData->isContentPurged()) {
-        m_resourceIdsDeque.append(resourceId);
+        m_requestIdsDeque.append(requestId);
         resourceData->appendData(data, dataLength);
         m_contentSize += dataLength;
     }
 }
 
-void NetworkResourcesData::maybeDecodeDataToContent(const String& resourceId)
+void NetworkResourcesData::maybeDecodeDataToContent(const String& requestId)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     if (!resourceData->hasData())
@@ -210,46 +210,46 @@ void NetworkResourcesData::maybeDecodeDataToContent(const String& resourceId)
         m_contentSize -= resourceData->purgeContent();
 }
 
-void NetworkResourcesData::addCachedResource(const String& resourceId, CachedResource* cachedResource)
+void NetworkResourcesData::addCachedResource(const String& requestId, CachedResource* cachedResource)
 {
-    if (!m_resourceIdToResourceDataMap.contains(resourceId))
+    if (!m_requestIdToResourceDataMap.contains(requestId))
         return;
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
 
     resourceData->setCachedResource(cachedResource);
 }
 
-void NetworkResourcesData::addResourceSharedBuffer(const String& resourceId, PassRefPtr<SharedBuffer> buffer, const String& textEncodingName)
+void NetworkResourcesData::addResourceSharedBuffer(const String& requestId, PassRefPtr<SharedBuffer> buffer, const String& textEncodingName)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (!resourceData)
         return;
     resourceData->setBuffer(buffer);
     resourceData->setTextEncodingName(textEncodingName);
 }
 
-NetworkResourcesData::ResourceData const* NetworkResourcesData::data(const String& resourceId)
+NetworkResourcesData::ResourceData const* NetworkResourcesData::data(const String& requestId)
 {
-    return m_resourceIdToResourceDataMap.get(resourceId);
+    return m_requestIdToResourceDataMap.get(requestId);
 }
 
 void NetworkResourcesData::clear(const String& preservedLoaderId)
 {
-    m_resourceIdsDeque.clear();
+    m_requestIdsDeque.clear();
     m_contentSize = 0;
 
     ResourceDataMap preservedMap;
 
     ResourceDataMap::iterator it;
-    ResourceDataMap::iterator end = m_resourceIdToResourceDataMap.end();
-    for (it = m_resourceIdToResourceDataMap.begin(); it != end; ++it) {
+    ResourceDataMap::iterator end = m_requestIdToResourceDataMap.end();
+    for (it = m_requestIdToResourceDataMap.begin(); it != end; ++it) {
         ResourceData* resourceData = it->second;
         if (!preservedLoaderId.isNull() && resourceData->loaderId() == preservedLoaderId)
             preservedMap.set(it->first, it->second);
         else
             delete resourceData;
     }
-    m_resourceIdToResourceDataMap.swap(preservedMap);
+    m_requestIdToResourceDataMap.swap(preservedMap);
 }
 
 void NetworkResourcesData::setResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize)
@@ -260,14 +260,14 @@ void NetworkResourcesData::setResourcesDataSizeLimits(int maximumResourcesConten
 }
 
 
-void NetworkResourcesData::ensureNoDataForResourceId(const String& resourceId)
+void NetworkResourcesData::ensureNoDataForRequestId(const String& requestId)
 {
-    ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+    ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
     if (resourceData) {
         if (resourceData->hasContent() || resourceData->hasData())
             m_contentSize -= resourceData->purgeContent();
         delete resourceData;
-        m_resourceIdToResourceDataMap.remove(resourceId);
+        m_requestIdToResourceDataMap.remove(requestId);
     }
 }
 
@@ -277,8 +277,8 @@ bool NetworkResourcesData::ensureFreeSpace(int size)
         return false;
 
     while (size > m_maximumResourcesContentSize - m_contentSize) {
-        String resourceId = m_resourceIdsDeque.takeFirst();
-        ResourceData* resourceData = m_resourceIdToResourceDataMap.get(resourceId);
+        String requestId = m_requestIdsDeque.takeFirst();
+        ResourceData* resourceData = m_requestIdToResourceDataMap.get(requestId);
         if (resourceData)
             m_contentSize -= resourceData->purgeContent();
     }
index db4bfc4..2148685 100644 (file)
@@ -51,9 +51,9 @@ public:
     class ResourceData {
         friend class NetworkResourcesData;
     public:
-        ResourceData(const String& resourceId, const String& loaderId);
+        ResourceData(const String& requestId, const String& loaderId);
 
-        String resourceId() const { return m_resourceId; }
+        String requestId() const { return m_requestId; }
         String loaderId() const { return m_loaderId; }
 
         String frameId() const { return m_frameId; }
@@ -90,7 +90,7 @@ public:
         void appendData(const char* data, int dataLength);
         int decodeDataToContent();
 
-        String m_resourceId;
+        String m_requestId;
         String m_loaderId;
         String m_frameId;
         String m_url;
@@ -110,28 +110,28 @@ public:
 
     ~NetworkResourcesData();
 
-    void resourceCreated(const String& resourceId, const String& loaderId);
-    void responseReceived(const String& resourceId, const String& frameId, const ResourceResponse&);
-    void setResourceType(const String& resourceId, InspectorPageAgent::ResourceType);
-    InspectorPageAgent::ResourceType resourceType(const String& resourceId);
-    void setResourceContent(const String& resourceId, const String& content);
-    void maybeAddResourceData(const String& resourceId, const char* data, int dataLength);
-    void maybeDecodeDataToContent(const String& resourceId);
-    void addCachedResource(const String& resourceId, CachedResource*);
-    void addResourceSharedBuffer(const String& resourceId, PassRefPtr<SharedBuffer>, const String& textEncodingName);
-    ResourceData const* data(const String& resourceId);
+    void resourceCreated(const String& requestId, const String& loaderId);
+    void responseReceived(const String& requestId, const String& frameId, const ResourceResponse&);
+    void setResourceType(const String& requestId, InspectorPageAgent::ResourceType);
+    InspectorPageAgent::ResourceType resourceType(const String& requestId);
+    void setResourceContent(const String& requestId, const String& content);
+    void maybeAddResourceData(const String& requestId, const char* data, int dataLength);
+    void maybeDecodeDataToContent(const String& requestId);
+    void addCachedResource(const String& requestId, CachedResource*);
+    void addResourceSharedBuffer(const String& requestId, PassRefPtr<SharedBuffer>, const String& textEncodingName);
+    ResourceData const* data(const String& requestId);
     void clear(const String& preservedLoaderId = String());
 
     void setResourcesDataSizeLimits(int maximumResourcesContentSize, int maximumSingleResourceContentSize);
 
 private:
-    void ensureNoDataForResourceId(const String& resourceId);
+    void ensureNoDataForRequestId(const String& requestId);
     bool ensureFreeSpace(int size);
 
-    Deque<String> m_resourceIdsDeque;
+    Deque<String> m_requestIdsDeque;
 
     typedef HashMap<String, ResourceData*> ResourceDataMap;
-    ResourceDataMap m_resourceIdToResourceDataMap;
+    ResourceDataMap m_requestIdToResourceDataMap;
     int m_contentSize;
     int m_maximumResourcesContentSize;
     int m_maximumSingleResourceContentSize;
index 9aa7022..905656d 100644 (file)
@@ -129,38 +129,38 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createScheduleResourceRequest
     return data.release();
 }
 
-PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceSendRequestData(const String& resourceId, const ResourceRequest& request)
+PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceSendRequestData(const String& requestId, const ResourceRequest& request)
 {
     RefPtr<InspectorObject> data = InspectorObject::create();
-    data->setString("identifier", resourceId);
+    data->setString("requestId", requestId);
     data->setString("url", request.url().string());
     data->setString("requestMethod", request.httpMethod());
     return data.release();
 }
 
-PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceReceiveResponseData(const String& resourceId, const ResourceResponse& response)
+PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceReceiveResponseData(const String& requestId, const ResourceResponse& response)
 {
     RefPtr<InspectorObject> data = InspectorObject::create();
-    data->setString("identifier", resourceId);
+    data->setString("requestId", requestId);
     data->setNumber("statusCode", response.httpStatusCode());
     data->setString("mimeType", response.mimeType());
     return data.release();
 }
 
-PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceFinishData(const String& resourceId, bool didFail, double finishTime)
+PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceFinishData(const String& requestId, bool didFail, double finishTime)
 {
     RefPtr<InspectorObject> data = InspectorObject::create();
-    data->setString("identifier", resourceId);
+    data->setString("requestId", requestId);
     data->setBoolean("didFail", didFail);
     if (finishTime)
         data->setNumber("networkTime", finishTime);
     return data.release();
 }
 
-PassRefPtr<InspectorObject> TimelineRecordFactory::createReceiveResourceData(const String& resourceId)
+PassRefPtr<InspectorObject> TimelineRecordFactory::createReceiveResourceData(const String& requestId)
 {
     RefPtr<InspectorObject> data = InspectorObject::create();
-    data->setString("identifier", resourceId);
+    data->setString("requestId", requestId);
     return data.release();
 }
     
index dad55f2..8d8b4a3 100644 (file)
@@ -64,15 +64,15 @@ namespace WebCore {
 
         static PassRefPtr<InspectorObject> createTimeStampData(const String&);
 
-        static PassRefPtr<InspectorObject> createResourceSendRequestData(const String& resourceId, const ResourceRequest&);
+        static PassRefPtr<InspectorObject> createResourceSendRequestData(const String& requestId, const ResourceRequest&);
 
         static PassRefPtr<InspectorObject> createScheduleResourceRequestData(const String&);
 
-        static PassRefPtr<InspectorObject> createResourceReceiveResponseData(const String& resourceId, const ResourceResponse&);
+        static PassRefPtr<InspectorObject> createResourceReceiveResponseData(const String& requestId, const ResourceResponse&);
 
-        static PassRefPtr<InspectorObject> createReceiveResourceData(const String& resourceId);
+        static PassRefPtr<InspectorObject> createReceiveResourceData(const String& requestId);
 
-        static PassRefPtr<InspectorObject> createResourceFinishData(const String& resourceId, bool didFail, double finishTime);
+        static PassRefPtr<InspectorObject> createResourceFinishData(const String& requestId, bool didFail, double finishTime);
 
         static PassRefPtr<InspectorObject> createPaintData(const IntRect&);
 
index 9747758..fbdf4be 100644 (file)
@@ -127,7 +127,7 @@ WebInspector.ConsoleView.prototype = {
                     payload.text,
                     payload.parameters,
                     payload.stackTrace,
-                    payload.networkIdentifier);
+                    payload.networkRequestId);
                 console.addMessage(consoleMessage);
             },
 
index 9933d08..942072d 100644 (file)
@@ -123,8 +123,8 @@ Resources.prototype = {
         {
             var entries = (result && result.entries) || [];
             for (var i = 0; i < entries.length; ++i) {
-                entries[i].__proto__ = new Resource(entries[i]._resourceId);
-                delete entries[i]._resourceId;
+                entries[i].__proto__ = new Resource(entries[i]._requestId);
+                delete entries[i]._requestId;
             }
             callback(result);
         }
index b470385..1e2fe15 100644 (file)
@@ -37,7 +37,7 @@ WebInspector.ExtensionServer = function()
     this._subscriptionStopHandlers = {};
     this._extraHeaders = {};
     this._resources = {};
-    this._lastResourceId = 0;
+    this._lastRequestId = 0;
     this._allowedOrigins = {};
     this._status = new WebInspector.ExtensionStatus();
 
@@ -126,7 +126,7 @@ WebInspector.ExtensionServer.prototype = {
     {
         var resource = event.data;
         if (this._hasSubscribers("resource-finished"))
-            this._postNotification("resource-finished", this._resourceId(resource), (new WebInspector.HAREntry(resource)).build());
+            this._postNotification("resource-finished", this._requestId(resource), (new WebInspector.HAREntry(resource)).build());
     },
 
     _hasSubscribers: function(type)
@@ -327,7 +327,7 @@ WebInspector.ExtensionServer.prototype = {
         var resources = WebInspector.networkLog.resources;
         var harLog = (new WebInspector.HARLog(resources)).build();
         for (var i = 0; i < harLog.entries.length; ++i)
-            harLog.entries[i]._resourceId = this._resourceId(resources[i]);
+            harLog.entries[i]._requestId = this._requestId(resources[i]);
         return harLog;
     },
 
@@ -347,13 +347,13 @@ WebInspector.ExtensionServer.prototype = {
         resource.requestContent(onContentAvailable.bind(this));
     },
 
-    _resourceId: function(resource)
+    _requestId: function(resource)
     {
-        if (!resource._extensionResourceId) {
-            resource._extensionResourceId = ++this._lastResourceId;
-            this._resources[resource._extensionResourceId] = resource;
+        if (!resource._extensionRequestId) {
+            resource._extensionRequestId = ++this._lastRequestId;
+            this._resources[resource._extensionRequestId] = resource;
         }
-        return resource._extensionResourceId;
+        return resource._extensionRequestId;
     },
 
     _resourceById: function(id)
index f0aafcb..6a78e9d 100644 (file)
@@ -57,8 +57,8 @@ WebInspector.NetworkManager.prototype = {
         }
         // FIXME: https://bugs.webkit.org/show_bug.cgi?id=61363 We should separate NetworkResource (NetworkPanel resource) 
         // from ResourceRevision (ResourcesPanel/ScriptsPanel resource) and request content accordingly.
-        if (resource.identifier)
-            NetworkAgent.getResourceContent(resource.identifier, callbackWrapper);
+        if (resource.requestId)
+            NetworkAgent.getResourceContent(resource.requestId, callbackWrapper);
         else
             PageAgent.getResourceContent(resource.frameId, resource.url, callbackWrapper);
     },
@@ -131,17 +131,17 @@ WebInspector.NetworkDispatcher.prototype = {
         return response && !response.status && !response.mimeType && !Object.keys(response.headers).length;
     },
 
-    requestWillBeSent: function(identifier, frameId, loaderId, documentURL, request, time, initiator, stackTrace, redirectResponse)
+    requestWillBeSent: function(requestId, frameId, loaderId, documentURL, request, time, initiator, stackTrace, redirectResponse)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (resource) {
             // FIXME: move this check to the backend.
             if (this._isNull(redirectResponse))
                 return;
-            this.responseReceived(identifier, time, "Other", redirectResponse);
-            resource = this._appendRedirect(identifier, time, request.url);
+            this.responseReceived(requestId, time, "Other", redirectResponse);
+            resource = this._appendRedirect(requestId, time, request.url);
         } else
-            resource = this._createResource(identifier, frameId, loaderId, request.url, documentURL, initiator, stackTrace);
+            resource = this._createResource(requestId, frameId, loaderId, request.url, documentURL, initiator, stackTrace);
         resource.hasNetworkData = true;
         this._updateResourceWithRequest(resource, request);
         resource.startTime = time;
@@ -149,9 +149,9 @@ WebInspector.NetworkDispatcher.prototype = {
         this._startResource(resource);
     },
 
-    resourceMarkedAsCached: function(identifier)
+    resourceMarkedAsCached: function(requestId)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -159,13 +159,13 @@ WebInspector.NetworkDispatcher.prototype = {
         this._updateResource(resource);
     },
 
-    responseReceived: function(identifier, time, resourceType, response)
+    responseReceived: function(requestId, time, resourceType, response)
     {
         // FIXME: move this check to the backend.
         if (this._isNull(response))
             return;
 
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -177,9 +177,9 @@ WebInspector.NetworkDispatcher.prototype = {
         this._updateResource(resource);
     },
 
-    dataReceived: function(identifier, time, dataLength, encodedDataLength)
+    dataReceived: function(requestId, time, dataLength, encodedDataLength)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -191,18 +191,18 @@ WebInspector.NetworkDispatcher.prototype = {
         this._updateResource(resource);
     },
 
-    loadingFinished: function(identifier, finishTime)
+    loadingFinished: function(requestId, finishTime)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
         this._finishResource(resource, finishTime);
     },
 
-    loadingFailed: function(identifier, time, localizedDescription, canceled)
+    loadingFailed: function(requestId, time, localizedDescription, canceled)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -212,9 +212,9 @@ WebInspector.NetworkDispatcher.prototype = {
         this._finishResource(resource, time);
     },
 
-    resourceLoadedFromMemoryCache: function(identifier, frameId, loaderId, documentURL, time, initiator, cachedResource)
+    resourceLoadedFromMemoryCache: function(requestId, frameId, loaderId, documentURL, time, initiator, cachedResource)
     {
-        var resource = this._createResource(identifier, frameId, loaderId, cachedResource.url, documentURL, initiator);
+        var resource = this._createResource(requestId, frameId, loaderId, cachedResource.url, documentURL, initiator);
         this._updateResourceWithCachedResource(resource, cachedResource);
         resource.cached = true;
         resource.requestMethod = "GET";
@@ -223,16 +223,16 @@ WebInspector.NetworkDispatcher.prototype = {
         this._finishResource(resource, time);
     },
 
-    webSocketCreated: function(identifier, requestURL)
+    webSocketCreated: function(requestId, requestURL)
     {
-        var resource = this._createResource(identifier, null, null, requestURL);
+        var resource = this._createResource(requestId, null, null, requestURL);
         resource.type = WebInspector.Resource.Type.WebSocket;
         this._startResource(resource);
     },
 
-    webSocketWillSendHandshakeRequest: function(identifier, time, request)
+    webSocketWillSendHandshakeRequest: function(requestId, time, request)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -244,9 +244,9 @@ WebInspector.NetworkDispatcher.prototype = {
         this._updateResource(resource);
     },
 
-    webSocketHandshakeResponseReceived: function(identifier, time, response)
+    webSocketHandshakeResponseReceived: function(requestId, time, response)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
 
@@ -259,22 +259,22 @@ WebInspector.NetworkDispatcher.prototype = {
         this._updateResource(resource);
     },
 
-    webSocketClosed: function(identifier, time)
+    webSocketClosed: function(requestId, time)
     {
-        var resource = this._inflightResourcesById[identifier];
+        var resource = this._inflightResourcesById[requestId];
         if (!resource)
             return;
         this._finishResource(resource, time);
     },
 
-    _appendRedirect: function(identifier, time, redirectURL)
+    _appendRedirect: function(requestId, time, redirectURL)
     {
-        var originalResource = this._inflightResourcesById[identifier];
+        var originalResource = this._inflightResourcesById[requestId];
         var previousRedirects = originalResource.redirects || [];
-        originalResource.identifier = "redirected:" + identifier + "." + previousRedirects.length;
+        originalResource.requestId = "redirected:" + requestId + "." + previousRedirects.length;
         delete originalResource.redirects;
         this._finishResource(originalResource, time);
-        var newResource = this._createResource(identifier, originalResource.frameId, originalResource.loaderId,
+        var newResource = this._createResource(requestId, originalResource.frameId, originalResource.loaderId,
              redirectURL, originalResource.documentURL, originalResource.initiator, originalResource.stackTrace);
         newResource.redirects = previousRedirects.concat(originalResource);
         return newResource;
@@ -282,7 +282,7 @@ WebInspector.NetworkDispatcher.prototype = {
 
     _startResource: function(resource)
     {
-        this._inflightResourcesById[resource.identifier] = resource;
+        this._inflightResourcesById[resource.requestId] = resource;
         this._inflightResourcesByURL[resource.url] = resource;
         this._dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceStarted, resource);
     },
@@ -297,7 +297,7 @@ WebInspector.NetworkDispatcher.prototype = {
         resource.endTime = finishTime;
         resource.finished = true;
         this._dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceFinished, resource);
-        delete this._inflightResourcesById[resource.identifier];
+        delete this._inflightResourcesById[resource.requestId];
         delete this._inflightResourcesByURL[resource.url];
     },
 
@@ -306,9 +306,9 @@ WebInspector.NetworkDispatcher.prototype = {
         this._manager.dispatchEventToListeners(eventType, resource);
     },
 
-    _createResource: function(identifier, frameId, loaderId, url, documentURL, initiator, stackTrace)
+    _createResource: function(requestId, frameId, loaderId, url, documentURL, initiator, stackTrace)
     {
-        var resource = new WebInspector.Resource(identifier, url, loaderId);
+        var resource = new WebInspector.Resource(requestId, url, loaderId);
         resource.documentURL = documentURL;
         resource.frameId = frameId;
         resource.initiator = initiator;
index 07bd506..d0b9572 100644 (file)
@@ -752,15 +752,15 @@ WebInspector.NetworkLogView.prototype = {
     {
         this._resources.push(resource);
         
-        // In case of redirect resource identifier is reassigned to a redirected 
+        // In case of redirect request id is reassigned to a redirected 
         // resource and we need to update _resourcesById ans search results. 
-        if (this._resourcesById[resource.identifier]) {
+        if (this._resourcesById[resource.requestId]) {
             var oldResource = resource.redirects[resource.redirects.length - 1];
-            this._resourcesById[oldResource.identifier] = oldResource;
+            this._resourcesById[oldResource.requestId] = oldResource;
             
-            this._updateSearchMatchedListAfterResourceIdentifierChanged(resource.identifier, oldResource.identifier);
+            this._updateSearchMatchedListAfterRequestIdChanged(resource.requestId, oldResource.requestId);
         }
-        this._resourcesById[resource.identifier] = resource;
+        this._resourcesById[resource.requestId] = resource;
         
         this._resourcesByURL[resource.url] = resource;
 
@@ -1118,12 +1118,12 @@ WebInspector.NetworkLogView.prototype = {
         if ((!resource.displayName || !resource.displayName.match(this._searchRegExp)) && !resource.folder.match(this._searchRegExp))
             return -1;
 
-        if (resource.identifier in this._matchedResourcesMap)
-            return this._matchedResourcesMap[resource.identifier];
+        if (resource.requestId in this._matchedResourcesMap)
+            return this._matchedResourcesMap[resource.requestId];
 
         var matchedResourceIndex = this._matchedResources.length;
-        this._matchedResourcesMap[resource.identifier] = matchedResourceIndex;
-        this._matchedResources.push(resource.identifier);
+        this._matchedResourcesMap[resource.requestId] = matchedResourceIndex;
+        this._matchedResources.push(resource.requestId);
 
         return matchedResourceIndex;
     },
@@ -1135,13 +1135,13 @@ WebInspector.NetworkLogView.prototype = {
         this._highlightNthMatchedResource(-1, false);
     },
 
-    _updateSearchMatchedListAfterResourceIdentifierChanged: function(oldIdentifier, newIdentifier)
+    _updateSearchMatchedListAfterRequestIdChanged: function(oldRequestId, newRequestId)
     {
-        var resourceIndex = this._matchedResourcesMap[oldIdentifier];
+        var resourceIndex = this._matchedResourcesMap[oldRequestId];
         if (resourceIndex) {
-            delete this._matchedResourcesMap[oldIdentifier];
-            this._matchedResourcesMap[newIdentifier] = resourceIndex;
-            this._matchedResources[resourceIndex] = newIdentifier;
+            delete this._matchedResourcesMap[oldRequestId];
+            this._matchedResourcesMap[newRequestId] = resourceIndex;
+            this._matchedResources[resourceIndex] = newRequestId;
         }
     },
 
@@ -1192,9 +1192,9 @@ WebInspector.NetworkLogView.prototype = {
     performSearch: function(searchQuery, sortOrFilterApplied)
     {
         var newMatchedResourceIndex = 0;
-        var currentMatchedResourceId;
+        var currentMatchedRequestId;
         if (this._currentMatchedResourceIndex !== -1)
-            currentMatchedResourceId = this._matchedResources[this._currentMatchedResourceIndex];
+            currentMatchedRequestId = this._matchedResources[this._currentMatchedResourceIndex];
 
         if (!sortOrFilterApplied)
             this._searchRegExp = createSearchRegex(searchQuery);
@@ -1209,7 +1209,7 @@ WebInspector.NetworkLogView.prototype = {
             if (dataGridNode.isFilteredOut())
                 continue;
 
-            if (this._matchResource(dataGridNode._resource) !== -1 && dataGridNode._resource.identifier === currentMatchedResourceId)
+            if (this._matchResource(dataGridNode._resource) !== -1 && dataGridNode._resource.requestId === currentMatchedRequestId)
                 newMatchedResourceIndex = this._matchedResources.length - 1;
         }
 
index cf84396..9df6a35 100644 (file)
@@ -25,9 +25,9 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-WebInspector.Resource = function(identifier, url, loaderId)
+WebInspector.Resource = function(requestId, url, loaderId)
 {
-    this.identifier = identifier;
+    this.requestId = requestId;
     this.url = url;
     this.loaderId = loaderId;
     this._startTime = -1;
index ba485be..5b63ce9 100644 (file)
@@ -371,12 +371,12 @@ WebInspector.TimelinePanel.prototype = {
     _addRecordToTimeline: function(record)
     {
         if (record.type === WebInspector.TimelineAgent.RecordType.ResourceSendRequest) {
-            var isMainResource = (record.data.identifier === WebInspector.mainResource.identifier);
-            if (isMainResource && this._mainResourceIdentifier !== record.data.identifier) {
+            var isMainResource = (record.data.requestId === WebInspector.mainResource.requestId);
+            if (isMainResource && this._mainRequestId !== record.data.requestId) {
                 // We are loading new main resource -> clear the panel. Check above is necessary since
                 // there may be several resource loads with main resource marker upon redirects, redirects are reported with
-                // the original identifier.
-                this._mainResourceIdentifier = record.data.identifier;
+                // the original request id.
+                this._mainRequestId = record.data.requestId;
                 this._clearPanel();
             }
         }
@@ -392,7 +392,7 @@ WebInspector.TimelinePanel.prototype = {
         if (record.type === recordTypes.ResourceReceiveResponse ||
             record.type === recordTypes.ResourceFinish ||
             record.type === recordTypes.ResourceReceivedData)
-            parentRecord = this._sendRequestRecords[record.data.identifier];
+            parentRecord = this._sendRequestRecords[record.data.requestId];
         else if (record.type === recordTypes.TimerFire)
             parentRecord = this._timerRecords[record.data.timerId];
         else if (record.type === recordTypes.ResourceSendRequest)
@@ -972,11 +972,11 @@ WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, pane
     }
     // Make resource receive record last since request was sent; make finish record last since response received.
     if (record.type === recordTypes.ResourceSendRequest) {
-        panel._sendRequestRecords[record.data.identifier] = this;
+        panel._sendRequestRecords[record.data.requestId] = this;
     } else if (record.type === recordTypes.ScheduleResourceRequest) {
         panel._scheduledResourceRequests[record.data.url] = this;
     } else if (record.type === recordTypes.ResourceReceiveResponse) {
-        var sendRequestRecord = panel._sendRequestRecords[record.data.identifier];
+        var sendRequestRecord = panel._sendRequestRecords[record.data.requestId];
         if (sendRequestRecord) { // False if we started instrumentation in the middle of request.
             this.url = sendRequestRecord.url;
             // Now that we have resource in the collection, recalculate details in order to display short url.
@@ -985,7 +985,7 @@ WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, pane
                 sendRequestRecord.parent._refreshDetails();
         }
     } else if (record.type === recordTypes.ResourceReceivedData || record.type === recordTypes.ResourceFinish) {
-        var sendRequestRecord = panel._sendRequestRecords[record.data.identifier];
+        var sendRequestRecord = panel._sendRequestRecords[record.data.requestId];
         if (sendRequestRecord) // False for main resource.
             this.url = sendRequestRecord.url;
     } else if (record.type === recordTypes.TimerInstall) {