Add the names of plugins to the blocked plugin bubble.
BUG=414399
TEST=browser_tests --gtest_filter=ChromeRenderViewTest.*
TEST=unit_tests --gtest_filter=ContentSettingBubbleModelTest.Plugins
Committed: https://crrev.com/303f76bcace7e8c827e21c76ed435b05beeffb69
Cr-Commit-Position: refs/heads/master@{#307570}
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/content_settings/tab_specific_content_settings.cc File chrome/browser/content_settings/tab_specific_content_settings.cc (right): https://codereview.chromium.org/777103002/diff/120001/chrome/browser/content_settings/tab_specific_content_settings.cc#newcode243 chrome/browser/content_settings/tab_specific_content_settings.cc:243: base::string16 names; There is JoinString (in base/strings/string_util.h) which does ...
https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_s...
File chrome/browser/content_settings/tab_specific_content_settings.cc (left):
https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_s...
chrome/browser/content_settings/tab_specific_content_settings.cc:701:
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, OnContentBlocked)
On 2014/12/08 00:21:11, Will Harris wrote:
> On 2014/12/05 22:18:05, Lei Zhang wrote:
> > Is OnContentBlocked() still used?
>
> used by the tests
If it's the case that only tests call it, it's probably time to change the tests
to use OnContentBlockedWithDetail() and delete OnContentBlocked().
Will Harris
PTAL https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_settings/tab_specific_content_settings.cc File chrome/browser/content_settings/tab_specific_content_settings.cc (left): https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_settings/tab_specific_content_settings.cc#oldcode701 chrome/browser/content_settings/tab_specific_content_settings.cc:701: IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, OnContentBlocked) On 2014/12/08 20:08:19, Lei Zhang wrote: ...
PTAL
https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_s...
File chrome/browser/content_settings/tab_specific_content_settings.cc (left):
https://codereview.chromium.org/777103002/diff/80001/chrome/browser/content_s...
chrome/browser/content_settings/tab_specific_content_settings.cc:701:
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, OnContentBlocked)
On 2014/12/08 20:08:19, Lei Zhang wrote:
> On 2014/12/08 00:21:11, Will Harris wrote:
> > On 2014/12/05 22:18:05, Lei Zhang wrote:
> > > Is OnContentBlocked() still used?
> >
> > used by the tests
>
> If it's the case that only tests call it, it's probably time to change the
tests
> to use OnContentBlockedWithDetail() and delete OnContentBlocked().
Actually, changing the default function signature of OnContentBlocked() ends up
making almost all calls to it pass extra empty string parameter, so the CL turns
out to be more complex, so I'll leave OnContentBlocked() as a convenience
method.
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/content_...
File chrome/browser/content_settings/tab_specific_content_settings.cc (right):
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/content_...
chrome/browser/content_settings/tab_specific_content_settings.cc:243:
base::string16 names;
On 2014/12/08 09:21:44, Bernhard Bauer wrote:
> There is JoinString (in base/strings/string_util.h) which does this.
Done.
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/content_...
chrome/browser/content_settings/tab_specific_content_settings.cc:345:
blocked_plugin_names_.insert(details);
On 2014/12/08 09:21:44, Bernhard Bauer wrote:
> Leave out the braces for single-line statements.
Done.
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/ui/conte...
File chrome/browser/ui/content_settings/content_setting_bubble_model.cc (right):
https://codereview.chromium.org/777103002/diff/120001/chrome/browser/ui/conte...
chrome/browser/ui/content_settings/content_setting_bubble_model.cc:121: if
(!plugin_names.empty()) {
On 2014/12/08 09:21:44, Bernhard Bauer wrote:
> If |plugin_names| is indeed empty, you will call set_plugin_names() with an
> empty string, which is fine, so you can just do that unconditionally.
Done.
https://codereview.chromium.org/777103002/diff/120001/chrome/renderer/content...
File chrome/renderer/content_settings_observer.cc (right):
https://codereview.chromium.org/777103002/diff/120001/chrome/renderer/content...
chrome/renderer/content_settings_observer.cc:209: if
(!content_blocked_[settings_type]) {
On 2014/12/08 09:21:44, Bernhard Bauer wrote:
> This check means you are only going to send this message for the first plugin
> that is blocked. That's probably not what you want?
send this IPC multiple times if details is not empty string.
TabSpecificContentSettings already handles this case gracefully.
Bernhard Bauer
LGTM, just one suggestion: https://codereview.chromium.org/777103002/diff/160001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/777103002/diff/160001/chrome/renderer/chrome_content_renderer_client.cc#newcode880 chrome/renderer/chrome_content_renderer_client.cc:880: observer->DidBlockContentType(content_type, plugin.name); Could you pass ...
Issue 777103002: Add the names of plugins to the blocked plugin bubble.
(Closed)
Created 6 years ago by Will Harris
Modified 6 years ago
Reviewers: jochen (gone - plz use gerrit), Lei Zhang, Bernhard Bauer
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 27