|
|
Created:
3 years, 7 months ago by Charlie Harrison Modified:
3 years, 7 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, subresource-filter-reviews_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[subresource_filter] Make website setting existence imply site activation
This patch tries its best to make the relationship 1:1 between site activation
status and the WebsiteSetting metadata being present for that origin.
The setting is added when a site is activated and the UI is shown (to prevent cases
where no resources are filtered or we are activated but suppressing UI).
The setting is removed when a site is found to not activate for a particular top level
navigation (% content setting whitelists), or when a url matching the setting's origin
is deleted from history. Since we don't want to clear this state if the user makes
some explicit action (like whitelisting), we make sure the whitelisting check is the
very last one in activation computation and don't take it into account for setting
removal.
In this way the setting is a best approximation for a cached activation state (minus
content setting policy) for a given origin. Currently it is only used for the smart UI,
but in follow up patches we will make other settings UI surfaces dependent on this
state.
Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY.
BUG=689487
Review-Url: https://codereview.chromium.org/2859783002
Cr-Commit-Position: refs/heads/master@{#470945}
Committed: https://chromium.googlesource.com/chromium/src/+/31a9f6426ec06155f4b95e5e125d76e0371d0c74
Patch Set 1 #Patch Set 2 : Clear the metadata when activation is disabled #Patch Set 3 : add test + tweaks #Patch Set 4 : Ensure http/s #Patch Set 5 : simplify #
Total comments: 8
Patch Set 6 : fix Fake database issue #Patch Set 7 : shivanisha review #
Total comments: 2
Patch Set 8 : remove comment (trybots prev) #Patch Set 9 : blacklist #Patch Set 10 : rebase #Patch Set 11 : add test #Patch Set 12 : rebase #Dependent Patchsets: Messages
Total messages: 66 (48 generated)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...) win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Clear the metadata when activation is disabled BUG= ========== to ========== Clear the metadata when activation is disabled This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated suppressing UI)l The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
Description was changed from ========== Clear the metadata when activation is disabled This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated suppressing UI)l The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== Clear the metadata when activation is disabled This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
Description was changed from ========== Clear the metadata when activation is disabled This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting imply cached activation This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
Description was changed from ========== [subresource_filter] Make website setting imply cached activation This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence imply cached activation This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
csharrison@chromium.org changed reviewers: + msramek@chromium.org, shivanisha@chromium.org
msramek: PTAL at //chrome and content_settings parts. This is basically an extension of the previous CL, with an added criteria for clearing the setting (when activation is disabled for an origin). shivanisha: PTAL at everything. subresource_filter parts are mainly mechanical to plumb the activation state up to //chrome.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Nice. First pass comments. https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresou... File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresou... chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:148: } Can this callback also be used for "setting" the site metadata to maintain the invariant that metadata implies activated ? The kInfobarLastShownTimeKey can then be updated in OnDidShowUI() ? https://codereview.chromium.org/2859783002/diff/80001/components/content_sett... File components/content_settings/core/browser/website_settings_registry.cc (right): https://codereview.chromium.org/2859783002/diff/80001/components/content_sett... components/content_settings/core/browser/website_settings_registry.cc:175: DESKTOP | PLATFORM_ANDROID, WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); Remove the "Currently only used on Android." comment from CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER_DATA definition point in content_settings_types.h https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:72: weak_ptr_factory_(this) {} DCHECK(client_ != nullptr) here or an if (client_) when we invoke OnPageActivationComputed later or both? https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h (right): https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h:69: ContentSubresourceFilterThrottleManager( It will be good to have a comment for the constructor as well describing the lifetime guarantees that the consumer must follow for all of the raw pointers passed into the constructor.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresou... File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresou... chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:148: } On 2017/05/09 15:43:35, shivanisha wrote: > Can this callback also be used for "setting" the site metadata to maintain the > invariant that metadata implies activated ? The kInfobarLastShownTimeKey can > then be updated in OnDidShowUI() ? I am a little bit nervous about that because we will use this to gate settings UI surfaces. Additionally, we really don't want this to be set if we have should_suppress_notifications = true. Doing this would require going through the driver_factory (rather than accessing the client directly in the manager), especially once https://codereview.chromium.org/2844063002/ lands. Let me add a TODO to consider adopting that behavior once we've removed the driver factory. WDYT? https://codereview.chromium.org/2859783002/diff/80001/components/content_sett... File components/content_settings/core/browser/website_settings_registry.cc (right): https://codereview.chromium.org/2859783002/diff/80001/components/content_sett... components/content_settings/core/browser/website_settings_registry.cc:175: DESKTOP | PLATFORM_ANDROID, WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); On 2017/05/09 15:43:35, shivanisha wrote: > Remove the "Currently only used on Android." comment from > CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER_DATA definition point in > content_settings_types.h Good catch, done. https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:72: weak_ptr_factory_(this) {} On 2017/05/09 15:43:35, shivanisha wrote: > DCHECK(client_ != nullptr) here or an if (client_) when we invoke > OnPageActivationComputed later or both? Done. Client owns us (essentially), so should never be null. https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h (right): https://codereview.chromium.org/2859783002/diff/80001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h:69: ContentSubresourceFilterThrottleManager( On 2017/05/09 15:43:35, shivanisha wrote: > It will be good to have a comment for the constructor as well describing the > lifetime guarantees that the consumer must follow for all of the raw pointers > passed into the constructor. Done.
lgtm % nit https://codereview.chromium.org/2859783002/diff/120001/components/subresource... File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2859783002/diff/120001/components/subresource... components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:1: // // Raw pointers passed in here must all outlive the class. Remove the 1st line comment?
https://codereview.chromium.org/2859783002/diff/120001/components/subresource... File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2859783002/diff/120001/components/subresource... components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:1: // // Raw pointers passed in here must all outlive the class. On 2017/05/09 16:34:27, shivanisha wrote: > Remove the 1st line comment? LOL done. Sorry about that.
This CL is slightly wrong, we want to be plumbing the actual activation decision, not the eventual activation state that the page ends up in. This is important because we do not want to clear the metadata if a site is whitelisted in ContentSettings. Let me re-jigger the logic here and re-request a review from you Shivani. I think the //chrome parts should still be ok.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [subresource_filter] Make website setting existence imply cached activation This patch tries its best to make the relationship 1:1 between site activation and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to be not activated anymore, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence imply SB blacklist This patch tries its best to make the relationship 1:1 between site blacklist status in Safe Browsing and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to match the SAFE threat type, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached blacklist state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [subresource_filter] Make website setting existence imply SB blacklist This patch tries its best to make the relationship 1:1 between site blacklist status in Safe Browsing and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to match the SAFE threat type, or when a url matching the setting's origin is deleted from history. In this way the setting is a best approximation for a cached blacklist state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
Description was changed from ========== [subresource_filter] Make website setting existence site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
Description was changed from ========== [subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation. In this way the setting is a best approximation for a cached activation state for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation and don't take it into account for setting removal. In this way the setting is a best approximation for a cached activation state (minus content setting policy) for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ==========
csharrison@chromium.org changed reviewers: + engedy@chromium.org
OK I think this CL is now ready for review. shivanisha@ would you take another look? Sorry for the run-around here. +engedy for shadow review as well, would you also take special thought for if this will work OK with multiple simultaneous configurations? I'm pretty sure everything will be OK.
The only gotcha I can think of is that users who are running a dry-run performance testing experiment on all sites will seemingly never clear website settings if they are ever set. Otherwise LGTM.
On 2017/05/10 13:19:10, engedy wrote: > The only gotcha I can think of is that users who are running a dry-run > performance testing experiment on all sites will seemingly never clear website > settings if they are ever set. Otherwise LGTM. Hm what if we also plumb the |should_suppress_notifications| up to the client and clear the setting if that is true as well?
On 2017/05/10 18:39:09, Charlie Harrison wrote: > On 2017/05/10 13:19:10, engedy wrote: > > The only gotcha I can think of is that users who are running a dry-run > > performance testing experiment on all sites will seemingly never clear website > > settings if they are ever set. Otherwise LGTM. > > Hm what if we also plumb the |should_suppress_notifications| up to the client > and clear the setting if that is true as well? Need to make sure that DRYRUNs where we don't want to show any UI mark that bit as well.
On 2017/05/10 18:39:42, Charlie Harrison wrote: > On 2017/05/10 18:39:09, Charlie Harrison wrote: > > On 2017/05/10 13:19:10, engedy wrote: > > > The only gotcha I can think of is that users who are running a dry-run > > > performance testing experiment on all sites will seemingly never clear > website > > > settings if they are ever set. Otherwise LGTM. > > > > Hm what if we also plumb the |should_suppress_notifications| up to the client > > and clear the setting if that is true as well? > > Need to make sure that DRYRUNs where we don't want to show any UI mark that bit > as well. Sorry for all the spam. Now I am thinking we could just plumb ActivationDecision == ACTIVATED && ActivationLevel == ENABLED. Clearing this setting if the site is in DRYRUN mode sounds reasonable to me.
> Sorry for all the spam. Now I am thinking we could just plumb ActivationDecision > == ACTIVATED && ActivationLevel == ENABLED. Clearing this setting if the site is > in DRYRUN mode sounds reasonable to me. That SGTM.
> Sorry for all the spam. Now I am thinking we could just plumb ActivationDecision > == ACTIVATED && ActivationLevel == ENABLED. Clearing this setting if the site is > in DRYRUN mode sounds reasonable to me. That SGTM.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
OK, I've updated the PS accordingly and added a test for this case.
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
LGTM
Thanks!
The CQ bit was checked by csharrison@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from shivanisha@chromium.org, engedy@chromium.org, msramek@chromium.org Link to the patchset: https://codereview.chromium.org/2859783002/#ps220001 (title: "rebase")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 220001, "attempt_start_ts": 1494507502714440, "parent_rev": "a226fc9126a5ef1ed75fe435eb7a44d010e470fb", "commit_rev": "31a9f6426ec06155f4b95e5e125d76e0371d0c74"}
Message was sent while issue was closed.
Description was changed from ========== [subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation and don't take it into account for setting removal. In this way the setting is a best approximation for a cached activation state (minus content setting policy) for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 ========== to ========== [subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation and don't take it into account for setting removal. In this way the setting is a best approximation for a cached activation state (minus content setting policy) for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 Review-Url: https://codereview.chromium.org/2859783002 Cr-Commit-Position: refs/heads/master@{#470945} Committed: https://chromium.googlesource.com/chromium/src/+/31a9f6426ec06155f4b95e5e125d... ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/31a9f6426ec06155f4b95e5e125d... |