|
|
Created:
3 years, 7 months ago by Charlie Harrison Modified:
3 years, 7 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam, subresource-filter-reviews_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[subresource_filter] Refactor activation suppression
Right now, we query for activation suppression in two places
1. Computing ActivationDecision in the driver_factory
2. Right before sending the Activation IPC in the throttle_manager
Since (1) fully controls notifying page activation to the
throttle_manager, (2) is completely unnecessary. This CL removes that
functionality from the throttle manager delegate.
BUG=689487
Review-Url: https://codereview.chromium.org/2871013002
Cr-Commit-Position: refs/heads/master@{#470765}
Committed: https://chromium.googlesource.com/chromium/src/+/19811b689efb15501224d8c8151abe0bbc8392a6
Patch Set 1 #Patch Set 2 : just remove the suppression call #
Total comments: 4
Patch Set 3 : rebase on #470635 #
Dependent Patchsets: Messages
Total messages: 37 (23 generated)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
csharrison@chromium.org changed reviewers: + engedy@chromium.org, shivanisha@chromium.org
shivanisha, engedy: PTAL? I feel this change will make landing https://codereview.chromium.org/2859783002 easier.
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Hm thinking about it I think we need s/OnWillTriggerActivation/OnActivationComputed/ or something similar so the code will know when a site is deactivated. Let me fix the CL.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Description was changed from ========== [subresource_filter] Refactor activation suppression Right now, we query for activation suppression in two places 1. Computing ActivationDecision in the driver_factory 2. Right before sending the Activation IPC in the throttle_manager Since (1) fully controls notifying page activation to the throttle_manager, (2) is completely unnecessary. This CL removes that functionality from the throttle manager delegate. Additionally, this CL refactors suppression calculation by ensuring it is the very last thing the driver_factory does when computing the ActivationDecision. This ensures that the ChromeClient can be sure that the navigations it is deciding suppression for would have been activated were it not for //chrome specific policy. This last piece will be useful when we need data on whether a site is marked for activation without taking into account content settings. BUG=689487 ========== to ========== [subresource_filter] Refactor activation suppression Right now, we query for activation suppression in two places 1. Computing ActivationDecision in the driver_factory 2. Right before sending the Activation IPC in the throttle_manager Since (1) fully controls notifying page activation to the throttle_manager, (2) is completely unnecessary. This CL removes that functionality from the throttle manager delegate. BUG=689487 ==========
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The current CL just removes the activation suppression call. I'll do the OnPageActivationComputed behavior in a follow up.
LGTM, thanks! https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (left): https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:79: it->second->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), Unrelated question: after https://codereview.chromium.org/2844063002/, this might be called with activation_state == DISABLED. This is not going to break things, right? (I haven't looked into it at all.)
https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (left): https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:79: it->second->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), On 2017/05/09 22:13:35, engedy wrote: > Unrelated question: after https://codereview.chromium.org/2844063002/, this > might be called with activation_state == DISABLED. This is not going to break > things, right? (I haven't looked into it at all.) Ah, it isn't great. We don't want to call EnsureRulesetHandle() in that case, just pass null if there is no activation. Other than that it should work.
https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (left): https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:79: it->second->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), On 2017/05/09 22:27:17, Charlie Harrison wrote: > On 2017/05/09 22:13:35, engedy wrote: > > Unrelated question: after https://codereview.chromium.org/2844063002/, this > > might be called with activation_state == DISABLED. This is not going to break > > things, right? (I haven't looked into it at all.) > > Ah, it isn't great. We don't want to call EnsureRulesetHandle() in that case, > just pass null if there is no activation. Other than that it should work. Will it actually be called like this actually? I see DCHECK_NE(activation_options_.activation_level, ActivationLevel::DISABLED); right before calling this method.
https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (left): https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:79: it->second->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), On 2017/05/09 22:33:58, Charlie Harrison wrote: > On 2017/05/09 22:27:17, Charlie Harrison wrote: > > On 2017/05/09 22:13:35, engedy wrote: > > > Unrelated question: after https://codereview.chromium.org/2844063002/, this > > > might be called with activation_state == DISABLED. This is not going to > break > > > things, right? (I haven't looked into it at all.) > > > > Ah, it isn't great. We don't want to call EnsureRulesetHandle() in that case, > > just pass null if there is no activation. Other than that it should work. > > Will it actually be called like this actually? I see > DCHECK_NE(activation_options_.activation_level, ActivationLevel::DISABLED); > right before calling this method. Ahh, that's right. Crisis averted!
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_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?))
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: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?))
On 2017/05/09 at 22:55:48, engedy wrote: > https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... > File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (left): > > https://codereview.chromium.org/2871013002/diff/20001/components/subresource_... > components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:79: it->second->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), > On 2017/05/09 22:33:58, Charlie Harrison wrote: > > On 2017/05/09 22:27:17, Charlie Harrison wrote: > > > On 2017/05/09 22:13:35, engedy wrote: > > > > Unrelated question: after https://codereview.chromium.org/2844063002/, this > > > > might be called with activation_state == DISABLED. This is not going to > > break > > > > things, right? (I haven't looked into it at all.) > > > > > > Ah, it isn't great. We don't want to call EnsureRulesetHandle() in that case, > > > just pass null if there is no activation. Other than that it should work. > > > > Will it actually be called like this actually? I see > > DCHECK_NE(activation_options_.activation_level, ActivationLevel::DISABLED); > > right before calling this method. > > Ahh, that's right. Crisis averted! lgtm
The CQ bit was checked by csharrison@chromium.org
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
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
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 Link to the patchset: https://codereview.chromium.org/2871013002/#ps40001 (title: "rebase on #470635")
The CQ bit was unchecked by csharrison@chromium.org
The CQ bit was checked by csharrison@chromium.org
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
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by csharrison@chromium.org
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": 40001, "attempt_start_ts": 1494458854485560, "parent_rev": "9880581d62ccb38559e5d8503c802e78c414ef22", "commit_rev": "19811b689efb15501224d8c8151abe0bbc8392a6"}
Message was sent while issue was closed.
Description was changed from ========== [subresource_filter] Refactor activation suppression Right now, we query for activation suppression in two places 1. Computing ActivationDecision in the driver_factory 2. Right before sending the Activation IPC in the throttle_manager Since (1) fully controls notifying page activation to the throttle_manager, (2) is completely unnecessary. This CL removes that functionality from the throttle manager delegate. BUG=689487 ========== to ========== [subresource_filter] Refactor activation suppression Right now, we query for activation suppression in two places 1. Computing ActivationDecision in the driver_factory 2. Right before sending the Activation IPC in the throttle_manager Since (1) fully controls notifying page activation to the throttle_manager, (2) is completely unnecessary. This CL removes that functionality from the throttle manager delegate. BUG=689487 Review-Url: https://codereview.chromium.org/2871013002 Cr-Commit-Position: refs/heads/master@{#470765} Committed: https://chromium.googlesource.com/chromium/src/+/19811b689efb15501224d8c8151a... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/19811b689efb15501224d8c8151a... |