Bug 41993 - WebKit API for WebInspector-Appcache integration for chrome.
Summary: WebKit API for WebInspector-Appcache integration for chrome.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 14:45 PDT by Kavita Kanetkar
Modified: 2010-07-15 11:41 PDT (History)
4 users (show)

See Also:


Attachments
WebKitAPI (3.37 KB, patch)
2010-07-14 14:37 PDT, Michael Nordman
fishd: review-
Details | Formatted Diff | Diff
WebKitAPI with tweeks (5.61 KB, patch)
2010-07-14 17:19 PDT, Michael Nordman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kavita Kanetkar 2010-07-09 14:45:36 PDT
Related to : Bug 24529.
Comment 1 Michael Nordman 2010-07-14 14:37:47 PDT
Created attachment 61568 [details]
WebKitAPI
Comment 2 Darin Fisher (:fishd, Google) 2010-07-14 16:48:24 PDT
Comment on attachment 61568 [details]
WebKitAPI

WebKit/chromium/public/WebApplicationCacheHost.h:96
 +      struct ApplicationCacheInfo {
this struct is contained in the WebApplicationCacheHost "namespace"
so the ApplicationCache prefix here is a bit redundant.  however,
just calling it Info seems too vague.  maybe CacheInfo is enough
since you use the method name getAssociatedCacheInfo?


WebKit/chromium/public/WebApplicationCacheHost.h:97
 +          WebURL manifestUrl; // Empty if there is no associated cache.
nit: manifestUrl -> manifestURL

WebKit/chromium/public/WebApplicationCacheHost.h:113
 +      // FIXME: Make these pure virtual after chrome has caught up.
Actually, our convention for WebKit API interfaces that are
implemented by the embedder is that they should not have pure
virtual methods.

WebKit/chromium/public/WebApplicationCacheHostClient.h:43
 +      virtual void didChangeCacheAssociation() { return; } // FIXME: Make this pure virtual.
this one can be pure virtual now since you can provide a dummy
implementation in ApplicationCacheHostInternal.h.

WebKit/chromium/public/WebApplicationCacheHost.h:114
 +      virtual void getAssociatedCacheInfo(ApplicationCacheInfo*) { return; }
style-nit: no need for the return statements

WebKit/chromium/public/WebApplicationCacheHost.h:116
 +      virtual void deleteAssociatedCacheGroup() { return; }
it is unclear to me why this is called deleteAssociatedCacheGroup
and not deleteAssociatedCache given the method named
getAssociatedCacheInfo.
Comment 3 Michael Nordman 2010-07-14 16:58:13 PDT
Thnx for looking.

(In reply to comment #2)
> (From update of attachment 61568 [details])
> WebKit/chromium/public/WebApplicationCacheHost.h:96
>  +      struct ApplicationCacheInfo {
> this struct is contained in the WebApplicationCacheHost "namespace"
> so the ApplicationCache prefix here is a bit redundant.  however,
> just calling it Info seems too vague.  maybe CacheInfo is enough
> since you use the method name getAssociatedCacheInfo?

CacheInfo it is!

> WebKit/chromium/public/WebApplicationCacheHost.h:97
>  +          WebURL manifestUrl; // Empty if there is no associated cache.
> nit: manifestUrl -> manifestURL

will do

> WebKit/chromium/public/WebApplicationCacheHost.h:113
>  +      // FIXME: Make these pure virtual after chrome has caught up.
> Actually, our convention for WebKit API interfaces that are
> implemented by the embedder is that they should not have pure
> virtual methods.

hmmm... then i suppose i should change all the others as well (yes?)

> WebKit/chromium/public/WebApplicationCacheHostClient.h:43
>  +      virtual void didChangeCacheAssociation() { return; } // FIXME: Make this pure virtual.
> this one can be pure virtual now since you can provide a dummy
> implementation in ApplicationCacheHostInternal.h.

ok, will do

> WebKit/chromium/public/WebApplicationCacheHost.h:114
>  +      virtual void getAssociatedCacheInfo(ApplicationCacheInfo*) { return; }
> style-nit: no need for the return statements

duh

> WebKit/chromium/public/WebApplicationCacheHost.h:116
>  +      virtual void deleteAssociatedCacheGroup() { return; }
> it is unclear to me why this is called deleteAssociatedCacheGroup
> and not deleteAssociatedCache given the method named
> getAssociatedCacheInfo.

Because the action will be to delete everything related to the manifestURL. In appcache speak, that's an ApplicationCacheGroup. I'd be ok with using deleteAssociatedCache shorthand here, but really the addition of "Group" is more descriptive.
Comment 4 Michael Nordman 2010-07-14 17:19:27 PDT
Created attachment 61586 [details]
WebKitAPI with tweeks
Comment 5 Michael Nordman 2010-07-14 17:43:47 PDT
cc'ing joepeck too
Comment 6 Michael Nordman 2010-07-14 17:45:54 PDT
... and fishd
Comment 7 Kavita Kanetkar 2010-07-15 10:38:43 PDT
public/WebApplicationCacheHost.h 111
ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit(false), isForeign(false), isFallback(false) { }

^^^
Can we add url to this ?
Comment 8 Kavita Kanetkar 2010-07-15 11:10:25 PDT
Sorry, I meant can we add c'tor that assigns to members? Not a big deal.
Comment 9 WebKit Commit Bot 2010-07-15 11:37:45 PDT
Comment on attachment 61586 [details]
WebKitAPI with tweeks

Clearing flags on attachment: 61586

Committed r63440: <http://trac.webkit.org/changeset/63440>
Comment 10 WebKit Commit Bot 2010-07-15 11:37:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Michael Nordman 2010-07-15 11:41:13 PDT
> Sorry, I meant can we add c'tor that assigns to members? Not a big deal.

I think we generally don't like to put code in these .h file, just the interfaces, i was 'iffy' on adding the default ctor already. Anyway that's why i didn't put another ctor there.