New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 764835 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

notification_view_md.h forward declares classes in the unnamed namespace

Project Member Reported by dcheng@chromium.org, Sep 13 2017

Issue description

This was introduced in https://codereview.chromium.org/2942143002. It probably shouldn't do that. GCC gives a warning:

dcheng@gcc-test:~/src/chrome/src$ autoninja -C out/gcc ../../ui/message_center/views/notification_view_md.cc^
ninja -C out/gcc ../../ui/message_center/views/notification_view_md.cc^ -l 64
ninja: Entering directory `out/gcc'   
[1/1] CXX obj/ui/message_center/message_center/notification_view_md.o       
In file included from ../../ui/message_center/views/notification_view_md.cc:5:0:
../../ui/message_center/views/notification_view_md.h:61:29: warning: ‘message_center::NotificationViewMD’ has a field ‘message_center::NotificationViewMD::image_container_view_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
 class MESSAGE_CENTER_EXPORT NotificationViewMD
                             ^~~~~~~~~~~~~~~~~~
../../ui/message_center/views/notification_view_md.h:61:29: warning: ‘message_center::NotificationViewMD’ has a field ‘message_center::NotificationViewMD::item_views_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
../../ui/message_center/views/notification_view_md.h:61:29: warning: ‘message_center::NotificationViewMD’ has a field ‘message_center::NotificationViewMD::compact_title_message_view_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
 

Comment 1 by dcheng@chromium.org, Sep 13 2017

Summary: notification_view_md.h forward declares classes in the unnamed namespace (was: notificatoin_view_md.h forward declares classes in the unnamed namespace)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45137e0ca02c82be04046f24bdc7006334adbd47

commit 45137e0ca02c82be04046f24bdc7006334adbd47
Author: Tetsui Ohkubo <tetsui@chromium.org>
Date: Wed Sep 20 07:54:58 2017

Remove notification_view_md.h forward declaration of anon namespace.

This removes forward declaration of anonymous namespace in
notification_view_md.h, by moving definition to the header.

TEST=message_center_unittests
BUG= 764835 

Change-Id: I8b058be0f4232d7f17673fc3a7d902566970d520
Reviewed-on: https://chromium-review.googlesource.com/674788
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503082}
[modify] https://crrev.com/45137e0ca02c82be04046f24bdc7006334adbd47/ui/message_center/views/notification_view_md.cc
[modify] https://crrev.com/45137e0ca02c82be04046f24bdc7006334adbd47/ui/message_center/views/notification_view_md.h

Comment 3 by tetsui@chromium.org, Sep 20 2017

Status: Fixed (was: Assigned)

Sign in to add a comment