Commit c6d0504e authored by ellyjones's avatar ellyjones Committed by Commit bot

CollectedCookiesViews: don't show info for unfocused cookies

When the tab switches between allowed and blocked, cookie info
from the previous tab should no longer be shown.

BUG=649006

Review-Url: https://codereview.chromium.org/2361123002
Cr-Commit-Position: refs/heads/master@{#420693}
parent 8788690b
...@@ -497,8 +497,10 @@ void CollectedCookiesViews::EnableControls() { ...@@ -497,8 +497,10 @@ void CollectedCookiesViews::EnableControls() {
} }
void CollectedCookiesViews::ShowCookieInfo() { void CollectedCookiesViews::ShowCookieInfo() {
ui::TreeModelNode* node = allowed_cookies_tree_->GetSelectedNode(); ui::TreeModelNode* node = allowed_cookies_tree_->IsDrawn() ?
if (!node) allowed_cookies_tree_->GetSelectedNode() : nullptr;
if (!node && blocked_cookies_tree_->IsDrawn())
node = blocked_cookies_tree_->GetSelectedNode(); node = blocked_cookies_tree_->GetSelectedNode();
if (node) { if (node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment