Chromium Code Reviews| Index: apps/shell_window_geometry_cache.cc |
| diff --git a/apps/shell_window_geometry_cache.cc b/apps/shell_window_geometry_cache.cc |
| index caa83acba04ed343dda8cb622f2cbc82f1ad8817..f1d0c1274a1fbee1fea3bfeb73e698a8b6f6bf2e 100644 |
| --- a/apps/shell_window_geometry_cache.cc |
| +++ b/apps/shell_window_geometry_cache.cc |
| @@ -153,6 +153,13 @@ bool ShellWindowGeometryCache::GetGeometry( |
| if (window_data == extension_data_it->second.end()) |
| return false; |
| + // Check for and do not return corrupt data. |
| + if ((bounds && window_data->second.bounds.IsEmpty()) || |
| + (screen_bounds && window_data->second.screen_bounds.IsEmpty()) || |
| + (window_state && |
| + window_data->second.window_state == ui::SHOW_STATE_DEFAULT)) |
| + return false; |
| + |
|
Ken Rockot(use gerrit already)
2013/08/01 01:04:49
nit: It might be nicer to use a named WindowData&
|
| if (bounds) |
| *bounds = window_data->second.bounds; |
| if (screen_bounds) |