Chromium Code Reviews| Index: chrome/browser/ui/views/webshare/webshare_target_picker_view.cc |
| diff --git a/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc |
| index 05ed1c26961524af3874c6d92c51cedfa8d194da..037f1d47d40d2f218743ace186981725fa25dd2a 100644 |
| --- a/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc |
| +++ b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc |
| @@ -47,15 +47,14 @@ WebShareTargetPickerView::WebShareTargetPickerView( |
| AddChildView(overview_label); |
| std::vector<ui::TableColumn> table_columns{ui::TableColumn()}; |
| - views::TableView* table = |
| - new views::TableView(this, table_columns, views::TEXT_ONLY, true); |
| + table_ = new views::TableView(this, table_columns, views::TEXT_ONLY, true); |
|
sky
2017/02/06 17:11:24
To avoid errors please initialize table_ to null i
Matt Giuca
2017/02/06 23:17:21
Done (in the .h file).
|
| // Select the first row. |
| if (RowCount() > 0) |
| - table->Select(0); |
| + table_->Select(0); |
| // Create the table parent (a ScrollView which includes the scroll bars and |
| // border). We add this parent (not the table itself) to the dialog. |
| - views::View* table_parent = table->CreateParentIfNecessary(); |
| + views::View* table_parent = table_->CreateParentIfNecessary(); |
| AddChildView(table_parent); |
| // Make the table expand to fill the space. |
| layout->SetFlexForView(table_parent, 1); |