Closed Bug 393881 Opened 17 years ago Closed 17 years ago

update metrics extension to use places

Categories

(Toolkit Graveyard :: Data Collection/Metrics, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alex, Assigned: pete)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch updates extension to current api (obsolete) — Splinter Review
Here is the patch I've come up with to get the metrics extension to work with the most up to date version of places. The first patch does what *I think* is needed to make the extension work with the current places api. The second one nukes all the ifdef MOZ_PLACES_BOOKMARKS stuff and assumes that is what is happening. I've also updated the install.rdf to the extension wont be installed on pre-places clients. Review is definitely needed.
Assignee: nobody → polvi
Attachment #278432 - Attachment is patch: true
Attachment #278432 - Attachment mime type: application/octet-stream → text/plain
OS: Mac OS X → All
Hardware: PC → All
Version: unspecified → Trunk
taking bug, I have a patch that compiles on the trunk as the existing patch was calling on some interfaces that are now gone ...
Assignee: polvi → pete
Status: NEW → ASSIGNED
Attachment #278431 - Attachment is obsolete: true
Attachment #278432 - Attachment is obsolete: true
cc'ing Jan. Jan can you peer review this patch for me?
sure, I'll review it
Comment on attachment 288354 [details] [diff] [review] Complete single patch - compile w/ trunk >- PRInt64 folderID = 0; >- folder->GetFolderId(&folderID); >+ PRInt64 folderID; >+ child->GetItemId(&folderID); no need to init it to 0 anymore? >@@ -473,94 +465,7 @@ > nsUICommandCollector::LogBookmarkInfo(const nsString& id, > nsIMetricsEventItem* parentItem) > { >-#ifdef MOZ_PLACES_BOOKMARKS > // TODO: write me! > // see bug #356606 > return NS_OK; >- >-#else >- no implementation, does it work w/o out ?
> >- PRInt64 folderID = 0; > >+ PRInt64 folderID; > no need to init it to 0 anymore? I agree it should be initialized. > >-#ifdef MOZ_PLACES_BOOKMARKS > > // TODO: write me! > > // see bug #356606 > > return NS_OK; > no implementation, does it work w/o out ? Yes, from my testing things appear to be working so far. I'm not sure writing this code is a prerequisite to landing a working patch on the trunk ... Alex?
(In reply to comment #7) > > >- PRInt64 folderID = 0; > > >+ PRInt64 folderID; > > > no need to init it to 0 anymore? > > I agree it should be initialized. > > > >-#ifdef MOZ_PLACES_BOOKMARKS > > > // TODO: write me! > > > // see bug #356606 > > > return NS_OK; > > > no implementation, does it work w/o out ? > > Yes, from my testing things appear to be working so far. > > I'm not sure writing this code is a prerequisite to landing a working patch on > the trunk ... We do not need the functionality for now. As long as everything else is working technically with this in place, it is OK from a product point of view for it to just return.
Attachment #288354 - Flags: review+
I tested the patch and it looks it works fine. I just added |user_pref("metrics.upload.enable", true);| to pref.js and created metrics-config.xml <?xml version="1.0"?> <response xmlns="http://www.mozilla.org/metrics"> <config> <collectors> <!-- <collector type="document"/> --> <!-- <collector type="window"/> --> <!-- <collector type="profile"/> --> <collector type="uielement"/> <collector type="autocomplete"/> </collectors> <limit events="200"/> <upload interval="600"/> </config> </response> Once I quit the application, metrics.xml is correctly created with all the output.
Alex, who would be a good sr for this ?
(In reply to comment #10) > Alex, who would be a good sr for this ? SR isn't required, as per shaver. I'll land this sometime today.
Keywords: checkin-needed
Oh, it seems Pete has commit access. Pete, do you want to land this yourself? If not, re-add the checkin-needed keyword.
Keywords: checkin-needed
Yes, I can land this today.
Ok, this patch has landed. Marking FIXED. We can open new bugs for specific issues we find w/ the metrics implementation.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: