Web Inspector: Rename methods ending in *Json() as *JSON()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 05:31:19 +0000 (05:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 05:31:19 +0000 (05:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177793

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-02
Reviewed by Matt Baker.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::didReceiveResponse):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::resourceTypeJSON):
(WebCore::InspectorPageAgent::cachedResourceTypeJSON):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
(WebCore::InspectorPageAgent::resourceTypeJson): Deleted.
(WebCore::InspectorPageAgent::cachedResourceTypeJson): Deleted.
* inspector/InspectorPageAgent.h:

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorNetworkAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h

index dfe0b1d..e7bbbce 100644 (file)
@@ -1,3 +1,22 @@
+2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Rename methods ending in *Json() as *JSON()
+        https://bugs.webkit.org/show_bug.cgi?id=177793
+
+        Reviewed by Matt Baker.
+
+        * inspector/InspectorNetworkAgent.cpp:
+        (WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
+        (WebCore::InspectorNetworkAgent::willSendRequest):
+        (WebCore::InspectorNetworkAgent::didReceiveResponse):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::resourceTypeJSON):
+        (WebCore::InspectorPageAgent::cachedResourceTypeJSON):
+        (WebCore::InspectorPageAgent::buildObjectForFrameTree):
+        (WebCore::InspectorPageAgent::resourceTypeJson): Deleted.
+        (WebCore::InspectorPageAgent::cachedResourceTypeJson): Deleted.
+        * inspector/InspectorPageAgent.h:
+
 2017-10-02  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         REGRESSION(r222595): Intermittent crash while accessing DataTransferItemList
index 72fa1ee..e2f9764 100644 (file)
@@ -307,7 +307,7 @@ Ref<Inspector::Protocol::Network::CachedResource> InspectorNetworkAgent::buildOb
 {
     auto resourceObject = Inspector::Protocol::Network::CachedResource::create()
         .setUrl(cachedResource->url())
-        .setType(InspectorPageAgent::cachedResourceTypeJson(*cachedResource))
+        .setType(InspectorPageAgent::cachedResourceTypeJSON(*cachedResource))
         .setBodySize(cachedResource->encodedSize())
         .release();
 
@@ -365,7 +365,7 @@ void InspectorNetworkAgent::willSendRequest(unsigned long identifier, DocumentLo
     for (auto& entry : m_extraRequestHeaders)
         request.setHTTPHeaderField(entry.key, entry.value);
 
-    Inspector::Protocol::Page::ResourceType protocolResourceType = InspectorPageAgent::resourceTypeJson(type);
+    auto protocolResourceType = InspectorPageAgent::resourceTypeJSON(type);
 
     RefPtr<Inspector::Protocol::Network::Initiator> initiatorObject = buildInitiatorObject(loader.frame() ? loader.frame()->document() : nullptr);
     String targetId = request.initiatorIdentifier();
@@ -438,7 +438,7 @@ void InspectorNetworkAgent::didReceiveResponse(unsigned long identifier, Documen
     m_resourcesData->responseReceived(requestId, m_pageAgent->frameId(loader.frame()), response);
     m_resourcesData->setResourceType(requestId, type);
 
-    m_frontendDispatcher->responseReceived(requestId, m_pageAgent->frameId(loader.frame()), m_pageAgent->loaderId(&loader), timestamp(), InspectorPageAgent::resourceTypeJson(type), resourceResponse);
+    m_frontendDispatcher->responseReceived(requestId, m_pageAgent->frameId(loader.frame()), m_pageAgent->loaderId(&loader), timestamp(), InspectorPageAgent::resourceTypeJSON(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.
index 78ff79f..50213ea 100644 (file)
@@ -246,7 +246,7 @@ CachedResource* InspectorPageAgent::cachedResource(Frame* frame, const URL& url)
     return cachedResource;
 }
 
-Inspector::Protocol::Page::ResourceType InspectorPageAgent::resourceTypeJson(InspectorPageAgent::ResourceType resourceType)
+Inspector::Protocol::Page::ResourceType InspectorPageAgent::resourceTypeJSON(InspectorPageAgent::ResourceType resourceType)
 {
     switch (resourceType) {
     case DocumentResource:
@@ -320,9 +320,9 @@ InspectorPageAgent::ResourceType InspectorPageAgent::inspectorResourceType(const
     return inspectorResourceType(cachedResource.type());
 }
 
-Inspector::Protocol::Page::ResourceType InspectorPageAgent::cachedResourceTypeJson(const CachedResource& cachedResource)
+Inspector::Protocol::Page::ResourceType InspectorPageAgent::cachedResourceTypeJSON(const CachedResource& cachedResource)
 {
-    return resourceTypeJson(inspectorResourceType(cachedResource));
+    return resourceTypeJSON(inspectorResourceType(cachedResource));
 }
 
 RefPtr<TextResourceDecoder> InspectorPageAgent::createTextDecoder(const String& mimeType, const String& textEncodingName)
@@ -849,7 +849,7 @@ Ref<Inspector::Protocol::Page::FrameResourceTree> InspectorPageAgent::buildObjec
     for (auto* cachedResource : cachedResourcesForFrame(frame)) {
         auto resourceObject = Inspector::Protocol::Page::FrameResource::create()
             .setUrl(cachedResource->url())
-            .setType(cachedResourceTypeJson(*cachedResource))
+            .setType(cachedResourceTypeJSON(*cachedResource))
             .setMimeType(cachedResource->response().mimeType())
             .release();
         if (cachedResource->wasCanceled())
index 073d7c5..ada059d 100644 (file)
@@ -85,10 +85,10 @@ public:
     static String sourceMapURLForResource(CachedResource*);
 
     static CachedResource* cachedResource(Frame*, const URL&);
-    static Inspector::Protocol::Page::ResourceType resourceTypeJson(ResourceType);
+    static Inspector::Protocol::Page::ResourceType resourceTypeJSON(ResourceType);
     static ResourceType inspectorResourceType(CachedResource::Type);
     static ResourceType inspectorResourceType(const CachedResource&);
-    static Inspector::Protocol::Page::ResourceType cachedResourceTypeJson(const CachedResource&);
+    static Inspector::Protocol::Page::ResourceType cachedResourceTypeJSON(const CachedResource&);
     static RefPtr<TextResourceDecoder> createTextDecoder(const String& mimeType, const String& textEncodingName);
 
     // Page API for InspectorFrontend