⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 118644 in webkit


Ignore:
Timestamp:
May 27, 2012, 9:22:47 PM (14 years ago)
Author:
benjamin@webkit.org
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.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r118643 r118644  
     12012-05-27  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Minor code cleaning for the interface of MainResourceLoader
     4        https://bugs.webkit.org/show_bug.cgi?id=87607
     5
     6        Reviewed by Darin Adler.
     7
     8        * loader/MainResourceLoader.cpp:
     9        (WebCore::MainResourceLoader::MainResourceLoader):
     10        (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
     11        (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
     12        * loader/MainResourceLoader.h:
     13        (MainResourceLoader):
     14        -Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
     15        -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
     16        -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
     17         only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
     18
    1192012-05-27  Yoshifumi Inoue  <yosin@chromium.org>
    220
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r118631 r118644  
    7373MainResourceLoader::MainResourceLoader(Frame* frame)
    7474    : ResourceLoader(frame, ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck))
    75     , m_dataLoadTimer(this, &MainResourceLoader::handleDataLoadNow)
     75    , m_dataLoadTimer(this, &MainResourceLoader::handleSubstituteDataLoadNow)
    7676    , m_loadingMultipartContent(false)
    7777    , m_waitingForContentPolicy(false)
     
    581581}
    582582
    583 void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*)
     583void MainResourceLoader::handleSubstituteDataLoadNow(MainResourceLoaderTimer*)
    584584{
    585585    RefPtr<MainResourceLoader> protect(this);
     
    614614        startDataLoadTimer();
    615615    else
    616         handleDataLoadNow(0);
     616        handleSubstituteDataLoadNow(0);
    617617}
    618618
  • trunk/Source/WebCore/loader/MainResourceLoader.h

    r118631 r118644  
    5656
    5757        void load(const ResourceRequest&, const SubstituteData&);
    58         virtual void addData(const char*, int, bool allAtOnce);
     58        virtual void addData(const char*, int, bool allAtOnce) OVERRIDE;
    5959
    60         virtual void setDefersLoading(bool);
     60        virtual void setDefersLoading(bool) OVERRIDE;
    6161
    62         virtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);
    63         virtual void didReceiveResponse(const ResourceResponse&);
    64         virtual void didReceiveData(const char*, int, long long encodedDataLength, bool allAtOnce);
    65         virtual void didFinishLoading(double finishTime);
    66         virtual void didFail(const ResourceError&);
     62        virtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse) OVERRIDE;
     63        virtual void didReceiveResponse(const ResourceResponse&) OVERRIDE;
     64        virtual void didReceiveData(const char*, int, long long encodedDataLength, bool allAtOnce) OVERRIDE;
     65        virtual void didFinishLoading(double finishTime) OVERRIDE;
     66        virtual void didFail(const ResourceError&) OVERRIDE;
    6767
    6868#if HAVE(RUNLOOP_TIMER)
     
    7272#endif
    7373
    74         void handleDataLoadNow(MainResourceLoaderTimer*);
    75 
    7674        bool isLoadingMultipartContent() const { return m_loadingMultipartContent; }
    7775
     
    7977        MainResourceLoader(Frame*);
    8078
    81         virtual void willCancel(const ResourceError&);
    82         virtual void didCancel(const ResourceError&);
     79        virtual void willCancel(const ResourceError&) OVERRIDE;
     80        virtual void didCancel(const ResourceError&) OVERRIDE;
    8381
    8482        bool loadNow(ResourceRequest&);
     
    8684        void handleEmptyLoad(const KURL&, bool forURLScheme);
    8785        void handleSubstituteDataLoadSoon(const ResourceRequest&);
     86        void handleSubstituteDataLoadNow(MainResourceLoaderTimer*);
    8887
    8988        void startDataLoadTimer();
    90         void handleDataLoad(ResourceRequest&);
    9189
    9290        void receivedError(const ResourceError&);
Note: See TracChangeset for help on using the changeset viewer.