Title: [118644] trunk/Source/WebCore
Revision
118644
Author
[email protected]
Date
2012-05-27 21:22:47 -0700 (Sun, 27 May 2012)

Log Message

Minor code cleaning for the interface of MainResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=87607

Reviewed by Darin Adler.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::MainResourceLoader):
(WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
(WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
* loader/MainResourceLoader.h:
(MainResourceLoader):
-Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
-Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
-Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
 only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118643 => 118644)


--- trunk/Source/WebCore/ChangeLog	2012-05-28 02:26:35 UTC (rev 118643)
+++ trunk/Source/WebCore/ChangeLog	2012-05-28 04:22:47 UTC (rev 118644)
@@ -1,3 +1,21 @@
+2012-05-27  Benjamin Poulain  <[email protected]>
+
+        Minor code cleaning for the interface of MainResourceLoader
+        https://bugs.webkit.org/show_bug.cgi?id=87607
+
+        Reviewed by Darin Adler.
+
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::MainResourceLoader):
+        (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
+        (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
+        * loader/MainResourceLoader.h:
+        (MainResourceLoader):
+        -Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
+        -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
+        -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
+         only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
+
 2012-05-27  Yoshifumi Inoue  <[email protected]>
 
         [WTF] Introduce UINT64_C to MathExtras.h

Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (118643 => 118644)


--- trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-05-28 02:26:35 UTC (rev 118643)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-05-28 04:22:47 UTC (rev 118644)
@@ -72,7 +72,7 @@
 
 MainResourceLoader::MainResourceLoader(Frame* frame)
     : ResourceLoader(frame, ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck))
-    , m_dataLoadTimer(this, &MainResourceLoader::handleDataLoadNow)
+    , m_dataLoadTimer(this, &MainResourceLoader::handleSubstituteDataLoadNow)
     , m_loadingMultipartContent(false)
     , m_waitingForContentPolicy(false)
     , m_timeOfLastDataReceived(0.0)
@@ -580,7 +580,7 @@
     didReceiveResponse(response);
 }
 
-void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*)
+void MainResourceLoader::handleSubstituteDataLoadNow(MainResourceLoaderTimer*)
 {
     RefPtr<MainResourceLoader> protect(this);
 
@@ -613,7 +613,7 @@
     if (m_documentLoader->deferMainResourceDataLoad())
         startDataLoadTimer();
     else
-        handleDataLoadNow(0);
+        handleSubstituteDataLoadNow(0);
 }
 
 bool MainResourceLoader::loadNow(ResourceRequest& r)

Modified: trunk/Source/WebCore/loader/MainResourceLoader.h (118643 => 118644)


--- trunk/Source/WebCore/loader/MainResourceLoader.h	2012-05-28 02:26:35 UTC (rev 118643)
+++ trunk/Source/WebCore/loader/MainResourceLoader.h	2012-05-28 04:22:47 UTC (rev 118644)
@@ -55,15 +55,15 @@
         virtual ~MainResourceLoader();
 
         void load(const ResourceRequest&, const SubstituteData&);
-        virtual void addData(const char*, int, bool allAtOnce);
+        virtual void addData(const char*, int, bool allAtOnce) OVERRIDE;
 
-        virtual void setDefersLoading(bool);
+        virtual void setDefersLoading(bool) OVERRIDE;
 
-        virtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);
-        virtual void didReceiveResponse(const ResourceResponse&);
-        virtual void didReceiveData(const char*, int, long long encodedDataLength, bool allAtOnce);
-        virtual void didFinishLoading(double finishTime);
-        virtual void didFail(const ResourceError&);
+        virtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse) OVERRIDE;
+        virtual void didReceiveResponse(const ResourceResponse&) OVERRIDE;
+        virtual void didReceiveData(const char*, int, long long encodedDataLength, bool allAtOnce) OVERRIDE;
+        virtual void didFinishLoading(double finishTime) OVERRIDE;
+        virtual void didFail(const ResourceError&) OVERRIDE;
 
 #if HAVE(RUNLOOP_TIMER)
         typedef RunLoopTimer<MainResourceLoader> MainResourceLoaderTimer;
@@ -71,23 +71,21 @@
         typedef Timer<MainResourceLoader> MainResourceLoaderTimer;
 #endif
 
-        void handleDataLoadNow(MainResourceLoaderTimer*);
-
         bool isLoadingMultipartContent() const { return m_loadingMultipartContent; }
 
     private:
         MainResourceLoader(Frame*);
 
-        virtual void willCancel(const ResourceError&);
-        virtual void didCancel(const ResourceError&);
+        virtual void willCancel(const ResourceError&) OVERRIDE;
+        virtual void didCancel(const ResourceError&) OVERRIDE;
 
         bool loadNow(ResourceRequest&);
 
         void handleEmptyLoad(const KURL&, bool forURLScheme);
         void handleSubstituteDataLoadSoon(const ResourceRequest&);
+        void handleSubstituteDataLoadNow(MainResourceLoaderTimer*);
 
         void startDataLoadTimer();
-        void handleDataLoad(ResourceRequest&);
 
         void receivedError(const ResourceError&);
         ResourceError interruptedForPolicyChangeError() const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to