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

Unified Diff: apps/shell_window_geometry_cache.cc

Issue 22611004: DCHECK that invalid app window states are not cached. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | apps/shell_window_geometry_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell_window_geometry_cache.cc
diff --git a/apps/shell_window_geometry_cache.cc b/apps/shell_window_geometry_cache.cc
index 31b44a42477c6c66db045c8bcd598e0626df01c8..a3b0bcf036afb16b3ee92ffef1546427ec13a38b 100644
--- a/apps/shell_window_geometry_cache.cc
+++ b/apps/shell_window_geometry_cache.cc
@@ -111,6 +111,9 @@ void ShellWindowGeometryCache::SyncToStorage() {
base::DictionaryValue* value = new base::DictionaryValue;
const gfx::Rect& bounds = it->second.bounds;
const gfx::Rect& screen_bounds = it->second.screen_bounds;
+ DCHECK(!bounds.IsEmpty());
+ DCHECK(!screen_bounds.IsEmpty());
+ DCHECK(it->second.window_state != ui::SHOW_STATE_DEFAULT);
value->SetInteger("x", bounds.x());
value->SetInteger("y", bounds.y());
value->SetInteger("w", bounds.width());
« no previous file with comments | « no previous file | apps/shell_window_geometry_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698