Closed Bug 355120 Opened 18 years ago Closed 18 years ago

Move default feed reader code to shellsvc

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 3 alpha2

People

(Reporter: asaf, Assigned: asaf)

References

Details

Attachments

(1 file, 3 obsolete files)

Move default feed reader code to shellsvc.

something like:

readonly attribute nsILocalFile defaultFeedReader;
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: Firefox 3 alpha1 → Firefox 3 alpha2
Attached patch patch (obsolete) — Splinter Review
Attachment #243546 - Flags: review?(gavin.sharp)
Blocks: 358492
Attached patch patch with mac support (obsolete) — Splinter Review
The mac shellsvc changes will be reviewed separately in bug 358492.
Attachment #243546 - Attachment is obsolete: true
Attachment #243888 - Flags: review?(gavin.sharp)
Attachment #243546 - Flags: review?(gavin.sharp)
Comment on attachment 243888 [details] [diff] [review]
patch with mac support

>Index: browser/components/feeds/src/FeedWriter.js

>+      defaultReader = Cc["@mozilla.org/browser/shell-service;1"].
>+                      getService(Ci.nsIShellService).defaultFeedReader;
>     }
>+    catch(ex) { }
>+
>+    if (defaultReader && defaultReader.exists()) {

>Index: browser/components/shell/src/nsWindowsShellService.cpp

>+      rv = defaultReader->InitWithPath(path);
>+      if (NS_SUCCEEDED(rv))
>+        NS_ADDREF(*_retval = defaultReader);

What do you think about moving the exists() check to the GetDefaultReader implementation (and documenting the interface accordingly)? Getting back a non-existent nsIFile is pretty useless in this case, I think.
Comment on attachment 243888 [details] [diff] [review]
patch with mac support

moving this out of my queue...
Attachment #243888 - Flags: review?(gavin.sharp) → review-
Attached patch patch (obsolete) — Splinter Review
Attachment #243888 - Attachment is obsolete: true
Attachment #246052 - Flags: review?(gavin.sharp)
Comment on attachment 246052 [details] [diff] [review]
patch

>Index: browser/components/shell/src/nsWindowsShellService.cpp

>+  if (path.First() == '"') {
>+    // Everything inside the quotes
>+    path = Substring(path, 1);
>+    path = Substring(path, 0, path.FindChar('"'));

This could be:
    path = Substring(path, 1, path.FindChar('"', 1) - 1);
Attachment #246052 - Flags: review?(gavin.sharp) → review+
I'm leaving the mac implementation to bug 358492 (replacing it with NS_ERROR_NOT_IMPLEMENTED for now).
Attached patch as checked inSplinter Review
mozilla/browser/components/feeds/src/FeedWriter.js 1.31
mozilla/browser/components/preferences/feeds.js 1.8
mozilla/browser/components/shell/public/nsIShellService.idl 1.9
mozilla/browser/components/shell/src/nsGNOMEShellService.cpp 1.20
mozilla/browser/components/shell/src/nsMacShellService.cpp 1.16
mozilla/browser/components/shell/src/nsWindowsShellService.cpp 1.41
Attachment #246052 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: