Closed
Bug 770832
Opened 12 years ago
Closed 12 years ago
Add 'localeId' to WebApps registry
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(blocking-basecamp:+)
People
(Reporter: mounir, Assigned: mounir)
References
Details
(Whiteboard: [qa-])
Attachments
(2 files)
4.74 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
1.05 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
This is needed so we have a simple and short ID for apps. UUID should only be used to identify app for sync purpose.
Attachment #639033 -
Flags: review?(fabrice)
Assignee | ||
Comment 1•12 years ago
|
||
Comment on attachment 639033 [details] [diff] [review]
Patch
Renaming - autocomplete has been quite smart...
Attachment #639033 -
Attachment description: Patch v1 - Fix the bug for html content → Patch
Comment 2•12 years ago
|
||
Comment on attachment 639033 [details] [diff] [review]
Patch
Review of attachment 639033 [details] [diff] [review]:
-----------------------------------------------------------------
What you have there is fine, except that if we already have webapps installed without a localId they won't get one.
Can you check at http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#62 that apps have localIds and add them if they are missing?
r=me with that.
::: dom/apps/src/AppsService.js
@@ +39,5 @@
> classInfo : XPCOMUtils.generateCI({classID: APPS_SERVICE_CID,
> contractID: APPS_SERVICE_CONTRACTID,
> classDescription: "AppsService",
> interfaces: [Ci.nsIAppsService],
> flags: Ci.nsIClassInfo.DOM_OBJECT})
You don't need all this classInfo stuff.
Attachment #639033 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Fabrice, is that what you were expecting?
Also, I didn't get your comment about the classinfo stuff. I haven't touched that.
Attachment #639714 -
Flags: review?(fabrice)
Assignee | ||
Comment 4•12 years ago
|
||
Also, the Gaia pull request is ready:
https://github.com/mozilla-b2g/gaia/pull/2233
Updated•12 years ago
|
Attachment #639714 -
Flags: review?(fabrice) → review+
Comment 5•12 years ago
|
||
(In reply to Mounir Lamouri (:mounir) from comment #3)
> Also, I didn't get your comment about the classinfo stuff. I haven't touched
> that.
This is because you ignored https://bugzilla.mozilla.org/show_bug.cgi?id=754141#c5 in the first place ;)
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #5)
> (In reply to Mounir Lamouri (:mounir) from comment #3)
>
> > Also, I didn't get your comment about the classinfo stuff. I haven't touched
> > that.
>
> This is because you ignored
> https://bugzilla.mozilla.org/show_bug.cgi?id=754141#c5 in the first place ;)
Bug 772050.
Target Milestone: --- → mozilla16
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•12 years ago
|
||
You can use AppsService to get the localId of an installed app. However, you need to be a privileged content to access this service.
Note that we should be able to simple automatic tests for this when bug 770894 will be done.
Comment 10•12 years ago
|
||
(In reply to Mounir Lamouri (:mounir) from comment #9)
> You can use AppsService to get the localId of an installed app. However, you
> need to be a privileged content to access this service.
>
> Note that we should be able to simple automatic tests for this when bug
> 770894 will be done.
See my comment in bug 770894. There's already a capability to write automated tests for the mozapps API on m-c.
Updated•12 years ago
|
Whiteboard: [qa?] → [qa+]
Comment 11•12 years ago
|
||
(In reply to Mounir Lamouri (:mounir) from comment #9)
> You can use AppsService to get the localId of an installed app. However, you
> need to be a privileged content to access this service.
What do you mean by privileged content?
On my localhost, I just installed an app and did the following below, but I got "undefined" when I accessed localId:
var request = window.navigator.mozApps.getSelf();
request.onsuccess = function() {
// Pull the name of the app out of the App object
alert("App Result Test: " + request.result.localId);
};
request.onerror = function() {
// Display error name from the DOMError object
alert("Error: " + request.error.name);
};
Comment 12•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #11)
> (In reply to Mounir Lamouri (:mounir) from comment #9)
> > You can use AppsService to get the localId of an installed app. However, you
> > need to be a privileged content to access this service.
>
> What do you mean by privileged content?
>
> On my localhost, I just installed an app and did the following below, but I
> got "undefined" when I accessed localId:
>
> var request = window.navigator.mozApps.getSelf();
> request.onsuccess = function() {
> alert("App Result Test: " + request.result.localId);
> };
> request.onerror = function() {
> // Display error name from the DOMError object
> alert("Error: " + request.error.name);
> };
Slight fix on the above code: Ignore the comment above the first alert (bad copy and paste on my part).
Updated•12 years ago
|
Whiteboard: [qa+] → [qa?]
Comment 13•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #11)
> (In reply to Mounir Lamouri (:mounir) from comment #9)
> > You can use AppsService to get the localId of an installed app. However, you
> > need to be a privileged content to access this service.
>
> What do you mean by privileged content?
This is "chrome" privileged code. This property is not exposed to web content, so there's no way to test anything from an html page.
Updated•12 years ago
|
Whiteboard: [qa?] → [qa-]
Updated•12 years ago
|
blocking-basecamp: ? → +
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM: Apps
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•