Changeset 125677 in webkit


Ignore:
Timestamp:
Aug 15, 2012 8:56:28 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Use default parameter on reportResult in InspectorFileSystemAgent
https://bugs.webkit.org/show_bug.cgi?id=93930

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-08-15
Reviewed by Vsevolod Vlasov.

No functional change.

  • inspector/InspectorFileSystemAgent.cpp:

(WebCore):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r125673 r125677  
     12012-08-15  Taiju Tsuiki  <tzik@chromium.org>
     2
     3        Web Inspector: Use default parameter on reportResult in InspectorFileSystemAgent
     4        https://bugs.webkit.org/show_bug.cgi?id=93930
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        No functional change.
     9
     10        * inspector/InspectorFileSystemAgent.cpp:
     11        (WebCore):
     12
    1132012-08-15  Vsevolod Vlasov  <vsevik@chromium.org>
    214
  • trunk/Source/WebCore/inspector/InspectorFileSystemAgent.cpp

    r122652 r125677  
    156156    bool didGetEntry(Entry*);
    157157
    158     void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Entry> entry)
     158    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Entry> entry = 0)
    159159    {
    160160        if (!m_frontendProvider || !m_frontendProvider->frontend())
     
    176176bool FileSystemRootRequest::didHitError(FileError* error)
    177177{
    178     reportResult(error->code(), 0);
     178    reportResult(error->code());
    179179    return true;
    180180}
     
    209209    virtual ~DirectoryContentRequest()
    210210    {
    211         reportResult(FileError::ABORT_ERR, 0);
     211        reportResult(FileError::ABORT_ERR);
    212212    }
    213213
     
    217217    bool didHitError(FileError* error)
    218218    {
    219         reportResult(error->code(), 0);
     219        reportResult(error->code());
    220220        return true;
    221221    }
     
    224224    bool didReadDirectoryEntries(EntryArray*);
    225225
    226     void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuilder::FileSystem::Entry> > entries)
     226    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuilder::FileSystem::Entry> > entries = 0)
    227227    {
    228228        if (!m_frontendProvider || !m_frontendProvider->frontend())
     
    253253    String path;
    254254    if (!DOMFileSystemBase::crackFileSystemURL(m_url, type, path)) {
    255         reportResult(FileError::SYNTAX_ERR, 0);
     255        reportResult(FileError::SYNTAX_ERR);
    256256        return;
    257257    }
     
    267267{
    268268    if (!entry->isDirectory()) {
    269         reportResult(FileError::TYPE_MISMATCH_ERR, 0);
     269        reportResult(FileError::TYPE_MISMATCH_ERR);
    270270        return true;
    271271    }
     
    280280{
    281281    if (!m_directoryReader->filesystem()->scriptExecutionContext()) {
    282         reportResult(FileError::ABORT_ERR, 0);
     282        reportResult(FileError::ABORT_ERR);
    283283        return;
    284284    }
     
    341341    virtual ~MetadataRequest()
    342342    {
    343         reportResult(FileError::ABORT_ERR, 0);
    344     }
    345 
     343        reportResult(FileError::ABORT_ERR);
     344    }
     345
     346    void start(ScriptExecutionContext*);
     347
     348private:
    346349    bool didHitError(FileError* error)
    347350    {
    348         reportResult(error->code(), 0);
     351        reportResult(error->code());
    349352        return true;
    350353    }
    351354
    352     void start(ScriptExecutionContext*);
    353355    bool didGetEntry(Entry*);
    354356    bool didGetMetadata(Metadata*);
    355357
    356     void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Metadata> metadata)
     358    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Metadata> metadata = 0)
    357359    {
    358360        if (!m_frontendProvider || !m_frontendProvider->frontend())
     
    362364    }
    363365
    364 private:
    365366    MetadataRequest(PassRefPtr<FrontendProvider> frontendProvider, int requestId, const String& url)
    366367        : m_frontendProvider(frontendProvider)
     
    390391{
    391392    if (!entry->filesystem()->scriptExecutionContext()) {
    392         reportResult(FileError::ABORT_ERR, 0);
     393        reportResult(FileError::ABORT_ERR);
    393394        return true;
    394395    }
     
    421422    virtual ~FileContentRequest()
    422423    {
    423         reportResult(FileError::ABORT_ERR, 0, 0);
     424        reportResult(FileError::ABORT_ERR);
    424425    }
    425426
    426427    void start(ScriptExecutionContext*);
    427 
    428428
    429429    virtual bool operator==(const EventListener& other) OVERRIDE
     
    443443    bool didHitError(FileError* error)
    444444    {
    445         reportResult(error->code(), 0, 0);
     445        reportResult(error->code());
    446446        return true;
    447447    }
     
    451451    void didRead();
    452452
    453     void reportResult(FileError::ErrorCode errorCode, const String* result, const String* charset)
     453    void reportResult(FileError::ErrorCode errorCode, const String* result = 0, const String* charset = 0)
    454454    {
    455455        if (!m_frontendProvider || !m_frontendProvider->frontend())
     
    488488    String path;
    489489    if (!DOMFileSystemBase::crackFileSystemURL(m_url, type, path)) {
    490         reportResult(FileError::SYNTAX_ERR, 0, 0);
     490        reportResult(FileError::SYNTAX_ERR);
    491491        return;
    492492    }
     
    502502{
    503503    if (entry->isDirectory()) {
    504         reportResult(FileError::TYPE_MISMATCH_ERR, 0, 0);
     504        reportResult(FileError::TYPE_MISMATCH_ERR);
    505505        return true;
    506506    }
    507507
    508508    if (!entry->filesystem()->scriptExecutionContext()) {
    509         reportResult(FileError::ABORT_ERR, 0, 0);
     509        reportResult(FileError::ABORT_ERR);
    510510        return true;
    511511    }
     
    549549}
    550550
    551 }
     551} // anonymous namespace
    552552
    553553// static
Note: See TracChangeset for help on using the changeset viewer.