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

Issue 804238 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Task



Sign in to add a comment

notification_view_md.cc should be in-place refactored to reduce the use of comments

Project Member Reported by maajid@chromium.org, Jan 22 2018

Issue description

This file uses comments a bit excessively. We should refactor the logic so that the comments are replaced by subfunctions. 

For instance, a code snippet such as:

  // |action_buttons_row_| contains inline action buttons.
  action_buttons_row_ = new views::View();
  action_buttons_row_->SetLayoutManager(std::make_unique<views::BoxLayout>(
      views::BoxLayout::kHorizontal, kActionsRowPadding,
      kActionsRowHorizontalSpacing));
  action_buttons_row_->SetBackground(
      views::CreateSolidBackground(kActionsRowBackgroundColor));
  action_buttons_row_->SetVisible(false);
  actions_row_->AddChildView(action_buttons_row_);

should be factored out into a function where the name of the function fulfills the role currently served by the comment.
 

Comment 1 by tetsui@chromium.org, Jan 23 2018

Cc: est...@chromium.org
Owner: tetsui@chromium.org
Status: Assigned (was: Untriaged)
Cc: -megumihattori@google.com
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment