2009-03-13 John Abd-El-Malek <jam@google.com>
authordimich@chromium.org <dimich@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Mar 2009 00:53:28 +0000 (00:53 +0000)
committerdimich@chromium.org <dimich@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Mar 2009 00:53:28 +0000 (00:53 +0000)
        Reviewed by Darin Fisher.

        https://bugs.webkit.org/show_bug.cgi?id=24593
        Added requestorID so we can track the request to its WebView without using frame (which was removed).

        * platform/network/chromium/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::requestorID):
        (WebCore::ResourceRequest::setRequestorID):
        (WebCore::ResourceRequest::setTargetType):
        (WebCore::ResourceRequest::policyURL):
        (WebCore::ResourceRequest::setPolicyURL):
        (WebCore::ResourceRequest::requestorPid):
        (WebCore::ResourceRequest::setRequestorPid):

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

WebCore/ChangeLog
WebCore/platform/network/chromium/ResourceRequest.h

index d2d87d9300fa3e88c07ad74b063c5fbc714493d4..0671e88d7d69753680531373c700860914f72763 100644 (file)
@@ -1,3 +1,20 @@
+2009-03-13  John Abd-El-Malek  <jam@google.com>
+
+        Reviewed by Darin Fisher.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24593
+        Added requestorID so we can track the request to its WebView without using frame (which was removed).
+
+        * platform/network/chromium/ResourceRequest.h:
+        (WebCore::ResourceRequest::ResourceRequest):
+        (WebCore::ResourceRequest::requestorID):
+        (WebCore::ResourceRequest::setRequestorID):
+        (WebCore::ResourceRequest::setTargetType):
+        (WebCore::ResourceRequest::policyURL):
+        (WebCore::ResourceRequest::setPolicyURL):
+        (WebCore::ResourceRequest::requestorPid):
+        (WebCore::ResourceRequest::setRequestorPid):
+
 2009-03-13  Mike Belshe  <mike@belshe.com>
 
         Reviewed by Dimitri Glazkov.
 2009-03-13  Mike Belshe  <mike@belshe.com>
 
         Reviewed by Dimitri Glazkov.
index 5bdd35d79c062cf844b68c628a6aee16745c0e0c..b14dba67ff0ad25fd40c47127dcebc075a543bdd 100644 (file)
@@ -47,16 +47,16 @@ namespace WebCore {
 
         ResourceRequest(const String& url) 
             : ResourceRequestBase(KURL(url), UseProtocolCachePolicy)
 
         ResourceRequest(const String& url) 
             : ResourceRequestBase(KURL(url), UseProtocolCachePolicy)
-            , m_frame(0)
-            , m_originPid(0)
+            , m_requestorID(0)
+            , m_requestorProcessID(0)
             , m_targetType(TargetIsSubResource)
         {
         }
 
         ResourceRequest(const KURL& url, const CString& securityInfo) 
             : ResourceRequestBase(url, UseProtocolCachePolicy)
             , m_targetType(TargetIsSubResource)
         {
         }
 
         ResourceRequest(const KURL& url, const CString& securityInfo) 
             : ResourceRequestBase(url, UseProtocolCachePolicy)
-            , m_frame(0)
-            , m_originPid(0)
+            , m_requestorID(0)
+            , m_requestorProcessID(0)
             , m_targetType(TargetIsSubResource)
             , m_securityInfo(securityInfo)
         {
             , m_targetType(TargetIsSubResource)
             , m_securityInfo(securityInfo)
         {
@@ -64,16 +64,16 @@ namespace WebCore {
 
         ResourceRequest(const KURL& url) 
             : ResourceRequestBase(url, UseProtocolCachePolicy)
 
         ResourceRequest(const KURL& url) 
             : ResourceRequestBase(url, UseProtocolCachePolicy)
-            , m_frame(0)
-            , m_originPid(0)
+            , m_requestorID(0)
+            , m_requestorProcessID(0)
             , m_targetType(TargetIsSubResource)
         {
         }
 
         ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
             : ResourceRequestBase(url, policy)
             , m_targetType(TargetIsSubResource)
         {
         }
 
         ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
             : ResourceRequestBase(url, policy)
-            , m_frame(0)
-            , m_originPid(0)
+            , m_requestorID(0)
+            , m_requestorProcessID(0)
             , m_targetType(TargetIsSubResource)
         {
             setHTTPReferrer(referrer);
             , m_targetType(TargetIsSubResource)
         {
             setHTTPReferrer(referrer);
@@ -81,26 +81,30 @@ namespace WebCore {
         
         ResourceRequest()
             : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
         
         ResourceRequest()
             : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
-            , m_frame(0)
-            , m_originPid(0)
+            , m_requestorID(0)
+            , m_requestorProcessID(0)
             , m_targetType(TargetIsSubResource)
         {
         }
 
             , m_targetType(TargetIsSubResource)
         {
         }
 
-        // Provides context for the resource request.
-        Frame* frame() const { return m_frame; }
-        void setFrame(Frame* frame) { m_frame = frame; }
+        // Allows the request to be matched up with its requestor.
+        int requestorID() const { return m_requestorID; }
+        void setRequestorID(int requestorID) { m_requestorID = requestorID; }
 
         // What this request is for.
 
         // What this request is for.
-        void setTargetType(TargetType type) { m_targetType = type; }
         TargetType targetType() const { return m_targetType; }
         TargetType targetType() const { return m_targetType; }
-        
-        // The origin pid is the process id of the process from which this
-        // request originated. In the case of out-of-process plugins, this
-        // allows to link back the request to the plugin process (as it is
-        // processed through a render view process).
-        int originPid() const { return m_originPid; }
-        void setOriginPid(int originPid) { m_originPid = originPid; }
+        void setTargetType(TargetType type) { m_targetType = type; }
+
+        // The document's policy base url.
+        KURL policyURL() const { return m_policyURL; }
+        void setPolicyURL(const KURL& policyURL) { m_policyURL = policyURL; }
+
+        // The process id of the process from which this request originated. In
+        // the case of out-of-process plugins, this allows to link back the
+        // request to the plugin process (as it is processed through a render
+        // view process).
+        int requestorProcessID() const { return m_requestorProcessID; }
+        void setRequestorProcessID(int requestorProcessID) { m_requestorProcessID = requestorProcessID; }
 
         // Opaque buffer that describes the security state (including SSL
         // connection state) for the resource that should be reported when the
 
         // Opaque buffer that describes the security state (including SSL
         // connection state) for the resource that should be reported when the
@@ -117,10 +121,11 @@ namespace WebCore {
         void doUpdatePlatformRequest() {}
         void doUpdateResourceRequest() {}
 
         void doUpdatePlatformRequest() {}
         void doUpdateResourceRequest() {}
 
-        Frame* m_frame;
-        int m_originPid;
+        int m_requestorID;
+        int m_requestorProcessID;
         TargetType m_targetType;
         CString m_securityInfo;
         TargetType m_targetType;
         CString m_securityInfo;
+        KURL m_policyURL;
     };
 
 } // namespace WebCore
     };
 
 } // namespace WebCore