Closed Bug 491732 Opened 11 years ago Closed 11 years ago

add "Share Location" to Page Info > Permissions to redo/undo "always remember this choice" for geolocation preference


(Firefox :: Page Info Window, defect, P2)

3.5 Branch





(Reporter: beltzner, Assigned: dougt)



(4 keywords, Whiteboard: [geo])


(2 files, 1 obsolete file)

The new geolocation support allows a user to "always remember" their choice. Presently the only way to undo that is to remove their browsing history for that site, we should offer a better way.

Since this is a permission, of sorts (ie: permitting the website to know where you are) I think it's best that we add it to the Page Info > Permissions, though Doug makes a case for it being in the Security Tab along with Cookies and Passwords. I think the former is easier, requiring a single string:

Share Location
            ( ) Always Ask ( ) Allow ( ) Block

this control would be set to Block and disabled when geo.enabled is set to false.

For the Security Tab, we'd need:

Can this website see my location?   Always / Never / If you let it (?)

and a button to clear.

My feeling is that this is actually a permission (what is the website allowed to do) which allows the website to do something that has a privacy implication. I prefer the former solution.
Heads-up, l10n: we need a better way to clear this information. These will be amongst the set of strings needed to clean up geolocation (see also bug 488574)
Flags: blocking-firefox3.5+
Keywords: late-l10n, privacy
Priority: -- → P2
Attached image screenshot

page info -> permission

Use default == ask always
Allow == as if you pressed "Tell them" and selected the "remember for this site"
Deny == as if you pressed "Don't tell them" and selected the "remember for this site"
Assignee: nobody → doug.turner
Attachment #376077 - Flags: ui-review?(beltzner)
Attached patch patch v.1 (obsolete) — Splinter Review
this implements the screenshot above.  it does not add anything to page info -> security.

To make things a bit simpler, i changed the geo code in the browser to use the permissions manager instead of the content-site permissions.  I probably should have been doing that in the first place.
Attachment #376080 - Flags: review?
Attachment #376080 - Flags: review? → review?(
Duplicate of this bug: 488988
Duplicate of this bug: 488787
Comment on attachment 376080 [details] [diff] [review]
patch v.1

>diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js

>   prompt: function(request) {

>+    var result = pm.testPermission(request.requestingURI, "geo");

Need testExactPermission to match the current behavior.

>+    if (result == Ci.nsIPermissionManager.ALLOW_ACTION) {
>+      request.allow();
>+      return;
>+    }
>+    else if (result == Ci.nsIPermissionManager.DENY_ACTION) {

nit: get rid of else after return

Beltzner had a good point about "Always Ask" perhaps being better than "Use Default". Would just require a string addition to replace permUseDefault, right?
Attachment #376080 - Flags: review?( → review+
Comment on attachment 376077 [details]

Let's make the checkbox "Always Ask", please.
Attachment #376077 - Flags: ui-review?(beltzner) → ui-review-
Attached patch patch v.2Splinter Review
Attachment #376080 - Attachment is obsolete: true
Attachment #376090 - Flags: review?
Attachment #376090 - Flags: review? → review+
Closed: 11 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
Whiteboard: [geo]
Fantastic turnaround time, Doug. Really excellent.
Blocks: 491835
Component: General → Page Info
QA Contact: general →
Hardware: x86 → All
Version: 3.0 Branch → 3.5 Branch
Blocks: FF2SM
No longer blocks: FF2SM
Keywords: user-doc-needed
Verified fixed on the trunk using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090507 Minefield/3.6a1pre and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090507 Minefield/3.6a1pre. 

Verified fixed on the 1.9.1 branch using  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b5pre) Gecko/20090507 Shiretoko/3.5b5pre and  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090507 Shiretoko/3.5b5pre

I tested the various combination of Always Ask, allow and block and I saw no issues.
Depends on: 522938
You need to log in before you can comment on or make changes to this bug.