Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1907)

Issue 1389273004: Update first download notification correctly if there are multiple notifications (Closed)

Created:
5 years, 2 months ago by yoshiki
Modified:
5 years, 2 months ago
Reviewers:
asanka
CC:
asanka, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update first download notification correctly if there are multiple notifications This patch fixes the issue on updating the first download notification by fixing the visibility check in DownloadItemNotification. This issue was the regression of https://crrev.com/49b2b0338e0eb698a24b045bf09603b853d7c4a7. BUG=541633 TEST=trybot passes Committed: https://crrev.com/795243b38d321e1e9d1f32d814265461194d74b0 Cr-Commit-Position: refs/heads/master@{#354177}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Update the download manually in the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -14 lines) Patch
M chrome/browser/download/notification/download_item_notification.h View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/download/notification/download_item_notification.cc View 6 chunks +15 lines, -12 lines 0 comments Download
M chrome/browser/download/notification/download_item_notification_unittest.cc View 4 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/download/notification/download_notification_browsertest.cc View 1 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/download/notification/download_notification_manager.h View 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/download/notification/download_notification_manager.cc View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
yoshiki
Asanka, PTAL. Thanks. https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_item_notification.cc File chrome/browser/download/notification/download_item_notification.cc (right): https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_item_notification.cc#newcode334 chrome/browser/download/notification/download_item_notification.cc:334: if (IsNotificationVisible()) { The cause of ...
5 years, 2 months ago (2015-10-10 05:31:13 UTC) #7
yoshiki
5 years, 2 months ago (2015-10-10 05:31:33 UTC) #9
asanka
https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_notification_browsertest.cc File chrome/browser/download/notification/download_notification_browsertest.cc (right): https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_notification_browsertest.cc#newcode378 chrome/browser/download/notification/download_notification_browsertest.cc:378: NotificationUpdateObserver download_notification_periodically_update_observer; Does this rely on the DownloadItem firing ...
5 years, 2 months ago (2015-10-12 18:59:09 UTC) #10
yoshiki
https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_notification_browsertest.cc File chrome/browser/download/notification/download_notification_browsertest.cc (right): https://codereview.chromium.org/1389273004/diff/120001/chrome/browser/download/notification/download_notification_browsertest.cc#newcode378 chrome/browser/download/notification/download_notification_browsertest.cc:378: NotificationUpdateObserver download_notification_periodically_update_observer; On 2015/10/12 18:59:08, asanka wrote: > Does ...
5 years, 2 months ago (2015-10-14 06:53:38 UTC) #11
asanka
lgtm
5 years, 2 months ago (2015-10-14 22:46:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1389273004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1389273004/140001
5 years, 2 months ago (2015-10-15 00:23:34 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:140001)
5 years, 2 months ago (2015-10-15 00:51:43 UTC) #15
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/795243b38d321e1e9d1f32d814265461194d74b0 Cr-Commit-Position: refs/heads/master@{#354177}
5 years, 2 months ago (2015-10-15 00:53:16 UTC) #16
benwells
A revert of this CL (patchset #2 id:140001) has been created in https://codereview.chromium.org/1403003004/ by benwells@chromium.org. ...
5 years, 2 months ago (2015-10-15 06:04:07 UTC) #17
benwells
5 years, 2 months ago (2015-10-15 06:10:59 UTC) #18
Message was sent while issue was closed.
On 2015/10/15 06:04:07, benwells wrote:
> A revert of this CL (patchset #2 id:140001) has been created in
> https://codereview.chromium.org/1403003004/ by mailto:benwells@chromium.org.
> 
> The reason for reverting is: This has caused memory errors on the ChromeOS
> memory bots. See
>
http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20...
> for an example build.
> 
> Sample failure output:
> ==2253==WARNING: MemorySanitizer: use-of-uninitialized-value
>     #0 0x7f0398815ca4 in operator==\u003Cstd::__1::allocator\u003Cchar> >
> buildtools/third_party/libc++/trunk/include/string:3812:9
>     #1 0x7f0398815ca4 in
>
message_center::NotificationList::GetNotification(std::__1::basic_string\u003Cchar,
> std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> > const&)
> ui/message_center/notification_list.cc:319:0
>     #2 0x7f0398815d85 in
>
message_center::NotificationList::RemoveNotification(std::__1::basic_string\u003Cchar,
> std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> > const&)
> ui/message_center/notification_list.cc:123:21
>     #3 0x7f03987f8691 in
> message_center::MessageCenterImpl::RemoveNotifications(bool,
> std::__1::vector\u003Cmessage_center::NotificationBlocker*,
> std::__1::allocator\u003Cmessage_center::NotificationBlocker*> > const&)
> ui/message_center/message_center_impl.cc:664:5
>     #4 0x7f03987f8115 in
> message_center::MessageCenterImpl::RemoveAllNotifications(bool)
> ui/message_center/message_center_impl.cc:646:3
>     #5 0x7f038daba090 in content::NotificationServiceImpl::Notify(int,
> content::NotificationSource const&, content::NotificationDetails const&)
> content/browser/notification_service_impl.cc:130:5
>     #6 0x7f0386830ee7 in chrome::NotifyAppTerminating()
> chrome/browser/lifetime/application_lifetime.cc:318:3
>     #7 0x7f038ac73bc2 in BrowserList::RemoveBrowser(Browser*)
> chrome/browser/ui/browser_list.cc:105:5
> .....
> 
>   Uninitialized value was created by a heap deallocation
>     #0 0x7f0382c9edd2 in __interceptor_free ??:0:0
>     #1 0x7f038c16d632 in hb_buffer_destroy
> third_party/harfbuzz-ng/src/hb-buffer.cc:785:3
>     #2 0x7f038c127512 in
> gfx::RenderTextHarfBuzz::ShapeRunWithFont(std::__1::basic_string\u003Cunsigned
> short, base::string16_char_traits, std::__1::allocator\u003Cunsigned short> >
> const&, std::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>,
> std::__1::allocator\u003Cchar> > const&, gfx::FontRenderParams const&,
> gfx::internal::TextRunHarfBuzz*) ui/gfx/render_text_harfbuzz.cc:1511:3
>     #3 0x7f038c128417 in CompareFamily ui/gfx/render_text_harfbuzz.cc:1311:8
>     #4 0x7f038c128417 in
> gfx::RenderTextHarfBuzz::ShapeRun(std::__1::basic_string\u003Cunsigned short,
> base::string16_char_traits, std::__1::allocator\u003Cunsigned short> > const&,
> gfx::internal::TextRunHarfBuzz*) ui/gfx/render_text_harfbuzz.cc:1366:0
>     #5 0x7f038c113e9b in ShapeRunList ui/gfx/render_text_harfbuzz.cc:1326:5
>     #6 0x7f038c113e9b in gfx::RenderTextHarfBuzz::EnsureLayoutRunList()
> ui/gfx/render_text_harfbuzz.cc:1529:0
>     #7 0x7f038c11b493 in gfx::RenderTextHarfBuzz::EnsureLayout()
> ui/gfx/render_text_harfbuzz.cc:1058:3
>     #8 0x7f038c11505f in gfx::RenderTextHarfBuzz::GetStringSizeF()
> ui/gfx/render_text_harfbuzz.cc:789:3
>     #9 0x7f038c114ee1 in gfx::RenderTextHarfBuzz::GetStringSize()
> ui/gfx/render_text_harfbuzz.cc:784:24
>     #10 0x7f038a3c2e67 in views::Label::GetTextSize() const
> ui/views/controls/label.cc:522:12
>     #11 0x7f038a3c2674 in views::Label::GetPreferredSize() const
> ui/views/controls/label.cc:228:18
>     #12 0x7f038a449484 in MainAxisSizeForView
> ui/views/layout/box_layout.cc:251:16
>     #13 0x7f038a449484 in views::BoxLayout::Layout(views::View*)
> ui/views/layout/box_layout.cc:65:0
>     #14 0x7f038a4734ff in views::View::Layout() ui/views/view.cc:505:5
>     #15 0x7f039884b041 in
>
message_center::NotificationView::CreateOrUpdateActionButtonViews(message_center::Notification
> const&) ui/message_center/views/notification_view.cc:748:7
> ......

Just saw yoshiki has fixed the tests. Awesome!

Powered by Google App Engine
This is Rietveld 408576698