Bug 89420

Summary: Web Inspector: Unify FileSystem callbacks.
Product: WebKit Reporter: Taiju Tsuiki <tzik>
Component: Web Inspector (Deprecated)Assignee: Taiju Tsuiki <tzik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 88602    
Bug Blocks: 68203, 87856, 89642    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Taiju Tsuiki 2012-06-18 22:07:03 PDT
InspectorFileSystemAgent.cpp has some callback dispatcher classes which are almost same each other, and similar class is going to increase in this way.
I'd like to unify them to single template class to reduce duplication.
Comment 1 Taiju Tsuiki 2012-06-18 22:10:00 PDT
Created attachment 148246 [details]
Patch
Comment 2 Vsevolod Vlasov 2012-06-21 01:30:57 PDT
Comment on attachment 148246 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148246&action=review

> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:181
> +    RefPtr<EntryCallback> successCallback = createCallbackDispatcher(TypeParam<EntryCallback>(), this, &GetFileSystemRootTask::gotEntry);

I think you can remove TypaParam argument and do 
  createCallbackDispatcher<EntryCallback>(this, &GetFileSystemRootTask::gotEntry); 
instead.
Comment 3 Taiju Tsuiki 2012-06-21 04:13:08 PDT
Created attachment 148762 [details]
Patch
Comment 4 Taiju Tsuiki 2012-06-21 04:20:52 PDT
Comment on attachment 148246 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148246&action=review

>> Source/WebCore/inspector/InspectorFileSystemAgent.cpp:181
>> +    RefPtr<EntryCallback> successCallback = createCallbackDispatcher(TypeParam<EntryCallback>(), this, &GetFileSystemRootTask::gotEntry);
> 
> I think you can remove TypaParam argument and do 
>   createCallbackDispatcher<EntryCallback>(this, &GetFileSystemRootTask::gotEntry); 
> instead.

We can't pass template parameter partially. Another option is like that: CallbackDispatcher<EntryCallback>::create(...).
Is it acceptable?
Comment 5 Taiju Tsuiki 2012-06-21 06:52:42 PDT
Created attachment 148789 [details]
Patch
Comment 6 WebKit Review Bot 2012-06-21 08:28:26 PDT
Comment on attachment 148789 [details]
Patch

Clearing flags on attachment: 148789

Committed r120926: <http://trac.webkit.org/changeset/120926>
Comment 7 WebKit Review Bot 2012-06-21 08:28:32 PDT
All reviewed patches have been landed.  Closing bug.