New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 773834 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Feature

Blocked on:
issue 780915

Blocking:
issue 801275



Sign in to add a comment

Add NoScript Previews intervention behind developer flag

Project Member Reported by dougarnett@chromium.org, Oct 11 2017

Issue description

Create a new type of preview for disabling javascript subject to triggering on a slow network (Effective Connection Type 2G or slower).

This is prerequisite for running a Cacao project experiment that will provide a whitelist of sites for applying this intervention. 
Initial design doc is at go/cacao-client-design which has section on this NoScript intervention titled "Design of NoScript Preview".
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08b4067b3a582bba8bb2a09d174be66af243f5c0

commit 08b4067b3a582bba8bb2a09d174be66af243f5c0
Author: Doug Arnett <dougarnett@chromium.org>
Date: Thu Oct 12 20:14:44 2017

Adds developer flag and defines Previews bit for a new NoScript preview

This has basic definitions to allow us to write a new preview
intervention (for disabling javascript) behind a flag for further
testing.

Bug:  773834 
Change-Id: Iedcae915d4c7d8c837b003b873118b16ff7625b1
Reviewed-on: https://chromium-review.googlesource.com/714217
Reviewed-by: Scott Little <sclittle@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508431}
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/chrome/browser/about_flags.cc
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/components/previews/core/previews_features.cc
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/components/previews/core/previews_features.h
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/content/public/common/previews_state.h
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/third_party/WebKit/public/platform/WebURLRequest.h
[modify] https://crrev.com/08b4067b3a582bba8bb2a09d174be66af243f5c0/tools/metrics/histograms/enums.xml

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31

commit 6d59f58ab5c9919a1bb9af8251e5fd6580c19c31
Author: Doug Arnett <dougarnett@chromium.org>
Date: Fri Oct 13 22:26:25 2017

Adds new previews::PreviewsType for NoScript previews.

This lays some groundwork for adding the NoScript preview/intervention.
[A dev flag was added in a preceding change (714217).]

Bug:  773834 
Change-Id: I9a0ff48ea002b182a6ba8e7a62d74d858bf37cf0
Reviewed-on: https://chromium-review.googlesource.com/716822
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508846}
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/chrome/browser/previews/previews_infobar_delegate.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/chrome/browser/previews/previews_service.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/chrome/browser/previews/previews_service_unittest.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/components/previews/core/previews_experiments.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/components/previews/core/previews_experiments.h
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/components/previews/core/previews_io_data.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/components/previews/core/previews_io_data_unittest.cc
[modify] https://crrev.com/6d59f58ab5c9919a1bb9af8251e5fd6580c19c31/tools/metrics/histograms/histograms.xml

Split out NoScript design into new NoScript Preview Experiment design doc at: https://docs.google.com/a/google.com/document/d/1il6job2jlOtD11X1grJQ19CJ6R5mw3TNgYLPiqsr2Bc/edit?usp=sharing
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c55476b2410751410f3b9515f17f26d8a19b7a1

commit 2c55476b2410751410f3b9515f17f26d8a19b7a1
Author: Doug Arnett <dougarnett@chromium.org>
Date: Wed Oct 25 19:44:38 2017

Refactor client previews_state logic out of dispatcher into component

This change adds support for setting the new NoScript client preview bit
in content::PreviewsState and in the process makes some refactors to
clear up deceptive naming (GetPreviewsState => DeterminePreviewsState)
and moves some logic out of dispatcher and into a new previews component
utility method.

Bug:  773834 
Change-Id: I03af251091ad9c13b0c4bd142462fe6a11e631ab
Reviewed-on: https://chromium-review.googlesource.com/724380
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Randy Smith <rdsmith@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511556}
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/chrome/browser/BUILD.gn
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/BUILD.gn
[add] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/content/BUILD.gn
[add] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/content/DEPS
[add] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/content/previews_content_util.cc
[add] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/content/previews_content_util.h
[add] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/content/previews_content_util_unittest.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/core/previews_decider.h
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/components/previews/core/previews_io_data_unittest.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/content/browser/loader/mojo_async_resource_handler_unittest.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/content/browser/loader/resource_dispatcher_host_browsertest.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/content/public/browser/resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/2c55476b2410751410f3b9515f17f26d8a19b7a1/content/public/browser/resource_dispatcher_host_delegate.h

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08f79b3b7ad8947cf11cef3c3dd46550ba70ec1f

commit 08f79b3b7ad8947cf11cef3c3dd46550ba70ec1f
Author: Doug Arnett <dougarnett@chromium.org>
Date: Thu Oct 26 03:18:54 2017

Integrates NoScript Preview intervention in ContentSettingsObserver

Checks the RenderFrame PreviewState in ContentSettingsObserver
AllowScript() and AllowScriptFromSource() to see if script should be
disabled for the page load.

Bug:  773834 
Change-Id: Id967674ab5adbbb73aa9af8d39e35882cd7ac860
Reviewed-on: https://chromium-review.googlesource.com/728383
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511721}
[modify] https://crrev.com/08f79b3b7ad8947cf11cef3c3dd46550ba70ec1f/chrome/renderer/content_settings_observer.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab7f6879b56532d0e1fbe42db3907ee6f478f465

commit ab7f6879b56532d0e1fbe42db3907ee6f478f465
Author: Doug Arnett <dougarnett@chromium.org>
Date: Thu Oct 26 19:18:21 2017

Adds integration browsertests for the NoScript Previews feature.
Bug:  773834 

Change-Id: I704d4136b2dc7cb4e647ed62ae0148bb54004ca5
Reviewed-on: https://chromium-review.googlesource.com/738934
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511915}
[add] https://crrev.com/ab7f6879b56532d0e1fbe42db3907ee6f478f465/chrome/browser/previews/previews_browsertest.cc
[modify] https://crrev.com/ab7f6879b56532d0e1fbe42db3907ee6f478f465/chrome/test/BUILD.gn
[add] https://crrev.com/ab7f6879b56532d0e1fbe42db3907ee6f478f465/chrome/test/data/previews/noscript_test.html

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25204dc502fd38ae95a9c0520f98d4b29a6bbab3

commit 25204dc502fd38ae95a9c0520f98d4b29a6bbab3
Author: Makoto Shimazu <shimazu@chromium.org>
Date: Tue Oct 31 06:35:00 2017

Disable PreviewsBrowserTest.NoScriptPreviewsEnabled on Win/Mac

TBR=dougarnett@chromium.org

Bug:  779934 ,  773834 
Change-Id: I40632e362538aee524161b5d1fa9bcd824273dfa
Reviewed-on: https://chromium-review.googlesource.com/746063
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512765}
[modify] https://crrev.com/25204dc502fd38ae95a9c0520f98d4b29a6bbab3/chrome/browser/previews/previews_browsertest.cc

Status: Fixed (was: Assigned)
Blockedon: 780915
Status: Started (was: Fixed)
Still needs InfoBar integration
Blocking: 776847
Status: Fixed (was: Started)

Comment 12 by efoo@chromium.org, Dec 5 2017

Components: Blink>Previews

Comment 13 by efoo@chromium.org, Dec 5 2017

Components: -UI>Browser>Previews
Blocking: -776847 801275
Labels: -Restrict-View-Google

Sign in to add a comment