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

Unified Diff: chrome/browser/ui/views/webshare/webshare_target_picker_view.cc

Issue 2679533002: Added unit test for WebShareTargetPickerView. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698