Closed Bug 995070 Opened 6 years ago Closed 6 years ago

Support draft-nottingham-safe-hint-01

Categories

(Core :: Networking: HTTP, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: dougt, Assigned: dougt)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files, 2 obsolete files)

"""
Many Web sites have a "safe" mode, to assist those who don't want to
   be exposed to "objectionable" content, or who don't want their
   children to be exposed to such content.  YouTube [youtube], Yahoo!
   Search [yahoo], Google Search [google], Bing Search [bing], and many
   other services have such a setting.
"""

It sounds like these providers will be honoring such a setting.  We should provide a reasonable way to enable users to express their choice.

I suspect there are a couple action items:


1) create a pref that controls if necko sets this header.
2) add a checkbox to preferences if Firefox to toggle this preference
3) add a option in Firefox for Android to goggle this preference.
4) add a setting in FirefoxOS to toggle this setting
Assignee: nobody → dougt
Attachment #8405168 - Flags: review?(jduell.mcbugs)
Attachment #8405169 - Flags: review?(gavin.sharp)
Attached image Screenshot of patch 2 on Firefox Mac (obsolete) —
Attachment #8405170 - Flags: ui-review?(madhava)
5) we are going to want to also adjust the help content that is linked to from this dialog
Comment on attachment 8405168 [details] [diff] [review]
Part 1 - networking changes

Review of attachment 8405168 [details] [diff] [review]:
-----------------------------------------------------------------

the big questions here aren't really networking questions any more than they are for DNT.. but doug you're on the hook for tracking changes to this draft or prefer

::: netwerk/protocol/http/nsHttpHandler.h
@@ +434,5 @@
>      bool           mDoNotTrackEnabled;
>      uint8_t        mDoNotTrackValue;
>  
> +    // for broadcasting safe hint;
> +    bool           mSafeHintEnabled;

nit - save a byte with uint32_t : 1 (merged into bit field below it)
Component: Networking → Networking: HTTP
Comment on attachment 8405168 [details] [diff] [review]
Part 1 - networking changes

Review of attachment 8405168 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpHandler.h
@@ +434,5 @@
>      bool           mDoNotTrackEnabled;
>      uint8_t        mDoNotTrackValue;
>  
> +    // for broadcasting safe hint;
> +    bool           mSafeHintEnabled;

same as mDoNotTrackEnabled?
> the big questions here aren't really networking questions any more than they are for DNT.. but doug you're on the hook for tracking changes to this draft or prefer

Yup.  Lets land the platform bits independent of the UI.  I want to ensure addons can toggle this.
Attachment #8405169 - Attachment is obsolete: true
Attachment #8405169 - Flags: review?(gavin.sharp)
Attachment #8405170 - Attachment is obsolete: true
Attachment #8405170 - Flags: ui-review?(madhava)
removing firefox ui bits.
Blocks: 995429
Blocks: 995430
Comment on attachment 8405168 [details] [diff] [review]
Part 1 - networking changes

Review of attachment 8405168 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpHandler.h
@@ +434,5 @@
>      bool           mDoNotTrackEnabled;
>      uint8_t        mDoNotTrackValue;
>  
> +    // for broadcasting safe hint;
> +    bool           mSafeHintEnabled;

but different than the superior mTelemetryEnabled :)

totally not impt.
Attachment #8405168 - Flags: review?(jduell.mcbugs) → review+
Comment on attachment 8405168 [details] [diff] [review]
Part 1 - networking changes

Review of attachment 8405168 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpHandler.cpp
@@ +421,5 @@
>      }
>  
> +    // add the "Send Hint" header
> +    if (mSafeHintEnabled) {
> +      rv = request->SetHeader(nsHttp::Prefer, nsDependentCString("safe"));

NS_LITERAL_CSTRING("safe") ?
https://hg.mozilla.org/mozilla-central/rev/4f42a748cfaa
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.